Skip to content

Commit a681d56

Browse files
munckymagikLukeMathWalker
authored andcommitted
Move deviation test (#56)
Moves a test that checks a common quality with the other tests that check common qualities.
1 parent 0424240 commit a681d56

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

tests/deviation.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,6 @@ use num_traits::Float;
88

99
use std::f64;
1010

11-
#[test]
12-
fn test_deviation_computation_for_mixed_ownership() {
13-
// It's enough to check that the code compiles!
14-
let a = array![0., 0.];
15-
let b = array![1., 0.];
16-
17-
let _ = a.count_eq(&b.view());
18-
let _ = a.count_neq(&b.view());
19-
let _ = a.l2_dist(&b.view());
20-
let _ = a.sq_l2_dist(&b.view());
21-
let _ = a.l1_dist(&b.view());
22-
let _ = a.linf_dist(&b.view());
23-
let _ = a.mean_abs_err(&b.view());
24-
let _ = a.mean_sq_err(&b.view());
25-
let _ = a.root_mean_sq_err(&b.view());
26-
let _ = a.peak_signal_to_noise_ratio(&b.view(), 10.);
27-
}
28-
2911
#[test]
3012
fn test_count_eq() -> Result<(), MultiInputError> {
3113
let a = array![0., 0.];
@@ -268,3 +250,21 @@ fn test_deviations_with_non_copyable() -> Result<(), MultiInputError> {
268250

269251
Ok(())
270252
}
253+
254+
#[test]
255+
fn test_deviation_computation_for_mixed_ownership() {
256+
// It's enough to check that the code compiles!
257+
let a = array![0., 0.];
258+
let b = array![1., 0.];
259+
260+
let _ = a.count_eq(&b.view());
261+
let _ = a.count_neq(&b.view());
262+
let _ = a.l2_dist(&b.view());
263+
let _ = a.sq_l2_dist(&b.view());
264+
let _ = a.l1_dist(&b.view());
265+
let _ = a.linf_dist(&b.view());
266+
let _ = a.mean_abs_err(&b.view());
267+
let _ = a.mean_sq_err(&b.view());
268+
let _ = a.root_mean_sq_err(&b.view());
269+
let _ = a.peak_signal_to_noise_ratio(&b.view(), 10.);
270+
}

0 commit comments

Comments
 (0)