Skip to content

Commit 8dcdd0b

Browse files
remove test from callback and add in test-solver instead
1 parent ad20f48 commit 8dcdd0b

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

test/test-R2N.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,8 @@
4343
)
4444

4545
callback = (nlp, solver, stats) -> begin
46-
# Check that everything is well computed
47-
@test all(solver.mν∇fk + solver.∇fk/stats.solver_specific[:sigma_cauchy] .≤ eps(eltype(solver.mν∇fk)))
48-
# TODO: add a few tests here.
49-
46+
# We could add some tests here as well.
47+
5048
# Check user status
5149
if stats.iter == 4
5250
stats.status = :user

test/test-solver.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ function test_solver(
4141
@test stats_optimized.status == expected_status
4242
@test obj(reg_nlp, stats_optimized.solution) == stats_optimized.objective
4343
@test stats_optimized.objective <= obj(reg_nlp, x0)
44+
@test all(solver.mν∇fk + solver.∇fk/stats_optimized.solver_specific[:sigma_cauchy] .≤ eps(eltype(solver.mν∇fk)))
4445

4546
# TODO: test that the optimized entries in stats_optimized and stats_basic are the same.
4647

0 commit comments

Comments
 (0)