update tests

This commit is contained in:
llama 2025-05-17 01:41:46 +08:00
parent b9eeb891df
commit 668bde7f80
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3

View file

@ -1334,7 +1334,8 @@ c.odue != 0 then c.odue else c.due end) != {days}) or (c.queue in (1,4) and
#[allow(clippy::single_range_in_vec_init)]
#[test]
fn ranges() {
assert_eq!([1, 2, 3].collect_ranges(), [1..4]);
assert_eq!([1, 3, 4].collect_ranges(), [1..2, 3..5]);
assert_eq!([1, 2, 3].collect_ranges(true), [1..4]);
assert_eq!([1, 3, 4].collect_ranges(true), [1..2, 3..5]);
assert_eq!([1, 2, 5, 6].collect_ranges(false), [1..2, 2..3, 5..6, 6..7]);
}
}