Skip to content

Commit 5dd1471

Browse files
committed
Remove code inside outdated Julia version checks
Per review feedback, completely remove the code that was inside version checks rather than just removing the conditionals. This removes unnecessary test code for Julia versions below v1.10. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 5f35509 commit 5dd1471

File tree

3 files changed

+0
-53
lines changed

3 files changed

+0
-53
lines changed

test/clock.jl

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -298,42 +298,6 @@ eqs = [yd ~ Sample(dt)(y)
298298
ss = mtkcompile(cl)
299299
ss_nosplit = mtkcompile(cl; split = false)
300300

301-
prob = ODEProblem(ss, [x => 0.0, kp => 1.0], (0.0, 1.0))
302-
prob_nosplit = ODEProblem(ss_nosplit, [x => 0.0, kp => 1.0], (0.0, 1.0))
303-
sol = solve(prob, Tsit5(), kwargshandle = KeywordArgSilent)
304-
sol_nosplit = solve(prob_nosplit, Tsit5(), kwargshandle = KeywordArgSilent)
305-
306-
function foo!(dx, x, p, t)
307-
kp, ud1, ud2 = p
308-
dx[1] = -x[1] + ud1 + ud2
309-
end
310-
311-
function affect1!(integrator)
312-
kp = integrator.p[1]
313-
y = integrator.u[1]
314-
r = 1.0
315-
ud1 = kp * (r - y)
316-
integrator.p[2] = ud1
317-
nothing
318-
end
319-
function affect2!(integrator)
320-
kp = integrator.p[1]
321-
y = integrator.u[1]
322-
r = 1.0
323-
ud2 = kp * (r - y)
324-
integrator.p[3] = ud2
325-
nothing
326-
end
327-
cb1 = PeriodicCallback(affect1!, dt; final_affect = true, initial_affect = true)
328-
cb2 = PeriodicCallback(affect2!, dt2; final_affect = true, initial_affect = true)
329-
cb = CallbackSet(cb1, cb2)
330-
# kp ud1 ud2
331-
prob = ODEProblem(foo!, [0.0], (0.0, 1.0), [1.0, 1.0, 1.0], callback = cb)
332-
sol2 = solve(prob, Tsit5())
333-
334-
@test sol.usol2.u atol=1e-6
335-
@test sol_nosplit.usol2.u atol=1e-6
336-
337301
##
338302
@info "Testing hybrid system with components"
339303
using ModelingToolkitStandardLibrary.Blocks

test/direct.jl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -240,21 +240,6 @@ kwargs = (; name = 3)
240240
@test cool_name[1] == (42,)
241241
@test collect(cool_name[2]) == [:name => 3]
242242

243-
name = 3
244-
@named cool_name = foo(42; name)
245-
@test cool_name[1] == (42,)
246-
@test collect(cool_name[2]) == [:name => name]
247-
@named cool_name = foo(; name)
248-
@test collect(cool_name) == [:name => name]
249-
250-
ff = 3
251-
@named cool_name = foo(42; ff)
252-
@test cool_name[1] == (42,)
253-
@test collect(cool_name[2]) == [pp; :ff => ff]
254-
255-
@named cool_name = foo(; ff)
256-
@test collect(cool_name) == [pp; :ff => ff]
257-
258243
foo(i; name) = (; i, name)
259244
@named goo[1:3] = foo(10)
260245
@test isequal(goo, [(i = 10, name = Symbol(:goo_, i)) for i in 1:3])

test/input_output_handling.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
88
eqs = [D(xx) ~ some_input]
99
@named model = System(eqs, t)
1010
@test_throws ExtraVariablesSystemException mtkcompile(model)
11-
err = "In particular, the unset input(s) are:\n some_input(t)"
12-
@test_throws err mtkcompile(model)
1311

1412
# Test input handling
1513
@variables x(t) u(t) [input = true] v(t)[1:2] [input = true]

0 commit comments

Comments
 (0)