Module talk:Roman/testcases
Jump to navigation
Jump to search
All tests passed.
Text | Expected | Actual | |
---|---|---|---|
roman.toArabic(roman._Numeral(0)) | 0 | 0 | |
roman.toArabic(roman._Numeral(5001)) | 5001 | 5001 | |
roman.toArabic(roman._Numeral(7468)) | 7468 | 7468 | |
roman.toArabic(roman._Numeral(10000)) | 10000 | 10000 | |
roman.toArabic(roman._Numeral(12345)) | 12345 | 12345 | |
roman.toArabic(roman._Numeral(13798)) | 13798 | 13798 | |
roman.toArabic(roman._Numeral(21856)) | 21856 | 21856 | |
roman.toArabic(roman._Numeral(123456)) | 123456 | 123456 | |
roman.toArabic(roman._Numeral(1048576)) | 1048576 | 1048576 | |
roman.toArabic(roman._Numeral(4999999999)) | 4999999999 | 4999999999 |
Text | Expected | Actual | |
---|---|---|---|
{{#invoke:Roman/sandbox|Numeral|9999}} | I̅X̅CMXCIX | I̅X̅CMXCIX | |
{{#invoke:Roman/sandbox|Numeral|14999}} | X̅I̅V̅CMXCIX | X̅I̅V̅CMXCIX | |
{{#invoke:Roman/sandbox|Numeral|34850}} | X̅X̅X̅I̅V̅DCCCL | X̅X̅X̅I̅V̅DCCCL |
Text | Expected | Actual | |
---|---|---|---|
{{#invoke:Roman/sandbox|Numeral|0}} | N | N | |
{{#invoke:Roman/sandbox|Numeral| 1}} | I | I | |
{{#invoke:Roman/sandbox|Numeral|04}} | IV | IV | |
{{#invoke:Roman/sandbox|Numeral|0004}} | IV | IV | |
{{#invoke:Roman/sandbox|Numeral| 04 }} | IV | IV | |
{{#invoke:Roman/sandbox|Numeral|5987654321}} | 5987654321 | 5987654321 |
Text | Expected | Actual | |
---|---|---|---|
roman.isRoman("") | false | false | |
roman.isRoman("AbCd") | false | false | |
roman.isRoman("第") | false | false | |
roman.isRoman("34") | false | false | |
roman.isRoman("I") | true | true | |
roman.isRoman("ⅩⅣ") | true | true | |
roman.isRoman("V̅") | true | true |
Text | Expected | Actual | |
---|---|---|---|
roman.toArabic("") | nil | nil | |
roman.toArabic("AbCd") | nil | nil | |
roman.toArabic("第") | nil | nil | |
roman.toArabic("34") | 34 | 34 | |
roman.toArabic(" I ") | 1 | 1 | |
roman.toArabic("ⅩⅣ") | 14 | 14 | |
roman.toArabic(" V̅ ") | 5000 | 5000 | |
roman.toArabic("I") | 1 | 1 | |
roman.toArabic("II") | 2 | 2 | |
roman.toArabic("IV") | 4 | 4 | |
roman.toArabic("XIV") | 14 | 14 | |
roman.toArabic("XLIX") | 49 | 49 | |
roman.toArabic("L") | 50 | 50 | |
roman.toArabic("LI") | 51 | 51 | |
roman.toArabic("CI") | 101 | 101 | |
roman.toArabic("CCIII") | 203 | 203 | |
roman.toArabic("DX") | 510 | 510 | |
roman.toArabic("CMXCIX") | 999 | 999 | |
roman.toArabic("M") | 1000 | 1000 | |
roman.toArabic("MXXIV") | 1024 | 1024 | |
roman.toArabic("MCMLXXIX") | 1979 | 1979 | |
roman.toArabic("MM") | 2000 | 2000 | |
roman.toArabic("MMXI") | 2011 | 2011 | |
roman.toArabic("MMCMXCIX") | 2999 | 2999 | |
roman.toArabic("MMM") | 3000 | 3000 | |
roman.toArabic("MMMI") | 3001 | 3001 | |
roman.toArabic("MMMMCMLXXXVII") | 4987 | 4987 | |
roman.toArabic("MMMMCMXCIX") | 4999 | 4999 | |
roman.toArabic("V̅") | 5000 | 5000 |
Text | Expected | Actual | |
---|---|---|---|
{{#invoke:Roman/sandbox|Numeral|1}} | I | I | |
{{#invoke:Roman/sandbox|Numeral|2}} | II | II | |
{{#invoke:Roman/sandbox|Numeral|49}} | XLIX | XLIX | |
{{#invoke:Roman/sandbox|Numeral|50}} | L | L | |
{{#invoke:Roman/sandbox|Numeral|51}} | LI | LI | |
{{#invoke:Roman/sandbox|Numeral|101}} | CI | CI | |
{{#invoke:Roman/sandbox|Numeral|203}} | CCIII | CCIII | |
{{#invoke:Roman/sandbox|Numeral|510}} | DX | DX | |
{{#invoke:Roman/sandbox|Numeral|999}} | CMXCIX | CMXCIX | |
{{#invoke:Roman/sandbox|Numeral|1024}} | MXXIV | MXXIV | |
{{#invoke:Roman/sandbox|Numeral|1979}} | MCMLXXIX | MCMLXXIX | |
{{#invoke:Roman/sandbox|Numeral|2000}} | MM | MM | |
{{#invoke:Roman/sandbox|Numeral|2011}} | MMXI | MMXI | |
{{#invoke:Roman/sandbox|Numeral|2999}} | MMCMXCIX | MMCMXCIX | |
{{#invoke:Roman/sandbox|Numeral|3000}} | MMM | MMM | |
{{#invoke:Roman/sandbox|Numeral|3001}} | MMMI | MMMI |
Text | Expected | Actual | |
---|---|---|---|
{{#invoke:Roman/sandbox|Numeral|4987}} | MMMMCMLXXXVII | I̅V̅CMLXXXVII | |
{{#invoke:Roman/sandbox|Numeral|4999}} | MMMMCMXCIX | I̅V̅CMXCIX | |
{{#invoke:Roman/sandbox|Numeral|5000}} | V | V̅ | |
{{#invoke:Roman/sandbox|Numeral|5001}} | VI | V̅I | |
{{#invoke:Roman/sandbox|Numeral|7468}} | VMMCDLXVIII | V̅I̅I̅CDLXVIII | |
{{#invoke:Roman/sandbox|Numeral|10000}} | X | X̅ | |
{{#invoke:Roman/sandbox|Numeral|12345}} | XMMCCCXLV | X̅MMCCCXLV | |
{{#invoke:Roman/sandbox|Numeral|13798}} | XMMMDCCXCVIII | X̅MMMDCCXCVIII | |
{{#invoke:Roman/sandbox|Numeral|21856}} | XXMDCCCLVI | X̅X̅MDCCCLVI | |
{{#invoke:Roman/sandbox|Numeral|123456}} | CXXMMMCDLVI | C̅X̅X̅MMMCDLVI | |
{{#invoke:Roman/sandbox|Numeral|1048576}} | MXLVMMMDLXXVI | M̅X̅L̅V̅I̅I̅I̅DLXXVI |
Start a discussion about Module:Roman/testcases
Talk pages are where people discuss how to make content on Wikimedia Commons the best that it can be. You can use this page to start a discussion with others about how to improve Module:Roman/testcases.