Jump to content

Module:Random/testcases

From Wikipedia, the free encyclopedia

Number

[edit]
Code Main Sandbox
{{#invoke:random|number}} 0.0072672851417527 0.15577054450091
{{#invoke:random|number|10}} 9 7
{{#invoke:random|number|10|20}} 18 14
{{#invoke:random|number|500000}} 278750 12845
{{#invoke:random|number|-10}} 0 -2
{{#invoke:random|number|20|10}} 15 19
{{#invoke:random|number|-100|-50}} -90 -72
{{#invoke:random|number|6.5}} 6 3
{{#invoke:random|number|-6.5}} -4 -5
{{#invoke:random|number|-16.5|-6.5}} -10.5 -13.5
Test randomness with the same input
Code Main Sandbox
{{#invoke:random|number}} 0.21166974688492 0.60405499004016
{{#invoke:random|number}} 0.99741774937018 0.80443063788322
{{#invoke:random|number}} 0.97935813385032 0.37592568731677
{{#invoke:random|number}} 0.11029005893985 0.088048132643126
{{#invoke:random|number}} 0.23752795450274 0.62991415086664
{{#invoke:random|number}} 0.023275956056675 0.0010340297599482
{{#invoke:random|number}} 0.80853519998888 0.20140967760301
{{#invoke:random|number}} 0.0084220892788945 0.15790238797567
{{#invoke:random|number}} 0.72152109757137 0.69976792936203
{{#invoke:random|number}} 0.12178363423878 0.10002951235512
{{#invoke:random|number|1000}} 996 783
{{#invoke:random|number|1000}} 131 477
{{#invoke:random|number|1000}} 866 729
{{#invoke:random|number|1000}} 362 74
{{#invoke:random|number|1000}} 296 525
{{#invoke:random|number|1000}} 311 101
{{#invoke:random|number|1000}} 706 221
{{#invoke:random|number|1000}} 53 831
{{#invoke:random|number|1000}} 617 423
{{#invoke:random|number|1000}} 305 795

Same number

[edit]
Code Main Sandbox
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes|10}} 3 3
{{#invoke:random|number|same=yes|10|20}} 12 12
{{#invoke:random|number|same=yes|500000}} 106823 106823
{{#invoke:random|number|same=yes|-10}} -2 -2
{{#invoke:random|number|same=yes|20|10}} 12 12
{{#invoke:random|number|same=yes|-100|-50}} -90 -90
{{#invoke:random|number|same=yes|6.5}} 2 2
{{#invoke:random|number|same=yes|-6.5}} -1 -1
{{#invoke:random|number|same=yes|-16.5|-6.5}} -14.5 -14.5
Test randomness with the same input
Code Main Sandbox
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes}} 0.90019102157102 0.90019102157102
{{#invoke:random|number|same=yes|1000}} 214 214
{{#invoke:random|number|same=yes|1000}} 214 214
{{#invoke:random|number|same=yes|1000}} 214 214
{{#invoke:random|number|same=yes|1000}} 214 214
{{#invoke:random|number|same=yes|1000}} 214 214
{{#invoke:random|number|same=yes|1000}} 214 214
{{#invoke:random|number|same=yes|1000}} 214 214
{{#invoke:random|number|same=yes|1000}} 214 214
{{#invoke:random|number|same=yes|1000}} 214 214
{{#invoke:random|number|same=yes|1000}} 214 214

Date

[edit]
Code Main Sandbox
{{#invoke:random|date}} 07:57, 31 March 2024 (UTC) 00:42, 26 January 2024 (UTC)
{{#invoke:random|date|1 Jan 2000}} 12:22, 25 March 1989 (UTC) 22:04, 28 April 1970 (UTC)
{{#invoke:random|date|1 Jan 2000|27 July 2176}} 22:47, 14 July 2127 (UTC) 21:52, 15 December 2166 (UTC)
{{#invoke:random|date|1000|2000|format=Y}} 1406 1794
{{#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/04/29 13:29 2024/05/08 10:22

Item

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

List

[edit]
Code Main Sandbox
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}} Lobster Thermidorbaconbeanssausageeggspam Lobster Thermidorbaconspambeanssausageegg
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}} eggbeansLobster Thermidorspambaconsausage beansLobster Thermidoreggbaconspamsausage
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}} spam · sausage · egg · Lobster Thermidor · beans · bacon sausage · beans · Lobster Thermidor · spam · bacon · egg
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}} spam | Lobster Thermidor | bacon | sausage | egg spam | egg | bacon | sausage | beans
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}} sausage, bacon, egg, spam, Lobster Thermidor, beans beans, Lobster Thermidor, bacon, sausage, egg, spam
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}} Lobster Thermidor⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽sausage beans⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽Lobster Thermidor
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}} egg beans Lobster Thermidor spam sausage bacon spam sausage Lobster Thermidor egg beans bacon
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}} spam...bacon...sausage...Lobster Thermidor...egg...beans sausage...Lobster Thermidor...beans...spam...bacon...egg
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}} eggbeansbaconspam eggbaconspamLobster Thermidor

Text list

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

Bulleted list

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

Unbulleted list

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

Horizontal list

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

Ordered list

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

Horizontal ordered list

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