Skip to content

Commit d763455

Browse files
authored
Merge pull request #234 from kahgoh/fix/gigasecond
Fix time parsing in gigasecond tests
2 parents e0e8ef1 + 3b112ec commit d763455

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

exercises/practice/gigasecond/run_test.v

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@ module main
33
import time
44

55
fn test_date_specified_of_time() {
6-
assert add_gigasecond(time.parse_rfc3339('2011-04-25')!) == time.parse_rfc3339('2043-01-01T01:46:40')!
6+
assert add_gigasecond(time.parse_iso8601('2011-04-25')!) == time.parse_iso8601('2043-01-01T01:46:40')!
77
}
88

99
fn test_second_date_specified_of_time() {
10-
assert add_gigasecond(time.parse_rfc3339('1977-06-13')!) == time.parse_rfc3339('2009-02-19T01:46:40')!
10+
assert add_gigasecond(time.parse_iso8601('1977-06-13')!) == time.parse_iso8601('2009-02-19T01:46:40')!
1111
}
1212

1313
fn test_third_date_specified_of_time() {
14-
assert add_gigasecond(time.parse_rfc3339('1959-07-19')!) == time.parse_rfc3339('1991-03-27T01:46:40')!
14+
assert add_gigasecond(time.parse_iso8601('1959-07-19')!) == time.parse_iso8601('1991-03-27T01:46:40')!
1515
}
1616

1717
fn test_full_time_specified() {
18-
assert add_gigasecond(time.parse_rfc3339('2015-01-24T22:00:00')!) == time.parse_rfc3339('2046-10-02T23:46:40')!
18+
assert add_gigasecond(time.parse_iso8601('2015-01-24T22:00:00')!) == time.parse_iso8601('2046-10-02T23:46:40')!
1919
}
2020

2121
fn test_full_time_with_day_roll_over() {
22-
assert add_gigasecond(time.parse_rfc3339('2015-01-24T23:59:59')!) == time.parse_rfc3339('2046-10-03T01:46:39')!
22+
assert add_gigasecond(time.parse_iso8601('2015-01-24T23:59:59')!) == time.parse_iso8601('2046-10-03T01:46:39')!
2323
}
2424

2525
fn test_immutable() {
26-
moment := time.parse_rfc3339('2015-01-24T23:59:59')!
26+
moment := time.parse_iso8601('2015-01-24T23:59:59')!
2727
res := add_gigasecond(moment)
28-
assert moment == time.parse_rfc3339('2015-01-24T23:59:59')!
28+
assert moment == time.parse_iso8601('2015-01-24T23:59:59')!
2929
}

0 commit comments

Comments
 (0)