Skip to content

Commit 896a35d

Browse files
committed
test: use repr instead of display
1 parent bd6a106 commit 896a35d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/1_test_sim_model.jl

+2-3
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,8 @@ end
285285
@test linmodel1.Bd linmodel2.Bd
286286
@test linmodel1.C linmodel2.C
287287
@test linmodel1.Dd linmodel2.Dd
288-
289-
display(nonlinmodel1.linbuffer)
290-
display(nonlinmodel1.linbuffer.buffer_f_at_u_d)
288+
@test repr(nonlinmodel1.linbuffer) == "LinearizationBuffer object"
289+
@test repr(nonlinmodel1.linbuffer.buffer_f_at_u_d) == "DifferentiationBuffer with a JacobianConfig"
291290

292291
f1!(ẋ, x, u, d, _) = (ẋ .= x.^5 + u.^4 + d.^3; nothing)
293292
h1!(y, x, d, _) = (y .= x.^2 + d; nothing)

test/4_test_plot_sim.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
33
model = LinModel(sys, Ts, i_d=[3])
44
res = sim!(model, 15)
5-
display(res)
5+
6+
@test repr(res) == "Simulation results of LinModel with 15 time steps."
67
@test isa(res.obj, LinModel)
78
@test length(res.T_data) == 15
89
@test res.U_data[:, 1] model.uop .+ 1

0 commit comments

Comments
 (0)