Skip to content

Commit 11e3945

Browse files
test: update tests to not wrap parameter vector in tuple
1 parent 4087cbf commit 11e3945

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

test/jumpsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ sol = solve(jprob, SSAStepper(); saveat = 1.0)
104104
rate2(u, p, t) = 0.01u[2]
105105
jump2 = ConstantRateJump(rate2, affect2!)
106106
mtjumps = jprob.discrete_jump_aggregation
107-
@test abs(mtjumps.rates[1](u, (p,), tf) - jump1.rate(u, p, tf)) < 10 * eps()
108-
@test abs(mtjumps.rates[2](u, (p,), tf) - jump2.rate(u, p, tf)) < 10 * eps()
107+
@test abs(mtjumps.rates[1](u, p, tf) - jump1.rate(u, p, tf)) < 10 * eps()
108+
@test abs(mtjumps.rates[2](u, p, tf) - jump2.rate(u, p, tf)) < 10 * eps()
109109
mtjumps.affects![1](mtintegrator)
110110
jump1.affect!(integrator)
111111
@test all(integrator.u .== mtintegrator.u)

test/labelledarrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ff = ODEFunction(de, [x, y, z], [σ, ρ, β], jac = true)
1919
a = @SVector [1.0, 2.0, 3.0]
2020
b = SLVector(x = 1.0, y = 2.0, z = 3.0)
2121
c = [1.0, 2.0, 3.0]
22-
p = (SLVector= 10.0, ρ = 26.0, β = 8 / 3),)
22+
p = SLVector= 10.0, ρ = 26.0, β = 8 / 3)
2323
@test ff(a, p, 0.0) isa SVector
2424
@test typeof(ff(b, p, 0.0)) <: SLArray
2525
@test ff(c, p, 0.0) isa Vector

test/odesystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ end
235235

236236
prob = ODEProblem(ODEFunction{false}(lotka), [1.0, 1.0], (0.0, 1.0), [1.5, 1.0, 3.0, 1.0])
237237
de = complete(modelingtoolkitize(prob))
238-
ODEFunction(de)(similar(prob.u0), prob.u0, (prob.p,), 0.1)
238+
ODEFunction(de)(similar(prob.u0), prob.u0, prob.p, 0.1)
239239

240240
function lotka(du, u, p, t)
241241
x = u[1]
@@ -247,7 +247,7 @@ end
247247
prob = ODEProblem(lotka, [1.0, 1.0], (0.0, 1.0), [1.5, 1.0, 3.0, 1.0])
248248

249249
de = complete(modelingtoolkitize(prob))
250-
ODEFunction(de)(similar(prob.u0), prob.u0, (prob.p,), 0.1)
250+
ODEFunction(de)(similar(prob.u0), prob.u0, prob.p, 0.1)
251251

252252
# automatic unknown detection for DAEs
253253
@parameters k₁ k₂ k₃

test/sdesystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ noiseeqs = [0.1 * x,
2424
@named de = SDESystem(eqs, noiseeqs, tt, [x, y, z], [σ, ρ, β], tspan = (0.0, 10.0))
2525
de = complete(de)
2626
f = eval(generate_diffusion_function(de)[1])
27-
@test f(ones(3), (rand(3),), nothing) == 0.1ones(3)
27+
@test f(ones(3), rand(3), nothing) == 0.1ones(3)
2828

2929
f = SDEFunction(de)
3030
prob = SDEProblem(de, [1.0, 0.0, 0.0], (0.0, 100.0), [10.0, 26.0, 2.33])

0 commit comments

Comments
 (0)