Skip to content

Commit 76694c3

Browse files
committed
Move Array’s From test to array-construct.rs
1 parent b503059 commit 76694c3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/array-construct.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ fn test_from_shape_fn() {
1010
|(i, j)| f64::sin(i as f64 / step) * f64::cos(j as f64 / step));
1111
assert_eq!(h.shape(), &[5, 5]);
1212
}
13+
14+
#[test]
15+
fn test_dimension_zero() {
16+
let a: Array2<f32> = Array2::from(vec![[], [], []]);
17+
assert_eq!(vec![0.; 0], a.into_raw_vec());
18+
let a: Array3<f32> = Array3::from(vec![[[]], [[]], [[]]]);
19+
assert_eq!(vec![0.; 0], a.into_raw_vec());
20+
}

tests/array.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,11 +1112,3 @@ fn test_array_clone_same_view() {
11121112
let b = a.clone();
11131113
assert_eq!(a, b);
11141114
}
1115-
1116-
#[test]
1117-
fn test_dimension_zero() {
1118-
let a: Array2<f32> = arr2(&[[], [], []]);
1119-
assert_eq!(vec![0.; 0], a.into_raw_vec());
1120-
let a: Array3<f32> = arr3(&[[[]], [[]], [[]]]);
1121-
assert_eq!(vec![0.; 0], a.into_raw_vec());
1122-
}

0 commit comments

Comments
 (0)