We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5e53fb commit f549f30Copy full SHA for f549f30
src/lib.rs
@@ -1958,4 +1958,18 @@ mod test {
1958
test("1i - 2i");
1959
test("+ 1 - 3.0i");
1960
}
1961
+
1962
+ #[test]
1963
+ 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();
1967
+ }
1968
1969
1970
+ fn test_prod() {
1971
1972
+ let _: Complex64 = v.iter().product();
1973
+ let _: Complex64 = v.into_iter().product();
1974
1975
0 commit comments