Skip to content

Commit 866ed52

Browse files
authored
fix(tests): replace ms modulo checks with ms_part for pre-epoch year bounds
Updated assertions to check millisecond parts for year boundaries.
1 parent 63b1802 commit 866ed52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/time_conversions_coverage_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ int main() {
166166

167167
// Calendar invariants for ms boundaries:
168168
assert(y0 <= t && t <= y1);
169-
assert((y0 % MS_PER_SEC) == 0);
170-
assert((y1 % MS_PER_SEC) == (MS_PER_SEC - 1));
169+
assert(ms_part(y0) == 0);
170+
assert(ms_part(y1) == (MS_PER_SEC - 1));
171171
}
172172
const ts_t before_epoch = to_timestamp(1969, 12, 31, 23, 59, 59);
173173
assert(start_of_year(before_epoch) == to_timestamp(1969, 1, 1));

0 commit comments

Comments
 (0)