Template:Roman/testcases
Appearance
This is the template test cases page for the sandbox of Template:Roman. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Empty
[edit]{{Roman}}
{{Roman/sandbox}}
{{Roman|}}
{{Roman/sandbox|}}
Live tests with fraction=yes
[edit]{{Roman|105.5|fraction=yes}}
CVS
{{Roman|1/7+9|fraction=yes}}
IX•ЄƧ℈»
General cases
[edit]Input | Live | Sandbox | User:Stelio/Roman |
---|---|---|---|
0 | N | N | N |
1 | I | I | I |
2 | II | II | II |
3 | III | III | III |
4 | IV | IV | IV |
5 | V | V | V |
6 | VI | VI | VI |
7 | VII | VII | VII |
8 | VIII | VIII | VIII |
9 | IX | IX | IX |
10 | X | X | X |
11 | XI | XI | XI |
12 | XII | XII | XII |
13 | XIII | XIII | XIII |
14 | XIV | XIV | XIV |
15 | XV | XV | XV |
16 | XVI | XVI | XVI |
17 | XVII | XVII | XVII |
18 | XVIII | XVIII | XVIII |
19 | XIX | XIX | XIX |
20 | XX | XX | XX |
31 | XXXI | XXXI | XXXI |
32 | XXXII | XXXII | XXXII |
33 | XXXIII | XXXIII | XXXIII |
34 | XXXIV | XXXIV | XXXIV |
35 | XXXV | XXXV | XXXV |
36 | XXXVI | XXXVI | XXXVI |
37 | XXXVII | XXXVII | XXXVII |
38 | XXXVIII | XXXVIII | XXXVIII |
39 | XXXIX | XXXIX | XXXIX |
40 | XL | XL | XL |
41 | XLI | XLI | XLI |
42 | XLII | XLII | XLII |
43 | XLIII | XLIII | XLIII |
44 | XLIV | XLIV | XLIV |
45 | XLV | XLV | XLV |
46 | XLVI | XLVI | XLVI |
47 | XLVII | XLVII | XLVII |
48 | XLVIII | XLVIII | XLVIII |
49 | XLIX | XLIX | XLIX |
50 | L | L | L |
90 | XC | XC | XC |
91 | XCI | XCI | XCI |
92 | XCII | XCII | XCII |
93 | XCIII | XCIII | XCIII |
94 | XCIV | XCIV | XCIV |
95 | XCV | XCV | XCV |
96 | XCVI | XCVI | XCVI |
97 | XCVII | XCVII | XCVII |
98 | XCVIII | XCVIII | XCVIII |
99 | XCIX | XCIX | XCIX |
100 | C | C | C |
101 | CI | CI | CI |
102 | CII | CII | CII |
103 | CIII | CIII | CIII |
104 | CIV | CIV | CIV |
105 | CV | CV | CV |
106 | CVI | CVI | CVI |
107 | CVII | CVII | CVII |
108 | CVIII | CVIII | CVIII |
109 | CIX | CIX | CIX |
1000 | M | M | M |
1234 | MCCXXXIV | MCCXXXIV | MCCXXXIV |
2999 | MMCMXCIX | MMCMXCIX | MMCMXCIX |
3000 | MMM | MMM | MMM |
4999 | IVCMXCIX | IVCMXCIX | IVCMXCIX |
5000 | V | V | V |
5001 | VI | VI | VI |
49999 | XLIXCMXCIX | XLIXCMXCIX | XLIXCMXCIX |
50000 | L | L | L |
50001 | LI | LI | LI |
69105 | LXIXCV | LXIXCV | LXIXCV |
69105 | LXIXCV | LXIXCV | LXIXCV |
999999 | CMXCIXCMXCIX | CMXCIXCMXCIX | CMXCIXCMXCIX |
1000000 | M | M | M |
4999999 | MMMMCMXCIXCMXCIX | MMMMCMXCIXCMXCIX | MMMMCMXCIXCMXCIX |
Numbers exceeding 4999999
[edit]Input | Live | Sandbox | User:Stelio/Roman |
---|---|---|---|
5000000 | N/A | N/A | 5000000 is too big to be converted to Roman numerals |
5000010 | N/A | N/A | 5000010 is too big to be converted to Roman numerals |
3000000000 | N/A | N/A | 3000000000 is too big to be converted to Roman numerals |
Custom messages when too big
[edit]Input | Live | Sandbox | User:Stelio/Roman |
---|---|---|---|
5000010 with "too big" | too big | too big | too big |
5000010 with "??" | ?? | ?? | ?? |
Sandbox params validation
[edit]- Sandbox w/ '1000|too big': M
- Sandbox with '1000|fraction=yes|too big': M
- Sandbox with '1000|too big|fraction=yes': M
- Sandbox w/ '4210987|too big': MMMMCCXCMLXXXVII
- Sandbox with '4210987|fraction=yes|too big': MMMMCCXCMLXXXVII
- Sandbox with '4210987|too big|fraction=yes': MMMMCCXCMLXXXVII
- Sandbox w/ '4210987.1|too big': MMMMCCXCMLXXXVII
- Sandbox with '4210987.1|fraction=yes|too big': MMMMCCXCMLXXXVII•Ƨ»»»»»
- Sandbox with '4210987.1|too big|fraction=yes': MMMMCCXCMLXXXVII•Ƨ»»»»»
- Sandbox w/ '5000010|too big': too big
- Sandbox with '5000010|fraction=yes|too big': too big
- Sandbox with '5000010|too big|fraction=yes': too big
- Sandbox w/ '3000000000|too big': too big
- Sandbox with '3000000000|fraction=yes|too big': too big
- Sandbox with '3000000000|too big|fraction=yes': too big
Decimal cases between 0 and 1
[edit]Input | Live | Live with fraction=yes | Sandbox | Sandbox with fraction=yes | User:Stelio/Roman |
---|---|---|---|---|---|
0.0001 | » | » | N | ||
0.0005 | » | » | » | ||
0.00057 | » | » | » | ||
0.000578703 | » | » | » | ||
0.000578704 | » | » | » | ||
0.00347222 | ℈ | ℈ | |||
0.00347223 | ℈ | ℈ | ℈ | ||
0.007 | ƻ | ||||
0.0139 | Ƨ | Ƨ | Ƨ | ||
0.02084 | Ɔ | Ɔ | Ɔ | ||
0.0278 | ƧƧ | ƧƧ | ƧƧ | ||
0.04167 | Є | Є | Є | ||
0.08334 | • | • | • | ||
0.142858 | •ЄƧ℈» | •ЄƧ℈» | •ЄƧ℈» | ||
0.1667 | : | : | : | ||
0.2 | :ƧƧ℈»»»» | :ƧƧ℈»»»» | :ƧƧ℈»»»» | ||
0.25 | :• | :• | :• | ||
0.3333 | :: | :: | :•ЄƧƧƻ℈ | ||
.3333 | :: | :: | :•ЄƧƧƻ℈ | ||
0.3334 | :: | :: | :: | ||
0.34 | :: |
:: |
::℈ | ||
0.4 | ::ЄƆ℈» | ::ЄƆ℈» | ::ЄƆ℈» | ||
0.41666 | :•: | :•: | ::ЄƧƧƻ℈ | ||
0.41667 | :•: | :•: | :•: | ||
0.42 | :•:℈ | :•:℈ | :•: | ||
0.5 | S | S | S | ||
0.55 | SЄ |
SЄ |
SЄƻ»» | ||
0.6 | S•Ƨ»»»»» | S•Ƨ»»»»» | S•Ƨ»»»»» | ||
0.7 | S:ƧƧ℈»»»» | S:ƧƧ℈»»»» | S:ƧƧ℈»»»» | ||
0.75 | S:• | S:• | S:• | ||
0.95 | S:•:ƧƧ℈»»»» | S:•:ƧƧ℈»»»» | S:•:ƧƧ℈»»»» | ||
0.9999 | S:•:ЄƧƧ |
S:•:ЄƧƧ |
S:•:ЄƧƧƻ℈ | ||
0.999999 | S:•:ЄƧƧ |
S:•:ЄƧƧ |
S:•:ЄƧƧƻ℈ |
Fractional cases between 0 and 1
[edit]Input | Live | Live with fraction=yes | Sandbox | Sandbox with fraction=yes | User:Stelio/Roman |
---|---|---|---|---|---|
1/1728 | » | » | » | ||
1/288 | ℈ | ℈ | ℈ | ||
1/144 | ƻ | ||||
1/72 | Ƨ | Ƨ | Ƨ | ||
1/48 | Ɔ | Ɔ | Ɔ | ||
1/36 | ƧƧ | ƧƧ | ƧƧ | ||
1/24 | Є | Є | Є | ||
1/12 | • | • | • | ||
1/7 | •ЄƧ℈» | •ЄƧ℈» | •ЄƧ℈» | ||
1/6 | : | : | : | ||
1/5 | :ƧƧ℈»»»» | :ƧƧ℈»»»» | :ƧƧ℈»»»» | ||
1/4 | :• | :• | :• | ||
1/3 | :: | :: | :: | ||
5/12 | :•: | :•: | :•: | ||
1/2 | S | S | S | ||
2/3 | S: | S: | S: | ||
14/17 | S:•ЄƧƧ℈» | S:•ЄƧƧ℈» | S:•ЄƧƧ℈» | ||
5/6 | S:: | S:: | S:: | ||
71/72 | S:•:ЄƧƧ | S:•:ЄƧƧ | S:•:ЄƧƧ | ||
999/1000 | S:•:ЄƧƧ |
S:•:ЄƧƧ |
S:•:ЄƧƧƻ℈»»»» | ||
1727/1728 | S:•:ЄƧƧ |
S:•:ЄƧƧ |
S:•:ЄƧƧƻ℈»»»»» | ||
9999/10000 | S:•:ЄƧƧ |
S:•:ЄƧƧ |
S:•:ЄƧƧƻ℈ |
Negative, decimal/fractional, arithmetic, and misc corner cases
[edit]Input | Live | Live with fraction=yes | Sandbox | Sandbox with fraction=yes | User:Stelio/Roman with "custom" |
---|---|---|---|---|---|
-1 | Lua error: Invalid number -1. | Lua error: Invalid number -1. | Lua error: Invalid number -1. | Lua error: Invalid number -1. | custom |
-0 | N | N | N | N | N |
-1234 | Lua error: Invalid number -1234. | Lua error: Invalid number -1234. | Lua error: Invalid number -1234. | Lua error: Invalid number -1234. | custom |
177/3.5 | L | LSЄƧƧ»»» | L | LSЄƧƧ»»» | LSЄƧƧ»»» |
50.572 | L | LSЄƧƧ»»»» | L | LSЄƧƧ»»»» | LSЄƧƧ»»»» |
1+1 | II | II | II | II | II |
10-1 | IX | IX | IX | IX | IX |
4*8 | XXXII | XXXII | XXXII | XXXII | XXXII |
80/2 | XL | XL | XL | XL | XL |
2^8 | CCLVI | CCLVI | CCLVI | CCLVI | CCLVI |
105.5 | CV | CVS | CV | CVS | CVS |
2999.765432 | MMCMXCIX | MMCMXCIXS:•Ƨ»»» | MMCMXCIX | MMCMXCIXS:•Ƨ»»» | MMCMXCIXS:•Ƨ»»» |
3000.22638 | MMM | MMM:ЄƧ℈» | MMM | MMM:ЄƧ℈» | MMM:ЄƧ℈» |
69105.8 | LXIXCV | LXIXCVS:•Є |
LXIXCV | LXIXCVS:•Є |
LXIXCVS:•Єƻ»» |
Stelio's negative handling
[edit]- -1: Negative numbers (such as -1) cannot be converted to Roman numerals
- -1234: Negative numbers (such as -1234) cannot be converted to Roman numerals
Large arithmetic expressions
[edit]- 4999999 1727/1728
- live Lua error: Invalid number 4999999 1727/1728.
- live fraction Lua error: Invalid number 4999999 1727/1728.
- sandbox Lua error: Invalid number 4999999 1727/1728.
- sandbox fraction Lua error: Invalid number 4999999 1727/1728.
- Stelio Expression error: Unexpected number.
- 4999999.9999999
- live MMMMCMXCIXCMXCIX
- live fraction MMMMCMXCIXCMXCIXS:•:ЄƧƧ
Ƨ℈»»»»» - sandbox MMMMCMXCIXCMXCIX
- sandbox fraction MMMMCMXCIXCMXCIXS:•:ЄƧƧ
Ƨ℈»»»»» - Stelio 4999999.9999999 is too big to be converted to Roman numerals
- 4999999+1727/1728
- live MMMMCMXCIXCMXCIX
- live fraction MMMMCMXCIXCMXCIXS:•:ЄƧƧ
Ƨ℈»»»»» - sandbox MMMMCMXCIXCMXCIX
- sandbox fraction MMMMCMXCIXCMXCIXS:•:ЄƧƧ
Ƨ℈»»»»» - Stelio MMMMCMXCIXCMXCIXS:•:ЄƧƧƻ℈»»»»»
- 4,999,999 1727/1728
- live Lua error: Invalid number 4,999,999 1727/1728.
- live fraction Lua error: Invalid number 4,999,999 1727/1728.
- sandbox Lua error: Invalid number 4,999,999 1727/1728.
- sandbox fraction Lua error: Invalid number 4,999,999 1727/1728.
- Stelio Expression error: Unrecognized punctuation character ",".
- 5000001-2
- live MMMMCMXCIXCMXCIX
- live fraction MMMMCMXCIXCMXCIX
- sandbox MMMMCMXCIXCMXCIX
- sandbox fraction MMMMCMXCIXCMXCIX
- Stelio MMMMCMXCIXCMXCIX