Skip to content

Commit

Permalink
ixdyn: Add test for new Array::default()
Browse files Browse the repository at this point in the history
  • Loading branch information
bluss committed Apr 3, 2017
1 parent 949aca7 commit 3478e9f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,14 @@ fn test_default() {
assert_eq!(b, arr0(Foo::default()));
}

#[test]
fn test_default_ixdyn() {
let a = <Array<f32, IxDyn> as Default>::default();
let b = Array::<f32, _>::zeros(IxDyn(&[0]));
assert_eq!(a, b);
}


#[test]
fn test_map_axis() {
let a = arr2(&[[1, 2, 3],
Expand Down

0 comments on commit 3478e9f

Please sign in to comment.