Skip to content

Commit 40ed431

Browse files
committed
Change test case to check result
1 parent 64e48df commit 40ed431

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
@@ -1938,15 +1938,15 @@ mod test {
19381938

19391939
#[test]
19401940
fn test_sum() {
1941-
let v = vec![_0_1i, _4_2i, _1_0i, _1_1i];
1942-
let _: Complex64 = v.iter().sum();
1943-
let _: Complex64 = v.into_iter().sum();
1941+
let v = vec![_0_1i, _1_0i];
1942+
assert_eq!(v.iter().sum::<Complex64>(), _1_1i);
1943+
assert_eq!(v.into_iter().sum::<Complex64>(), _1_1i);
19441944
}
19451945

19461946
#[test]
19471947
fn test_prod() {
1948-
let v = vec![_0_1i, _4_2i, _1_0i, _1_1i];
1949-
let _: Complex64 = v.iter().product();
1950-
let _: Complex64 = v.into_iter().product();
1948+
let v = vec![_0_1i, _1_0i];
1949+
assert_eq!(v.iter().product::<Complex64>(), _0_1i);
1950+
assert_eq!(v.into_iter().product::<Complex64>(), _0_1i);
19511951
}
19521952
}

0 commit comments

Comments
 (0)