Skip to content

Commit 2fa3af5

Browse files
committed
ixdyn: Add test for new Array::default()
1 parent 022e379 commit 2fa3af5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/array.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,14 @@ fn test_default() {
10721072
assert_eq!(b, arr0(Foo::default()));
10731073
}
10741074

1075+
#[test]
1076+
fn test_default_ixdyn() {
1077+
let a = <Array<f32, IxDyn> as Default>::default();
1078+
let b = <Array<f32, _>>::zeros(IxDyn(&[0]));
1079+
assert_eq!(a, b);
1080+
}
1081+
1082+
10751083
#[test]
10761084
fn test_map_axis() {
10771085
let a = arr2(&[[1, 2, 3],

0 commit comments

Comments
 (0)