Skip to content

Commit 1325916

Browse files
committed
fix some tests
1 parent 79a4753 commit 1325916

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

test/reactionsystem_core/events.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,10 @@ let
118118
@named rs_de_2 = ReactionSystem(rxs, t; discrete_events)
119119
rs_de_2 = complete(rs_de_2)
120120
jin = JumpInputs(rs_de_2, u0, (0.0, 10.0), ps)
121-
jprob = JumpProblem(jin)
122-
for prob in [dprob, jprob]
123-
@test dprob[A] == 2
124-
@test dprob.ps[α] == 1
125-
@test dprob.ps[α] isa Int64
126-
end
121+
jprob = JumpProblem(JumpInputs(rs_de_2, u0, (0.0, 10.0), ps))
122+
@test jprob[A] == 2
123+
@test jprob.ps[α] == 1
124+
@test jprob.ps[α] isa Int64
127125
end
128126

129127

test/reactionsystem_core/reactionsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ let
666666
@named rs = ReactionSystem(rxs, t, [S, I], [])
667667
rs = complete(rs)
668668
js = complete(convert(JumpSystem, rs))
669-
jin = JumpInputs(js, [S => 1, I => 1], (0.0, 10.0))
670-
jprob = JumpProblem(jin; rng)
669+
dprob = DiscreteProblem(js, [S => 1, I => 1], (0.0, 10.0))
670+
jprob = JumpProblem(js, dprob, Direct(); rng)
671671
sol = solve(jprob, SSAStepper())
672672

673673
# Test for https://github.com/SciML/ModelingToolkit.jl/issues/1042.

0 commit comments

Comments
 (0)