Skip to content

Commit 38460e0

Browse files
committed
Improve multislice! tests
1 parent 51152dd commit 38460e0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/array.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use ndarray::prelude::*;
99
use ndarray::{
1010
rcarr2,
1111
arr3,
12+
multislice,
1213
};
1314
use ndarray::indices;
1415
use defmac::defmac;
@@ -334,14 +335,14 @@ fn test_multislice() {
334335
{
335336
let copy = arr.clone();
336337
assert_eq!(
337-
multislice!(arr, (mut s1, mut s2)),
338+
multislice!(arr, (mut s1, mut s2,)),
338339
(copy.clone().slice_mut(s1), copy.clone().slice_mut(s2))
339340
);
340341
}
341342
{
342343
let copy = arr.clone();
343344
assert_eq!(
344-
multislice!(arr, (mut s1, s2)),
345+
multislice!(arr, (mut s1, s2,)),
345346
(copy.clone().slice_mut(s1), copy.clone().slice(s2))
346347
);
347348
}
@@ -362,6 +363,7 @@ fn test_multislice() {
362363
});
363364
let mut arr = Array1::from_iter(0..48).into_shape((8, 6)).unwrap();
364365

366+
assert_eq!((arr.clone().view(),), multislice!(arr, (s![.., ..],)));
365367
test_multislice!(&mut arr, s![0, ..], s![1, ..]);
366368
test_multislice!(&mut arr, s![0, ..], s![-1, ..]);
367369
test_multislice!(&mut arr, s![0, ..], s![1.., ..]);

0 commit comments

Comments
 (0)