Skip to content

Commit 503798e

Browse files
committed
Tests
1 parent e0928ee commit 503798e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/structural_transformation/tearing.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,10 @@ sol2 = solve(ODEProblem{false}(
175175
), Tsit5(), tstops=sol1.t, adaptive=false)
176176
@test Array(sol1) Array(sol2) atol=1e-5
177177

178-
obs = build_observed_function(newdaesys, [z, y])
179-
@test map(u -> u[2], obs.(sol1.u, pr, sol1.t)) == first.(sol1.u)
180-
@test map(u -> sin(u[1]), obs.(sol1.u, pr, sol1.t)) + first.(sol1.u) pr[1]*sol1.t atol=1e-5
178+
@test sol1[x] == first.(sol1.u)
179+
@test sol1[y] == first.(sol1.u)
180+
@test sin.(sol1[z]) .+ sol1[y] pr[1] * sol1.t atol=1e-5
181+
@test sol1[sin(z) + y] sin.(sol1[z]) .+ sol1[y] rtol=1e-12
181182

182183
@test sol1[y, :] == sol1[x, :]
183184
@test (@. sin(sol1[z, :]) + sol1[y, :]) pr * sol1.t atol=1e-5

0 commit comments

Comments
 (0)