Skip to content

Commit c134eff

Browse files
committed
More tests
1 parent 1ac9be2 commit c134eff

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/test_winchcontroller.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,16 @@ p3=plotx(TIME, FORCE*0.001, STATE;
9090
ylabels=["force [kN]","state"],
9191
fig="test_winchcontroller_c")
9292
if @isdefined __TEST__
93+
dt = wcs.dt
9394
@test mean(FORCE) 1791.0028035171347 rtol=1e-4
95+
@test maximum(FORCE) < 4270
96+
@test minimum(FORCE[10:end]) > 10.0
97+
@test STATE[Int64(0.5/dt)] == 0
98+
@test STATE[Int64(1.0/dt)] == 1
99+
@test STATE[Int64(2.0/dt)] == 2
100+
@test STATE[Int64(3.0/dt)] == 1
101+
@test STATE[Int64(4.0/dt)] == 0
102+
94103
else
95104
display(p1); display(p2); display(p3)
96105
end

0 commit comments

Comments
 (0)