Skip to content

Commit 3523fe8

Browse files
committed
rename names
1 parent da982bd commit 3523fe8

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

test/plotrecipes_tests.jl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@ reltols = 1.0 ./ 10.0 .^ (0:5)
2626

2727
setups = [Dict(:alg => DP5())
2828
Dict(:alg => Tsit5())]
29-
names = ["DP5", "Tsit5"]
30-
wp = WorkPrecisionSet(prob, abstols, reltols, setups, names = names, save_everystep = false,
29+
wp_names = ["DP5", "Tsit5"]
30+
wp = WorkPrecisionSet(prob, abstols, reltols, setups, names = wp_names,
31+
save_everystep = false,
3132
numruns = 100)
3233

3334
plt = @test_nowarn plot(wp)
3435
@test plt[1][1][:x] wp[1].errors
3536
@test plt[1][2][:x] wp[2].errors
36-
@test plt[1][1][:label] == names[1]
37-
@test plt[1][2][:label] == names[2]
37+
@test plt[1][1][:label] == wp_names[1]
38+
@test plt[1][2][:label] == wp_names[2]
3839
@test_nowarn plot(wp, color = [1 2])
3940
@test_nowarn plot(wp, color = :blue)
4041
@test_throws ArgumentError plot(wp, view = :dt_convergence)
@@ -44,18 +45,19 @@ setups = [Dict(:alg => Euler(), :dts => dts)
4445
Dict(:alg => Heun(), :dts => dts)
4546
Dict(:alg => Tsit5(), :dts => dts, :adaptive => false)
4647
Dict(:alg => Tsit5())]
47-
names = ["Euler", "Heun", "Tsit5 fixed step", "Tsit5 adaptive"]
48-
wp = WorkPrecisionSet(prob, abstols, reltols, setups, names = names, save_everystep = false,
48+
wp_names = ["Euler", "Heun", "Tsit5 fixed step", "Tsit5 adaptive"]
49+
wp = WorkPrecisionSet(prob, abstols, reltols, setups, names = wp_names,
50+
save_everystep = false,
4951
numruns = 100)
5052

5153
plt = @test_nowarn plot(wp)
5254
@test all(plt[1][i][:x] wp[i].errors for i in 1:4)
53-
@test all(plt[1][i][:label] == names[i] for i in 1:4)
55+
@test all(plt[1][i][:label] == wp_names[i] for i in 1:4)
5456

5557
plt = @test_nowarn plot(wp, view = :dt_convergence, legend = :bottomright)
5658
@test all(plt[1][i][:x] == plt[1][i + 3][:x] == dts == wp.setups[i][:dts] for i in 1:3)
5759
@test all(plt[1][i + 3][:y] wp[i].errors for i in 1:3)
58-
@test all(startswith(plt[1][i + 3][:label], names[i]) for i in 1:3)
60+
@test all(startswith(plt[1][i + 3][:label], wp_names[i]) for i in 1:3)
5961
@test_throws BoundsError plt[1][7]
6062
@test_nowarn plot(wp, view = :dt_convergence, color = [:red :orange :green])
6163
@test_nowarn plot(wp, view = :dt_convergence, color = :lightblue, title = "Δt Convergence")

0 commit comments

Comments
 (0)