From 3478e9f35eae361d821c3b6a6e94e15b07e794cd Mon Sep 17 00:00:00 2001 From: bluss Date: Mon, 3 Apr 2017 23:24:42 +0200 Subject: [PATCH] ixdyn: Add test for new Array::default() --- tests/array.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/array.rs b/tests/array.rs index be4254b30..82da47bef 100644 --- a/tests/array.rs +++ b/tests/array.rs @@ -1065,6 +1065,14 @@ fn test_default() { assert_eq!(b, arr0(Foo::default())); } +#[test] +fn test_default_ixdyn() { + let a = as Default>::default(); + let b = Array::::zeros(IxDyn(&[0])); + assert_eq!(a, b); +} + + #[test] fn test_map_axis() { let a = arr2(&[[1, 2, 3],