Skip to content

Commit 3478e9f

Browse files
committed
ixdyn: Add test for new Array::default()
1 parent 949aca7 commit 3478e9f

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
@@ -1065,6 +1065,14 @@ fn test_default() {
10651065
assert_eq!(b, arr0(Foo::default()));
10661066
}
10671067

1068+
#[test]
1069+
fn test_default_ixdyn() {
1070+
let a = <Array<f32, IxDyn> as Default>::default();
1071+
let b = Array::<f32, _>::zeros(IxDyn(&[0]));
1072+
assert_eq!(a, b);
1073+
}
1074+
1075+
10681076
#[test]
10691077
fn test_map_axis() {
10701078
let a = arr2(&[[1, 2, 3],

0 commit comments

Comments
 (0)