Jump to content

Module:Random/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 02:44, 28 November 2013 (add item test cases). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Number

Code Main Sandbox
{{#invoke:random|number}} 0.90405188310149 0.95494723224777
{{#invoke:random|number|10}} 3 1
{{#invoke:random|number|10|20}} 20 17
{{#invoke:random|number|500000}} 269861 120190
{{#invoke:random|number|-10}} 0 -4
{{#invoke:random|number|20|10}} 15 18
{{#invoke:random|number|-100|-50}} -72 -81
{{#invoke:random|number|6.5}} 2 5
{{#invoke:random|number|-6.5}} -2 -1
{{#invoke:random|number|-16.5|-6.5}} -16.5 -12.5

Date

Code Main Sandbox
{{#invoke:random|date}} 07:01, 27 March 2025 (UTC) 05:37, 07 June 2025 (UTC)
{{#invoke:random|date|1 Jan 2000}} 22:38, 31 January 1980 (UTC) 06:49, 05 April 1977 (UTC)
{{#invoke:random|date|1 Jan 2000|27 July 2176}} 08:52, 20 May 2123 (UTC) 12:19, 16 January 2008 (UTC)
{{#invoke:random|date|1000|2000|format=Y}} 1831 1652
{{#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}} 2025/04/25 10:39 2025/05/04 01:54

Item

Code Main Sandbox
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor aux crevettes}} sausage Lobster Thermidor aux crevettes
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor aux crevettes}} egg Lobster Thermidor aux crevettes