Skip to content

Commit bd24cb7

Browse files
committed
test: adjust tolerance
1 parent 0dabeac commit bd24cb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/3_test_predictive_control.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ end
119119
r = [15]
120120
moveinput!(mpc7, r)
121121
ΔU_diff = diff(getinfo(mpc7)[:U])
122-
@test ΔU_diff[[2, 4, 5, 7, 8, 9]] zeros(6)
122+
@test ΔU_diff[[2, 4, 5, 7, 8, 9]] zeros(6) atol=1e-9
123123

124124
@test_throws DimensionMismatch moveinput!(mpc1, [0,0,0])
125125
@test_throws DimensionMismatch moveinput!(mpc1, [0], [0,0])
@@ -488,7 +488,7 @@ end
488488
preparestate!(mpc5, y)
489489
moveinput!(mpc5, r)
490490
ΔU_diff = diff(getinfo(mpc5)[:U])
491-
@test ΔU_diff[[2, 4, 5, 7, 8, 9]] zeros(6)
491+
@test ΔU_diff[[2, 4, 5, 7, 8, 9]] zeros(6) atol=1e-9
492492

493493
@test_nowarn ModelPredictiveControl.info2debugstr(info)
494494
end
@@ -795,7 +795,7 @@ end
795795
moveinput!(nmpc11, [10], [0])
796796
ΔU_diff = diff(getinfo(nmpc11)[:U])
797797
println(ΔU_diff)
798-
@test ΔU_diff[[2, 4, 5, 7, 8, 9]] zeros(6)
798+
@test ΔU_diff[[2, 4, 5, 7, 8, 9]] zeros(6) atol=1e-9
799799

800800
@test_nowarn ModelPredictiveControl.info2debugstr(info)
801801
end

0 commit comments

Comments
 (0)