Skip to content

Commit 6a1022b

Browse files
test OC ok
1 parent 7b34e25 commit 6a1022b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

test/runtests.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ const verbose = true # print or not details during tests
4545

4646
for name in (
4747
#:aqua,
48-
:JuMP, # convergence tests for JuMP models
49-
#:OptimalControl, # convergence tests for OptimalControl models
48+
#:JuMP, # convergence tests for JuMP models
49+
:OptimalControl, # convergence tests for OptimalControl models
5050
#:Comparison, # comparison between OptimalControl and JuMP
5151
#:quick, # quick comparison: objective rel error only
5252
)
@@ -58,13 +58,15 @@ const verbose = true # print or not details during tests
5858
end
5959
end
6060

61-
61+
# note: not sure I undertand the purpose of the cache ?
62+
# the list of available problems is not up to date when the tests are run
63+
# and we need to run the tests another time to get the proper list
6264
@testset "available_problems" verbose=verbose begin
63-
println(available_problems())
64-
println(list_of_problems_final)
6565
if list_of_problems_final == available_problems()
6666
@test list_of_problems_final == available_problems()
6767
else
68+
println("Available problems: ", available_problems())
69+
println("Passed problems: ",list_of_problems_final)
6870
@test list_of_problems_final == available_problems() broken=true
6971
end
7072
end

test/test_OptimalControl.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function test_OptimalControl()
2626
println(" sol.status = $(sol.status) objective (NLP) = $(sol.objective) \n")
2727

2828
# Test that the solver found an optimal solution
29-
success = (sol.status == :first_order || sol.status == :first_order)
29+
success = (sol.status == :first_order || sol.status == :acceptable)
3030
if success
3131
@test success
3232
print("OptimalControl : $f converged : \033[1;32mTest Passed\033[0m\n")

0 commit comments

Comments
 (0)