Skip to content

Commit 664b188

Browse files
committed
Improve coverage
1 parent d84bb6a commit 664b188

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/unittests.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,14 @@ end
821821

822822
@testset "Complex numbers" begin
823823
for Q in (RealQuantity, Quantity, GenericQuantity)
824-
# Bool stuff
824+
x = 1.0im
825+
y = Q(0.5u"m")
826+
@test typeof(x * y) == with_type_parameters(promote_quantity_on_value(Q, ComplexF64), Complex{Float64}, DEFAULT_DIM_TYPE)
827+
@test typeof(y * x) == with_type_parameters(promote_quantity_on_value(Q, ComplexF64), Complex{Float64}, DEFAULT_DIM_TYPE)
828+
@test ustrip(x * y) == 0.5im
829+
@test ustrip(y * x) == 0.5im
830+
831+
# Bool version
825832
x = true * im
826833
y = Q(0.5u"m")
827834
@test typeof(x * y) == with_type_parameters(promote_quantity_on_value(Q, ComplexF64), Complex{Float64}, DEFAULT_DIM_TYPE)

0 commit comments

Comments
 (0)