Skip to content

Commit d3b3b79

Browse files
committed
Add test of float(Complex)
1 parent 2de5428 commit d3b3b79

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/complex.jl

+3
Original file line numberDiff line numberDiff line change
@@ -753,3 +753,6 @@ end
753753
@test round([1:5] + im) == [1:5] + im
754754
@test round([1:5] + 0.5im) == [1.0:5.0]
755755

756+
# float #8291
757+
@test float(Complex(1, 2)) == Complex(1.0, 2.0)
758+
@test round(float(Complex(π, e)),3) == Complex(3.142, 2.718)

0 commit comments

Comments
 (0)