Jump to content

Module:Random/testcases

From Wikipedia, the free encyclopedia

Number

[edit]
Code Main Sandbox
{{#invoke:random|number}} 0.83326624931454 0.054906306813893
{{#invoke:random|number|10}} 7 6
{{#invoke:random|number|10|20}} 17 20
{{#invoke:random|number|500000}} 145309 114009
{{#invoke:random|number|-10}} -1 -5
{{#invoke:random|number|20|10}} 17 14
{{#invoke:random|number|-100|-50}} -83 -63
{{#invoke:random|number|6.5}} 5 6
{{#invoke:random|number|-6.5}} -4 -4
{{#invoke:random|number|-16.5|-6.5}} -12.5 -11.5
Test randomness with the same input
Code Main Sandbox
{{#invoke:random|number}} 0.92110189465857 0.45927292968113
{{#invoke:random|number}} 0.75405073899499 0.46296695920777
{{#invoke:random|number}} 0.56524641512206 0.8595354668142
{{#invoke:random|number}} 0.39770697820825 0.27736838361126
{{#invoke:random|number}} 0.40140100773489 0.69617834067726
{{#invoke:random|number}} 0.64848873980739 0.52912718454801
{{#invoke:random|number}} 0.067298696407722 0.77621539345766
{{#invoke:random|number}} 0.31438642801456 0.60916423779408
{{#invoke:random|number}} 0.14733574918813 0.85625196986657
{{#invoke:random|number}} 0.95804219085632 0.081586533264064
{{#invoke:random|number|1000}} 884 144
{{#invoke:random|number|1000}} 624 19
{{#invoke:random|number|1000}} 956 974
{{#invoke:random|number|1000}} 84 769
{{#invoke:random|number|1000}} 704 637
{{#invoke:random|number|1000}} 127 75
{{#invoke:random|number|1000}} 594 531
{{#invoke:random|number|1000}} 27 965
{{#invoke:random|number|1000}} 902 398
{{#invoke:random|number|1000}} 894 831

Same number

[edit]
Code Main Sandbox
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes|10}} 9 9
{{#invoke:random|number|same=yes|10|20}} 18 18
{{#invoke:random|number|same=yes|500000}} 408908 408908
{{#invoke:random|number|same=yes|-10}} -8 -8
{{#invoke:random|number|same=yes|20|10}} 18 18
{{#invoke:random|number|same=yes|-100|-50}} -59 -59
{{#invoke:random|number|same=yes|6.5}} 6 6
{{#invoke:random|number|same=yes|-6.5}} -5 -5
{{#invoke:random|number|same=yes|-16.5|-6.5}} -8.5 -8.5
Test randomness with the same input
Code Main Sandbox
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes}} 0.076076110394707 0.076076110394707
{{#invoke:random|number|same=yes|1000}} 818 818
{{#invoke:random|number|same=yes|1000}} 818 818
{{#invoke:random|number|same=yes|1000}} 818 818
{{#invoke:random|number|same=yes|1000}} 818 818
{{#invoke:random|number|same=yes|1000}} 818 818
{{#invoke:random|number|same=yes|1000}} 818 818
{{#invoke:random|number|same=yes|1000}} 818 818
{{#invoke:random|number|same=yes|1000}} 818 818
{{#invoke:random|number|same=yes|1000}} 818 818
{{#invoke:random|number|same=yes|1000}} 818 818

Date

[edit]
Code Main Sandbox
{{#invoke:random|date}} 21:35, 07 September 2024 (UTC) 06:44, 12 June 2024 (UTC)
{{#invoke:random|date|1 Jan 2000}} 22:16, 02 June 1979 (UTC) 00:29, 25 February 1972 (UTC)
{{#invoke:random|date|1 Jan 2000|27 July 2176}} 07:26, 25 August 2037 (UTC) 16:57, 10 July 2158 (UTC)
{{#invoke:random|date|1000|2000|format=Y}} 1407 1080
{{#invoke:random|date|2000|1000|format=Y}} Module:Random error: the start date must not be later than the end date (start date: "2000", end date: "1000"). Module:Random error: the start date must not be later than the end date (start date: "2000", end date: "1000").
{{#invoke:random|date|format=Y/m/d H:i}} 2024/03/19 01:49 2024/05/10 02:46

Item

[edit]
Code Main Sandbox
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}} sausage beans
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}} Lobster Thermidor sausage

List

[edit]
Code Main Sandbox
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}} baconbeanssausageLobster Thermidoreggspam beansspamLobster Thermidorsausageeggbacon
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}} sausagebeansbaconLobster Thermidoreggspam spamsausagebeanseggbaconLobster Thermidor
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}} egg · spam · bacon · beans · Lobster Thermidor · sausage spam · egg · beans · sausage · Lobster Thermidor · bacon
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}} Lobster Thermidor | sausage | spam | egg | beans Lobster Thermidor | beans | sausage | spam | egg
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}} egg, beans, spam, Lobster Thermidor, bacon, sausage bacon, spam, Lobster Thermidor, egg, sausage, beans
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}} bacon⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽sausage beans⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽bacon
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}} Lobster Thermidor sausage beans bacon egg spam Lobster Thermidor beans bacon spam sausage egg
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}} sausage...Lobster Thermidor...spam...bacon...beans...egg bacon...egg...beans...spam...sausage...Lobster Thermidor
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}} spamLobster Thermidorbeanssausage eggLobster Thermidorbeansspam

Text list

[edit]
Code Main Sandbox
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}} beans, sausage, spam, bacon, egg and Lobster Thermidor spam, bacon, sausage, Lobster Thermidor, beans and egg
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}} beans, Lobster Thermidor, sausage, egg, spam and bacon egg, bacon, beans, spam, sausage and Lobster Thermidor
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}} sausage · bacon · beans · spam · Lobster Thermidor and egg sausage · egg · beans · spam · Lobster Thermidor and bacon
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}} sausage | Lobster Thermidor | egg | beans and bacon Lobster Thermidor | sausage | beans | egg and bacon
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}} Lobster Thermidor, beans, spam, egg, sausage and bacon beans, Lobster Thermidor, sausage, egg, spam and bacon
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}} spam⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽egg and sausage egg⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽bacon and spam
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}} egg bacon sausage Lobster Thermidor spam and beans egg sausage beans Lobster Thermidor bacon and spam
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}} egg...beans...spam...sausage...bacon and Lobster Thermidor Lobster Thermidor...spam...egg...sausage...bacon and beans
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space|conj=...}} Lobster Thermidor bacon sausage egg spam...beans spam Lobster Thermidor bacon egg beans...sausage
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|conj=... and }} sausage, Lobster Thermidor, bacon, egg, beans... and spam egg, sausage, bacon, beans, spam... and Lobster Thermidor
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}} egg, bacon, spam and beans egg, beans, bacon and spam

Bulleted list

[edit]
Code Main Sandbox
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
  • egg
  • beans
  • Lobster Thermidor
  • spam
  • sausage
  • bacon
  • sausage
  • beans
  • bacon
  • egg
  • spam
  • Lobster Thermidor
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
  • sausage
  • egg
  • spam
  • beans
  • Lobster Thermidor
  • bacon
  • sausage
  • egg
  • spam
  • Lobster Thermidor
  • beans
  • bacon
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
  • egg
  • bacon
  • Lobster Thermidor
  • beans
  • sausage
  • spam
  • egg
  • beans
  • bacon
  • spam
  • sausage
  • Lobster Thermidor
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
  • egg
  • Lobster Thermidor
  • sausage
  • spam
  • bacon
  • egg
  • sausage
  • spam

Unbulleted list

[edit]
Code Main Sandbox
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
  • sausage
  • bacon
  • Lobster Thermidor
  • beans
  • egg
  • spam
  • Lobster Thermidor
  • beans
  • sausage
  • bacon
  • spam
  • egg
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
  • Lobster Thermidor
  • sausage
  • bacon
  • beans
  • egg
  • spam
  • bacon
  • Lobster Thermidor
  • egg
  • sausage
  • beans
  • spam
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
  • beans
  • bacon
  • sausage
  • egg
  • Lobster Thermidor
  • spam
  • Lobster Thermidor
  • beans
  • sausage
  • bacon
  • spam
  • egg
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
  • beans
  • Lobster Thermidor
  • sausage
  • egg
  • bacon
  • egg
  • spam
  • Lobster Thermidor

Horizontal list

[edit]
Code Main Sandbox
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
  • egg
  • bacon
  • Lobster Thermidor
  • beans
  • spam
  • sausage
  • beans
  • sausage
  • egg
  • spam
  • bacon
  • Lobster Thermidor
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
  • Lobster Thermidor
  • beans
  • spam
  • egg
  • bacon
  • sausage
  • Lobster Thermidor
  • bacon
  • beans
  • sausage
  • egg
  • spam
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
  • beans
  • bacon
  • spam
  • sausage
  • Lobster Thermidor
  • egg
  • bacon
  • egg
  • Lobster Thermidor
  • spam
  • sausage
  • beans
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
  • beans
  • spam
  • sausage
  • Lobster Thermidor
  • egg
  • bacon
  • sausage
  • spam

Ordered list

[edit]
Code Main Sandbox
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
  1. beans
  2. bacon
  3. spam
  4. sausage
  5. Lobster Thermidor
  6. egg
  1. sausage
  2. Lobster Thermidor
  3. bacon
  4. egg
  5. beans
  6. spam
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
  1. sausage
  2. spam
  3. beans
  4. egg
  5. Lobster Thermidor
  6. bacon
  1. beans
  2. sausage
  3. egg
  4. bacon
  5. spam
  6. Lobster Thermidor
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
  1. beans
  2. Lobster Thermidor
  3. egg
  4. sausage
  5. bacon
  6. spam
  1. Lobster Thermidor
  2. sausage
  3. bacon
  4. egg
  5. spam
  6. beans
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|list_style_type=lower greek}}
  1. beans
  2. Lobster Thermidor
  3. bacon
  4. sausage
  5. spam
  6. egg
  1. beans
  2. bacon
  3. Lobster Thermidor
  4. egg
  5. sausage
  6. spam
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|type=I}}
  1. bacon
  2. egg
  3. sausage
  4. Lobster Thermidor
  5. spam
  6. beans
  1. spam
  2. egg
  3. beans
  4. Lobster Thermidor
  5. sausage
  6. bacon
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
  1. spam
  2. Lobster Thermidor
  3. egg
  4. sausage
  1. spam
  2. egg
  3. beans
  4. sausage

Horizontal ordered list

[edit]
Code Main Sandbox
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
  1. Lobster Thermidor
  2. spam
  3. sausage
  4. bacon
  5. beans
  6. egg
  1. Lobster Thermidor
  2. spam
  3. sausage
  4. egg
  5. bacon
  6. beans
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
  1. sausage
  2. bacon
  3. spam
  4. beans
  5. egg
  6. Lobster Thermidor
  1. Lobster Thermidor
  2. beans
  3. egg
  4. bacon
  5. spam
  6. sausage
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
  1. egg
  2. sausage
  3. spam
  4. beans
  5. Lobster Thermidor
  6. bacon
  1. bacon
  2. Lobster Thermidor
  3. beans
  4. spam
  5. egg
  6. sausage
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
  1. Lobster Thermidor
  2. beans
  3. egg
  4. spam
  1. Lobster Thermidor
  2. bacon
  3. spam
  4. egg
[edit]
Code Main Sandbox
{{#invoke:random|link|Aristotle}} Script error: The function "link" does not exist. Script error: The function "link" does not exist.