Skip to content

Commit 92d2a41

Browse files
authored
Add tests for AsArrayRef/AsArrayMut impls on Array (#192)
1 parent 56ec07c commit 92d2a41

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/traits.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,16 @@ mod tests {
219219
assert_eq!([1, 2, 3].as_array_mut(), &Array([1, 2, 3]));
220220
}
221221

222+
#[test]
223+
fn hybrid_as_array_ref() {
224+
assert_eq!(A::from([1, 2]).as_array_ref(), &Array([1, 2]));
225+
}
226+
227+
#[test]
228+
fn hybrid_as_array_mut() {
229+
assert_eq!(A::from([1, 2]).as_array_mut(), &Array([1, 2]));
230+
}
231+
222232
#[test]
223233
fn slice_as_hybrid_array() {
224234
assert_eq!([1, 2].as_hybrid_array::<U3>(), None);

0 commit comments

Comments
 (0)