blob: a00738eef764c5389fccc1a1246afa76b53d2159 [file] [log] [blame]
Check stepMismatch results for type=month.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Empty values
PASS stepMismatchFor("", null, null) is false
PASS stepMismatchFor("", "2", "1969-12") is false
Normal step values
PASS stepMismatchFor("2010-03", "2", "2010-02") is true
PASS stepMismatchFor("2010-02", "2", "2010-02") is false
PASS stepMismatchFor("2010-04", "2", "2010-02") is false
PASS stepMismatchFor("1800-11", "3", "1800-09") is true
PASS stepMismatchFor("1800-09", "3", "1800-09") is false
PASS stepMismatchFor("1800-12", "3", "1800-09") is false
PASS stepMismatchFor("275760-09", "3", "275760-08") is true
PASS stepMismatchFor("275760-09", "2", "275760-09") is false
Implicit step base
PASS stepMismatchFor("1970-02", "2", null) is true
PASS stepMismatchFor("1970-03", "2", null) is false
Fractional step values
PASS stepMismatchFor("2010-03", "0.1", "2010-02") is false
PASS stepMismatchFor("2010-03", "1.1", "2010-02") is false
PASS stepMismatchFor("2010-03", "1.9", "2010-02") is true
Invalid or no step values
PASS stepMismatchFor("2010-03", null, "2010-02") is false
PASS stepMismatchFor("2010-03", "-1", "2010-02") is false
PASS stepMismatchFor("2010-03", "foo", "2010-02") is false
Special step value
PASS stepMismatchFor("2010-03", "any", "2010-02") is false
Disabled
PASS stepMismatchFor("2010-03", "2", "2010-02", true) is false
PASS successfullyParsed is true
TEST COMPLETE