Skip to content

Commit fd71faf

Browse files
committed
Update tests
1 parent 0e7179f commit fd71faf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/src/tutorials/acausal_components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,5 +433,5 @@ sol[resistor.v]
433433
or we can plot the timeseries of the resistor's voltage:
434434

435435
```julia
436-
plot(sol,vars=(resistor.v,))
436+
plot(sol, vars=[resistor.v])
437437
```

test/components.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,16 @@ sol = solve(prob, Rodas4())
100100
@test sol[capacitor.n.i] == -sol[capacitor.p.i]
101101
@test iszero(sol[ground.g.i])
102102
@test iszero(sol[ground.g.v])
103+
@test sol[resistor.v] == sol[source.p.v] - sol[capacitor.p.v]
103104

104105
prob = ODAEProblem(sys, u0, (0, 10.0))
105-
sol = solve(prob, Rodas4())
106+
sol = solve(prob, Tsit5())
106107

107108
@test sol[resistor.p.i] == sol[capacitor.p.i]
108109
@test sol[resistor.n.i] == -sol[capacitor.p.i]
109110
@test sol[capacitor.n.i] == -sol[capacitor.p.i]
110111
@test iszero(sol[ground.g.i])
111112
@test iszero(sol[ground.g.v])
113+
@test sol[resistor.v] == sol[source.p.v] - sol[capacitor.p.v]
112114
#using Plots
113115
#plot(sol)

0 commit comments

Comments
 (0)