File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed
test/simulation_and_solving Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change 167
167
# Checks that solution values have types consistent with their input types.
168
168
# Check that both float types are preserved in the solution (and problems), while integers are
169
169
# promoted to floats.
170
- # Checks that the time types are correct (`Float64` by default or possibly `Float32`), however,
171
- # type conversion only occurs in the solution, and integer types are preserved in problems.
170
+ # Checks that the time types are correct (`Float64` by default or possibly `Float32`).
172
171
let
173
172
# Create model. Checks when input type is `Float64` the produced values are also `Float64`.
174
173
rn = @reaction_network begin
188
187
osol = solve (oprob)
189
188
@test eltype (osol[:X1 ]) == eltype (osol[:X2 ]) == typeof (oprob[:X1 ]) == typeof (oprob[:X2 ]) == Float64
190
189
@test eltype (osol. t) == Float64
191
- @test typeof (oprob. tspan[1 ]) == typeof (oprob. tspan[2 ]) == Int64
192
190
193
191
# Checks when values are `Float32` (a valid type and should be preserved).
194
192
u0 = [:X1 => 1.0f0 , :X2 => 3.0f0 ]
Original file line number Diff line number Diff line change 407
407
ssol = solve (sprob, ISSEM ())
408
408
@test eltype (ssol[:X1 ]) == eltype (ssol[:X2 ]) == typeof (sprob[:X1 ]) == typeof (sprob[:X2 ]) == Float64
409
409
@test eltype (ssol. t) == Float64
410
- @test typeof (sprob. tspan[1 ]) == typeof (sprob. tspan[2 ]) == Int64
411
410
412
411
# Checks when values are `Float32` (a valid type and should be preserved).
413
412
u0 = [:X1 => 1.0f0 , :X2 => 3.0f0 ]
You can’t perform that action at this time.
0 commit comments