Skip to content

Commit 30bae8c

Browse files
committed
Re-enable root-finding tests
1 parent 4a20a10 commit 30bae8c

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

test/rootfinding.jl

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ import Logging: Warn
148148
@test size(tvS1) == size(tvS)
149149
@test size(xvS1) == size(xvS)
150150
@test size(gvS1) == size(gvS)
151-
@test_broken norm(gvS1[:]) < 1E-14
152-
@test_broken norm( tvS1()-tvS, Inf ) < 1E-13
153-
@test_broken norm( xvS1()-xvS, Inf ) < 1E-14
151+
@test norm(gvS1[:]) < 1E-14
152+
@test norm( tvS1()-tvS, Inf ) < 1E-13
153+
@test norm( xvS1()-xvS, Inf ) < 1E-14
154154

155155
#testing surface higher order crossing detections and root-finding
156156
@test_throws AssertionError taylorinteg(pendulum!, g, x0, t0, 3Tend,
@@ -188,40 +188,34 @@ import Logging: Warn
188188
@test norm(xvSN()-xvS, Inf) < 1E-14
189189

190190
#testing higher root-finding + Taylor1 jet transport
191-
# sol1 = (@test_logs min_level=Logging.Warn taylorinteg(
192-
# pendulum!, g, x01, t0, 3Tend, _order, _abstol, maxsteps=1000, eventorder=2))
193-
sol1 = taylorinteg(
194-
pendulum!, g, x01, t0, 3Tend, _order, _abstol, maxsteps=1000, eventorder=2)
191+
sol1 = (@test_logs min_level=Logging.Warn taylorinteg(
192+
pendulum!, g, x01, t0, 3Tend, _order, _abstol, maxsteps=1000, eventorder=2))
195193
tv1, xv1, tvS1, xvS1, gvS1 = sol1.t, sol1.x, sol1.tevents, sol1.xevents, sol1.gresids
196194
@test size(tvS1) == size(tvS)
197195
@test size(xvS1) == size(xvS)
198196
@test size(gvS1) == size(gvS)
199-
@test_broken norm(gvS1[:]) < 1E-14
200-
@test_broken norm( tvS1()-tvr[2:end-1], Inf ) < 1E-13
201-
@test_broken norm( xvS1()-xvS, Inf ) < 1E-14
197+
@test norm(gvS1[:]) < 1E-14
198+
@test norm( tvS1()-tvr[2:end-1], Inf ) < 1E-13
199+
@test norm( xvS1()-xvS, Inf ) < 1E-14
202200

203201
# Tests if trange is properly sorted
204202
Δt = (3Tend-t0)/1000
205203
tspan = t0:Δt:(3Tend-0.125)
206-
# sol1r = (@test_logs min_level=Logging.Warn taylorinteg(
207-
# pendulum!, g, x01, tspan, _order, _abstol, maxsteps=1000, eventorder=2))
208-
sol1r = taylorinteg(
209-
pendulum!, g, x01, tspan, _order, _abstol, maxsteps=1000, eventorder=2)
204+
sol1r = (@test_logs min_level=Logging.Warn taylorinteg(
205+
pendulum!, g, x01, tspan, _order, _abstol, maxsteps=1000, eventorder=2))
210206
xv1r, tvS1r, xvS1r, gvS1r = sol1r.x, sol1r.tevents, sol1r.xevents, sol1r.gresids
211-
# sol1rb = (@test_logs min_level=Logging.Warn taylorinteg(
212-
# pendulum!, g, xv1r[end,:], reverse(tspan), _order, _abstol, maxsteps=1000, eventorder=2))
213-
sol1rb = taylorinteg(
214-
pendulum!, g, xv1r[end,:], reverse(tspan), _order, _abstol, maxsteps=1000, eventorder=2)
207+
sol1rb = (@test_logs min_level=Logging.Warn taylorinteg(
208+
pendulum!, g, xv1r[end,:], reverse(tspan), _order, _abstol, maxsteps=1000, eventorder=2))
215209
xv1rb, tvS1rb, xvS1rb, gvS1rb = sol1rb.x, sol1rb.tevents, sol1rb.xevents, sol1rb.gresids
216210
@test size(xv1r) == size(xv1rb)
217211
@test size(tvS1r) == size(tvS1rb)
218212
@test size(xvS1r) == size(xvS1rb)
219213
@test size(gvS1r) == size(gvS1rb)
220-
@test_broken norm(gvS1r[:], Inf) < 1E-14
221-
@test_broken norm(gvS1rb[:], Inf) < 1E-13
214+
@test norm(gvS1r[:], Inf) < 1E-14
215+
@test norm(gvS1rb[:], Inf) < 1E-13
222216
@test tvS1r[1]() < tvS1r[end]()
223217
@test tvS1rb[1]() > tvS1rb[end]()
224-
@test_broken norm(tvS1r() - reverse(tvS1rb()), Inf) < 5e-14
218+
@test norm(tvS1r() - reverse(tvS1rb()), Inf) < 5e-14
225219
@test norm(xv1r[:,:]() - xv1rb[end:-1:1,:](), Inf) < 5e-14
226220

227221
@test_throws AssertionError taylorinteg(pendulum!, g, x0, rand(t0:Δt:3Tend, 100),

0 commit comments

Comments
 (0)