add test for max value
This commit is contained in:
parent
328818934b
commit
65c876f2d3
@ -205,6 +205,14 @@ fn test_range_inclusive() {
|
||||
check(map.range(-1...2), vec![(&0, &0), (&1, &1), (&2, &2)]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_range_inclusive_max_value() {
|
||||
let max = ::std::usize::MAX;
|
||||
let map: BTreeMap<_, _> = vec![(max, 0)].into_iter().collect();
|
||||
|
||||
assert_eq!(map.range(max...max).collect::<Vec<_>>(), &[(&max, &0)]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_range_equal_empty_cases() {
|
||||
let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
|
||||
|
Loading…
x
Reference in New Issue
Block a user