mirror of
https://github.com/sharkdp/bat
synced 2024-11-23 20:33:06 +00:00
fix: rewrite overflow test using usize::MAX
This commit is contained in:
parent
4382be5e7c
commit
0937d575fd
1 changed files with 3 additions and 3 deletions
|
@ -130,9 +130,9 @@ fn test_parse_plus() {
|
|||
|
||||
#[test]
|
||||
fn test_parse_plus_overflow() {
|
||||
let range = LineRange::from("18446744073709551615:+1").expect("Shouldn't fail on test!");
|
||||
assert_eq!(18446744073709551615, range.lower);
|
||||
assert_eq!(18446744073709551615, range.upper);
|
||||
let range = LineRange::from(&format!("{}:+1", usize::MAX)).expect("Shouldn't fail on test!");
|
||||
assert_eq!(usize::MAX, range.lower);
|
||||
assert_eq!(usize::MAX, range.upper);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue