blob: e3f6733c3eb13619b9c4d776ae5f99be0fc1ae30 [file] [log] [blame]
Check stepUp() and stepDown() bahevior for type=week.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Invalid value
PASS stepUp("", null, null) threw exception InvalidStateError: The object is in an invalid state..
PASS stepDown("", null, null) threw exception InvalidStateError: The object is in an invalid state..
Non-number arguments
PASS stepUp("2010-W02", null, null, "0") is "2010-W02"
PASS stepDown("2010-W02", null, null, "0") is "2010-W02"
PASS stepUp("2010-W02", null, null, "foo") is "2010-W02"
PASS stepDown("2010-W02", null, null, "foo") is "2010-W02"
PASS stepUp("2010-W02", null, null, null) is "2010-W02"
PASS stepDown("2010-W02", null, null, null) is "2010-W02"
Normal cases
PASS stepUp("2010-W02", null, null) is "2010-W03"
PASS stepDown("2010-W02", null, null) is "2010-W01"
PASS stepUp("2010-W02", null, null, 10) is "2010-W12"
PASS stepDown("2010-W02", null, null, 11) is "2009-W44"
PASS stepUp("1970-W01", "4", null, 2) is "1970-W09"
PASS stepDown("1970-W01", "4", null, 3) is "1969-W41"
Step=any
PASS stepUp("2010-W02", "any", null) threw exception InvalidStateError: The object is in an invalid state..
PASS stepDown("2010-W02", "any", null) threw exception InvalidStateError: The object is in an invalid state..
Overflow/underflow
PASS stepUp("2010-W02", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..
PASS stepDown("2010-W02", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..
PASS stepUp("2010-W02", "1", "2010-W02") threw exception InvalidStateError: The object is in an invalid state..
PASS stepDown("2010-W02", "1", "2010-W02") threw exception InvalidStateError: The object is in an invalid state..
PASS successfullyParsed is true
TEST COMPLETE