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 4, 2017
1 parent b1077d6 commit 204a150
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 @@ -1072,6 +1072,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 204a150

Please sign in to comment.