mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
add windows
count test
This commit is contained in:
parent
7f3dc04644
commit
24aa45c95e
@ -739,6 +739,10 @@ fn test_array_windows_count() {
|
||||
let v3: &[i32] = &[];
|
||||
let c3 = v3.array_windows::<2>();
|
||||
assert_eq!(c3.count(), 0);
|
||||
|
||||
let v4: &[()] = &[(); usize::MAX];
|
||||
let c4 = v4.array_windows::<1>();
|
||||
assert_eq!(c4.count(), usize::MAX);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -1050,6 +1054,10 @@ fn test_windows_count() {
|
||||
let v3: &[i32] = &[];
|
||||
let c3 = v3.windows(2);
|
||||
assert_eq!(c3.count(), 0);
|
||||
|
||||
let v4 = &[(); usize::MAX];
|
||||
let c4 = v4.windows(1);
|
||||
assert_eq!(c4.count(), usize::MAX);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user