Skip to content

Commit a7528e7

Browse files
committed
Improve core::array coverage
1 parent 565a9ca commit a7528e7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

library/coretests/tests/array.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,3 +717,10 @@ fn array_map_drops_unmapped_elements_on_panic() {
717717
assert_eq!(counter.load(Ordering::SeqCst), MAX);
718718
}
719719
}
720+
721+
// This covers the `PartialEq::<[T]>::eq` impl for `[T; N]` when it returns false.
722+
#[test]
723+
fn array_eq() {
724+
let not_true = [0u8] == [].as_slice();
725+
assert!(!not_true);
726+
}

0 commit comments

Comments
 (0)