Skip to content

Commit 5258dfc

Browse files
authored
Rollup merge of #146425 - ferrocene:pvdrz/improve-array-coverage, r=workingjubilee
Improve `core::array` coverage This PR improves the `core::array` coverage by adding new tests to `coretests`
2 parents 8184027 + a7528e7 commit 5258dfc

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)