mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 19:32:25 +01:00
fix: rewrite overflow test using usize::MAX
This commit is contained in:
@@ -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]
|
||||||
|
Reference in New Issue
Block a user