Skip to content

Commit

Permalink
Fix invalid offset hour diagnostic test
Browse files Browse the repository at this point in the history
This was overlooked when changing the supported range of values.
  • Loading branch information
jhpratt committed Mar 30, 2024
1 parent f04a28f commit d279d8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/compile-fail/invalid_offset.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use time::macros::offset;

fn main() {
let _ = offset!(+24);
let _ = offset!(+26);
let _ = offset!(+0:60);
let _ = offset!(+0:00:60);
let _ = offset!(0);
Expand Down
6 changes: 6 additions & 0 deletions tests/compile-fail/invalid_offset.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
error: invalid component: hour was 26
--> ../tests/compile-fail/invalid_offset.rs:4:22
|
4 | let _ = offset!(+26);
| ^^

error: invalid component: minute was 60
--> ../tests/compile-fail/invalid_offset.rs:5:24
|
Expand Down

0 comments on commit d279d8d

Please sign in to comment.