Skip to content

Commit dcdd454

Browse files
test: fix test relying on AffectSystem in uncompiled callback
1 parent b88eb43 commit dcdd454

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/symbolic_events.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,13 @@ end
311311

312312
cev = only(continuous_events(ball))
313313
@test isequal(only(equations(cev)), x ~ 0)
314-
@test isequal(only(observed(cev.affect.system)), v ~ -Pre(v))
314+
@test isequal(only(cev.affect.affect), v ~ -Pre(v))
315315
ball = mtkcompile(ball)
316316

317317
@test length(ModelingToolkit.continuous_events(ball)) == 1
318+
cev = only(continuous_events(ball))
319+
@test isequal(only(equations(cev)), x ~ 0)
320+
@test isequal(only(observed(cev.affect.system)), v ~ -Pre(v))
318321

319322
tspan = (0.0, 5.0)
320323
prob = ODEProblem(ball, Pair[], tspan)

0 commit comments

Comments
 (0)