Module talk:Roman/testcases
Add topicAppearance
All 55 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 |
Start a discussion about Module:Roman/testcases
Talk pages are where people discuss how to make content on Wikisource the best that it can be. You can use this page to start a discussion with others about how to improve Module:Roman/testcases.