Skip to content

Commit 84b6ae8

Browse files
termoshttcuviper
authored andcommitted
Change test case to check result
1 parent f549f30 commit 84b6ae8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,15 +1961,15 @@ mod test {
19611961

19621962
#[test]
19631963
fn test_sum() {
1964-
let v = vec![_0_1i, _4_2i, _1_0i, _1_1i];
1965-
let _: Complex64 = v.iter().sum();
1966-
let _: Complex64 = v.into_iter().sum();
1964+
let v = vec![_0_1i, _1_0i];
1965+
assert_eq!(v.iter().sum::<Complex64>(), _1_1i);
1966+
assert_eq!(v.into_iter().sum::<Complex64>(), _1_1i);
19671967
}
19681968

19691969
#[test]
19701970
fn test_prod() {
1971-
let v = vec![_0_1i, _4_2i, _1_0i, _1_1i];
1972-
let _: Complex64 = v.iter().product();
1973-
let _: Complex64 = v.into_iter().product();
1971+
let v = vec![_0_1i, _1_0i];
1972+
assert_eq!(v.iter().product::<Complex64>(), _0_1i);
1973+
assert_eq!(v.into_iter().product::<Complex64>(), _0_1i);
19741974
}
19751975
}

0 commit comments

Comments
 (0)