Skip to content

Commit 8ef9f26

Browse files
committed
Add tests
1 parent 2c315ee commit 8ef9f26

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/components.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ u0 = [
9393
resistor.v => 0.0
9494
]
9595
prob = ODEProblem(sys, u0, (0, 10.0))
96-
sol = solve(prob, Rodas5())
96+
sol = solve(prob, Rodas4())
97+
98+
@test sol[resistor.p.i] == sol[capacitor.p.i]
99+
@test sol[resistor.n.i] == -sol[capacitor.p.i]
100+
@test sol[capacitor.n.i] == -sol[capacitor.p.i]
101+
@test iszero(sol[ground.g.i])
102+
@test iszero(sol[ground.g.v])
97103
#using Plots
98104
#plot(sol)

0 commit comments

Comments
 (0)