| Check stepMismatch results for type=date. |
| |
| 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-31") is false |
| Normal step values |
| PASS stepMismatchFor("2010-02-10", "2", "2010-02-09") is true |
| PASS stepMismatchFor("2010-02-09", "2", "2010-02-09") is false |
| PASS stepMismatchFor("2010-02-11", "2", "2010-02-09") is false |
| PASS stepMismatchFor("1800-11-11", "3", "1800-11-09") is true |
| PASS stepMismatchFor("1800-11-09", "3", "1800-11-09") is false |
| PASS stepMismatchFor("1800-11-12", "3", "1800-11-09") is false |
| PASS stepMismatchFor("275760-09-13", "3", "275760-09-11") is true |
| PASS stepMismatchFor("275760-09-13", "2", "275760-09-11") is false |
| Implicit step base |
| PASS stepMismatchFor("1970-01-02", "2", null) is true |
| PASS stepMismatchFor("1970-01-03", "2", null) is false |
| Fractional step values |
| PASS stepMismatchFor("2010-02-10", "0.1", "2010-02-09") is false |
| PASS stepMismatchFor("2010-02-10", "1.1", "2010-02-09") is false |
| PASS stepMismatchFor("2010-02-10", "1.9", "2010-02-09") is true |
| Invalid or no step values |
| PASS stepMismatchFor("2010-02-10", null, "2010-02-09") is false |
| PASS stepMismatchFor("2010-02-10", "-1", "2010-02-09") is false |
| PASS stepMismatchFor("2010-02-10", "foo", "2010-02-09") is false |
| Special step value |
| PASS stepMismatchFor("2010-02-10", "any", "2010-02-09") is false |
| Disabled |
| PASS stepMismatchFor("2010-02-10", "2", "2010-02-09", true) is false |
| |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |