Skip to content

Commit

Permalink
gigasecond: Fix failing tests (#98)
Browse files Browse the repository at this point in the history
Set the timezone to UTC in the test script.
  • Loading branch information
softmoth authored Sep 21, 2023
1 parent 15249b5 commit 802783e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions exercises/practice/gigasecond/gigasecond-tests.8th
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
5 tests
"date only specification of time" ( [2011, 4, 25, 0, 0, 0, 0] d:join +gigasecond [2043,1, 1,1,46,40,0] d:join d:= ) test_true
"second test for date only specification of time" ( [1977, 6, 13, 0, 0, 0, 0] d:join +gigasecond [2009, 2,19,1,46,40,0] d:join d:= ) test_true
"third test for date only specification of time" ( [1959, 7, 19, 0, 0, 0, 0] d:join +gigasecond [1991, 3,27,1,46,40,0] d:join d:= ) test_true
"full time specified" ( [2015, 1, 24, 22, 0, 0, 0] d:join +gigasecond [2046,10,2,23,46,40,0] d:join d:= ) test_true
"full time with day roll-over" ( [2015, 1, 24, 23, 59, 59, 0] d:join +gigasecond [2046,10,3,1,46,39,0] d:join d:= ) test_true

\ Workaround for https://8th-dev.com/bin/bugs/tktview/624833cc8d
0 d:updatetz

"date only specification of time" ( [2011, 4, 25, 0, 0, 0, 0, 0, 0, 0] d:join +gigasecond [2043,1, 1,1,46,40,0, 0, 0, 0] d:join d:= ) test_true
"second test for date only specification of time" ( [1977, 6, 13, 0, 0, 0, 0, 0, 0, 0] d:join +gigasecond [2009, 2,19,1,46,40,0, 0, 0, 0] d:join d:= ) test_true
"third test for date only specification of time" ( [1959, 7, 19, 0, 0, 0, 0, 0, 0, 0] d:join +gigasecond [1991, 3,27,1,46,40,0, 0, 0, 0] d:join d:= ) test_true
"full time specified" ( [2015, 1, 24, 22, 0, 0, 0, 0, 0, 0] d:join +gigasecond [2046,10,2,23,46,40,0, 0, 0, 0] d:join d:= ) test_true
"full time with day roll-over" ( [2015, 1, 24, 23, 59, 59, 0, 0, 0, 0] d:join +gigasecond [2046,10,3,1,46,39,0, 0, 0, 0] d:join d:= ) test_true

end-of-tests

0 comments on commit 802783e

Please sign in to comment.