Skip to content

Commit f2a5c83

Browse files
test: add edge case for initialization test
1 parent 0dd0f7c commit f2a5c83

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/ModelingToolkitBase/test/initializationsystem.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,11 @@ end
15241524
prob.ps[Initial(y[1])] = 0.5
15251525
integ = init(prob, Tsit5(); abstol = 1.0e-6, reltol = 1.0e-6)
15261526
@test integ[x] 0.5
1527-
@test integ[y] [0.5, sqrt(3.5)] atol = 1.0e-6
1527+
if VERSION < v"1.11" && !@isdefined(ModelingToolkit) # on lts with MTKBase, this flips sign
1528+
@test integ[y] [0.5, -sqrt(3.5)] atol = 1.0e-6
1529+
else
1530+
@test integ[y] [0.5, sqrt(3.5)] atol = 1.0e-6
1531+
end
15281532
end
15291533

15301534
@testset "Issue#3342" begin

0 commit comments

Comments
 (0)