We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfcb6ea commit a20e33dCopy full SHA for a20e33d
1 file changed
src/lib.rs
@@ -2649,4 +2649,15 @@ mod test {
2649
c.set_one();
2650
assert!(c.is_one());
2651
}
2652
+
2653
+ #[cfg(has_const_fn)]
2654
+ #[test]
2655
+ fn test_const() {
2656
+ const R: f64 = 12.3;
2657
+ const I: f64 = -4.5;
2658
+ const C: Complex64 = Complex::new(R, I);
2659
2660
+ assert_eq!(C.re, 12.3);
2661
+ assert_eq!(C.im, -4.5);
2662
+ }
2663
0 commit comments