mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-31 10:11:07 +00:00
fix: rewrite overflow test using usize::MAX
This commit is contained in:
parent
4382be5e7c
commit
0937d575fd
@ -130,9 +130,9 @@ fn test_parse_plus() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_plus_overflow() {
|
fn test_parse_plus_overflow() {
|
||||||
let range = LineRange::from("18446744073709551615:+1").expect("Shouldn't fail on test!");
|
let range = LineRange::from(&format!("{}:+1", usize::MAX)).expect("Shouldn't fail on test!");
|
||||||
assert_eq!(18446744073709551615, range.lower);
|
assert_eq!(usize::MAX, range.lower);
|
||||||
assert_eq!(18446744073709551615, range.upper);
|
assert_eq!(usize::MAX, range.upper);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user