Skip to content

Commit 943eb92

Browse files
committed
Use isapprox in a few more test cases
1 parent 67d196f commit 943eb92

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/Thermal/thermal.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ D = Differential(t)
3232
# Check if Relative temperature sensor reads the temperature of heat capacitor
3333
# when connected to a thermal conductor and a fixed temperature source
3434
@test sol.retcode == Success
35-
@test sol[reltem_sensor.T] + sol[tem_src.port.T] == sol[mass1.T] + sol[th_conductor.dT]
35+
@test sol[reltem_sensor.T] + sol[tem_src.port.T] sol[mass1.T] + sol[th_conductor.dT]
3636

3737
@info "Building a two-body system..."
3838
eqs = [connect(T_sensor1.port, mass1.port, th_conductor.port_a)
@@ -88,10 +88,10 @@ end
8888
sol = solve(prob, Tsit5())
8989

9090
@test sol.retcode == Success
91-
@test sol[th_conductor.dT] .* G == sol[th_conductor.Q_flow]
91+
@test sol[th_conductor.dT] .* G sol[th_conductor.Q_flow]
9292
@test sol[th_conductor.Q_flow] sol[hf_sensor1.Q_flow] + sol[flow_src.port.Q_flow]
9393

94-
@test sol[mass1.T] == sol[th_resistor.port_a.T]
94+
@test sol[mass1.T] sol[th_resistor.port_a.T]
9595
@test sol[th_resistor.dT] ./ R sol[th_resistor.Q_flow]
9696
end
9797

@@ -242,7 +242,7 @@ end
242242
@test sol.retcode == Success
243243
@test sol[T_winding.T] == sol[winding.T]
244244
@test sol[T_core.T] == sol[core.T]
245-
@test sol[-core.port.Q_flow] ==
245+
@test sol[-core.port.Q_flow]
246246
sol[coreLosses.port.Q_flow + convection.solid.Q_flow + winding2core.port_b.Q_flow]
247247
@test sol[T_winding.T][end] >= 500 # not good but better than nothing
248248
@test sol[T_core.T] <= sol[T_winding.T]

0 commit comments

Comments
 (0)