Skip to content

Commit f89da5a

Browse files
committed
update formatting
1 parent 304ac08 commit f89da5a

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

test/model_kit/symbolic_test.jl

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,25 @@
332332

333333
@testset "Convert" begin
334334

335-
@var x
336-
s = x + 1 - x
337-
338-
@test typeof(convert(Int, s)) <: Int
339-
@test typeof(convert(Int32, s)) == Int32
340-
@test typeof(convert(Int64, s)) == Int64
341-
@test typeof(convert(BigInt, s)) == BigInt
342-
@test typeof(convert(BigFloat, s)) == BigFloat
343-
@test typeof(convert(Float64, s)) == Float64
344-
@test typeof(convert(ComplexF64, s)) == ComplexF64
335+
@var x
336+
337+
s = x + 1 - x
338+
@test convert(Int, s) == 1
339+
@test convert(Int32, s) == Int32(1)
340+
@test convert(Int64, s) == Int64(1)
341+
@test convert(BigInt, s) == BigInt(1)
342+
@test convert(BigFloat, s) == BigFloat(1)
343+
@test convert(Float64, s) == Float64(1)
344+
@test convert(ComplexF64, s) == ComplexF64(1)
345+
346+
r = x + 1.0 - x
347+
@test convert(Float64, r) == Float64(1)
348+
@test convert(ComplexF64, r) == ComplexF64(1)
349+
350+
u = x + BigFloat(1.0) - x
351+
@test convert(BigFloat, u) == BigFloat(1.0)
352+
353+
t = x + (1.0 + 0.0im) - x
354+
@test convert(ComplexF64, t) == ComplexF64(1)
345355
end
346356
end

0 commit comments

Comments
 (0)