Skip to content

Commit 0d83b27

Browse files
committed
More tests
1 parent b92b9ee commit 0d83b27

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/odesystem.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ end
641641
#issue 1475 (mixed numeric type for parameters)
642642
let
643643
@parameters k1 k2
644-
@variables t, A(t)
644+
@variables t A(t)
645645
D = Differential(t)
646646
eqs = [D(A) ~ -k1*k2*A]
647647
@named sys = ODESystem(eqs,t)
@@ -655,6 +655,11 @@ let
655655
tspan = (0.0,1.0)
656656
prob = ODEProblem(sys, u0map, tspan, pmap)
657657
@test eltype(prob.p) === Float64
658+
659+
pmap = Pair{Any,Union{Int,Float64}}[k1 => 1, k2 => 1.0]
660+
tspan = (0.0,1.0)
661+
prob = ODEProblem(sys, u0map, tspan, pmap, use_union=true)
662+
@test eltype(prob.p) === Union{Float64,Int}
658663
end
659664

660665
let

0 commit comments

Comments
 (0)