Jump to content

Module:Random/testcases

From Wikipedia, the free encyclopedia

Number

[edit]
Code Main Sandbox
{{#invoke:random|number}} 0.52935146052826 0.068011730475357
{{#invoke:random|number|10}} 6 2
{{#invoke:random|number|10|20}} 18 20
{{#invoke:random|number|500000}} 78200 344710
{{#invoke:random|number|-10}} -5 -2
{{#invoke:random|number|20|10}} 14 15
{{#invoke:random|number|-100|-50}} -95 -86
{{#invoke:random|number|6.5}} 6 1
{{#invoke:random|number|-6.5}} -1 -2
{{#invoke:random|number|-16.5|-6.5}} -15.5 -13.5
Test randomness with the same input
Code Main Sandbox
{{#invoke:random|number}} 0.94857242701043 0.31550999512687
{{#invoke:random|number}} 0.024426692176809 0.39234130009652
{{#invoke:random|number}} 0.028609002953679 0.86107004334269
{{#invoke:random|number}} 0.057750707053463 0.25394356728249
{{#invoke:random|number}} 0.035997062472625 0.81756275371535
{{#invoke:random|number}} 0.014243894263284 0.79629738991908
{{#invoke:random|number}} 0.99249024968245 0.18868263260866
{{#invoke:random|number}} 0.79950313819549 0.99569599795886
{{#invoke:random|number}} 0.19286542022269 0.38905827998605
{{#invoke:random|number}} 0.14935860743251 0.93092382183807
{{#invoke:random|number|1000}} 230 845
{{#invoke:random|number|1000}} 18 632
{{#invoke:random|number|1000}} 806 419
{{#invoke:random|number|1000}} 19 13
{{#invoke:random|number|1000}} 917 110
{{#invoke:random|number|1000}} 286 459
{{#invoke:random|number|1000}} 510 152
{{#invoke:random|number|1000}} 13 940
{{#invoke:random|number|1000}} 555 986
{{#invoke:random|number|1000}} 901 74

Same number

[edit]
Code Main Sandbox
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes|10}} 8 8
{{#invoke:random|number|same=yes|10|20}} 17 17
{{#invoke:random|number|same=yes|500000}} 359319 359319
{{#invoke:random|number|same=yes|-10}} -7 -7
{{#invoke:random|number|same=yes|20|10}} 17 17
{{#invoke:random|number|same=yes|-100|-50}} -64 -64
{{#invoke:random|number|same=yes|6.5}} 5 5
{{#invoke:random|number|same=yes|-6.5}} -4 -4
{{#invoke:random|number|same=yes|-16.5|-6.5}} -9.5 -9.5
Test randomness with the same input
Code Main Sandbox
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes}} 0.9451089733956 0.9451089733956
{{#invoke:random|number|same=yes|1000}} 719 719
{{#invoke:random|number|same=yes|1000}} 719 719
{{#invoke:random|number|same=yes|1000}} 719 719
{{#invoke:random|number|same=yes|1000}} 719 719
{{#invoke:random|number|same=yes|1000}} 719 719
{{#invoke:random|number|same=yes|1000}} 719 719
{{#invoke:random|number|same=yes|1000}} 719 719
{{#invoke:random|number|same=yes|1000}} 719 719
{{#invoke:random|number|same=yes|1000}} 719 719
{{#invoke:random|number|same=yes|1000}} 719 719

Date

[edit]
Code Main Sandbox
{{#invoke:random|date}} 07:14, 14 July 2024 (UTC) 07:26, 15 March 2024 (UTC)
{{#invoke:random|date|1 Jan 2000}} 13:35, 11 February 1987 (UTC) 17:30, 24 June 1999 (UTC)
{{#invoke:random|date|1 Jan 2000|27 July 2176}} 19:21, 26 September 2063 (UTC) 23:58, 03 January 2033 (UTC)
{{#invoke:random|date|1000|2000|format=Y}} 1999 1495
{{#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/05/02 23:46 2024/04/10 12:11

Item

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

List

[edit]
Code Main Sandbox
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}} baconLobster Thermidorspameggsausagebeans sausagebeanseggbaconLobster Thermidorspam
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}} spameggsausagebaconLobster Thermidorbeans baconbeansspameggLobster Thermidorsausage
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}} spam · sausage · egg · beans · Lobster Thermidor · bacon beans · spam · sausage · bacon · Lobster Thermidor · egg
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}} spam | Lobster Thermidor | bacon | egg | beans Lobster Thermidor | spam | bacon | sausage | beans
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}} beans, bacon, egg, sausage, Lobster Thermidor, spam spam, sausage, beans, egg, bacon, Lobster Thermidor
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}} Lobster Thermidor⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽bacon spam⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽beans
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}} egg spam beans Lobster Thermidor bacon sausage Lobster Thermidor spam bacon egg sausage beans
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}} sausage...spam...beans...bacon...egg...Lobster Thermidor egg...beans...Lobster Thermidor...spam...sausage...bacon
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}} beansbaconeggLobster Thermidor Lobster Thermidorbaconbeanssausage

Text list

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

Bulleted list

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

Unbulleted list

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

Horizontal list

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

Ordered list

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

Horizontal ordered list

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