Jump to content

Module:Params/testcases/tnumerical/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Grufo (talk | contribs) at 03:18, 27 May 2024 (+Category). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This test template allows to test the behaviour of functions that focus on numerical and sequential arguments. As these require at most two arguments, this template uses the |#first= and |#second= special parameters to do its tests.

Usage

For instance,

{{module:params/testcases/tnumerical
	| #first = 2
	| #second = 2
	| -2 = minus two
	| 0 = zero
	| 1 = one
	| 2 = two
	| 3 = three
	| 19 = nineteen
	| 20 = twenty
}}

generates

Function name Result for |#first=2 and |#second=2
squeezing |1=minus two|2=zero|3=one|4=two|5=three|6=nineteen|7=twenty
filling_the_gaps |-2=minus two|-1=|0=zero|1=one|2=two|3=three|4=|5=|6=|7=|8=|9=|10=|11=|12=|13=|14=|15=|16=|17=|18=|19=nineteen|20=twenty
clearing |1=one|2=two|3=three
cutting|2|2] |-2=minus two|0=zero|16=nineteen|17=twenty
cropping|2|2 |0=zero|1=one|2=two|3=three
purging|2|2 |-2=minus two|0=zero|1=one|17=nineteen|18=twenty
backpurging|2|2 |-2=minus two|0=zero|1=three|17=nineteen|18=twenty
rotating Lua error: Module:Params: The function ‘rotating’ does not exist.
sorting_sequential_values |-2=minus two|0=zero|1=one|2=three|3=two|19=nineteen|20=twenty