| Check stepUp() and stepDown() bahevior for type=month. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| Invalid value |
| PASS stepUp("", null, null) is "1970-02" |
| PASS stepDown("", null, null) is "1969-12" |
| Non-number arguments |
| PASS stepUp("2010-02", null, null, "0") is "2010-02" |
| PASS stepDown("2010-02", null, null, "0") is "2010-02" |
| PASS stepUp("2010-02", null, null, "foo") is "2010-02" |
| PASS stepDown("2010-02", null, null, "foo") is "2010-02" |
| PASS stepUp("2010-02", null, null, null) is "2010-02" |
| PASS stepDown("2010-02", null, null, null) is "2010-02" |
| Normal cases |
| PASS stepUp("2010-02", null, null) is "2010-03" |
| PASS stepDown("2010-02", null, null) is "2010-01" |
| PASS stepUp("2010-02", null, null, 10) is "2010-12" |
| PASS stepDown("2010-02", null, null, 11) is "2009-03" |
| PASS stepUp("1970-01", "4", null, 2) is "1970-09" |
| PASS stepDown("1970-01", "4", null, 3) is "1969-01" |
| Step=any |
| PASS stepUp("2010-02", "any", null) threw exception InvalidStateError: The object is in an invalid state.. |
| PASS stepDown("2010-02", "any", null) threw exception InvalidStateError: The object is in an invalid state.. |
| Overflow/underflow |
| PASS stepUp("2010-02", "3.40282346e+38", null) is "2010-02" |
| PASS stepDown("2010-02", "3.40282346e+38", null) is "1970-01" |
| PASS stepUp("2010-02", "1", "2010-02") is "2010-02" |
| PASS stepDown("2010-02", "1", "2010-02") is "2010-02" |
| |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |