blob: 0e060118300430cb7fc21b1bb77beb34596e6e00 [file] [log] [blame]
Check stepMismatch results for number type
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Number type
Empty values
PASS stepMismatchFor("", null, null) is false
PASS stepMismatchFor("", "1.0", "0.1") is false
Integers
PASS stepMismatchFor("1", "2", "0") is true
PASS stepMismatchFor("-3", "2", "-4") is true
PASS input.max = "5"; stepMismatchFor("5", "3", "0") is true
PASS input.value is "5"
Invalid step values
PASS stepMismatchFor("-3", "-2", "-4") is false
PASS stepMismatchFor("-3", null, "-4") is false
PASS stepMismatchFor("-3", undefined, "-4") is false
Huge numbers and small step; uncomparable
PASS stepMismatchFor("3.40282347e+38", "3", "") is false
PASS stepMismatchFor("3.40282346e+38", "3", "") is false
PASS stepMismatchFor("3.40282345e+38", "3", "") is false
Huge numbers and huge step
PASS stepMismatchFor("3.20e+38", "0.20e+38", "") is false
PASS stepMismatchFor("3.20e+38", "0.22e+38", "") is true
Fractional numbers
PASS stepMismatchFor("0.9", "0.1", "") is false
PASS stepMismatchFor("0.9", "0.1000001", "") is true
PASS stepMismatchFor("0.9", "0.1000000000000001", "") is false
PASS stepMismatchFor("1.0", "0.3333333333333333", "") is false
Rounding
PASS stepMismatchFor("5.005", "0.005", "4") is false
Disabled
PASS stepMismatchFor("1", "2", "0", true) is false
PASS successfullyParsed is true
TEST COMPLETE