Skip to content

Commit 66f1d31

Browse files
committed
add test
1 parent f50214e commit 66f1d31

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/symbolic_events.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,3 +1440,11 @@ end
14401440
@mtkcompile sys = MWE()
14411441
@test_nowarn ODEProblem(sys, [], (0.0, 1.0))
14421442
end
1443+
1444+
@testset "Test erroneously created events yields errors" begin
1445+
@parameters p(t) d
1446+
@variables X(t)
1447+
@test_throws "Vectors of symbolic conditions are not allowed" SymbolicDiscreteCallback([X < 5.0] => [X ~ Pre(X) + 10.0])
1448+
@test_throws "Vectors of symbolic conditions are not allowed" SymbolicDiscreteCallback([X < 5.0, X > 10.0] => [X ~ Pre(X) + 10.0])
1449+
@test_throws "MethodError: no method" SymbolicContinuousCallback((X < 5.0) => [X ~ Pre(X) + 10.0])
1450+
end

0 commit comments

Comments
 (0)