Skip to content

Commit 3358ff0

Browse files
unit tests for TR
1 parent 52117ed commit 3358ff0

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

test/runtests.jl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@ for (mod, mod_name) ∈ ((x -> x, "exact"), (LSR1Model, "lsr1"), (LBFGSModel, "l
2525
out = solver(mod(bpdn), h, args..., options, x0 = x0)
2626
@test typeof(out.solution) == typeof(bpdn.meta.x0)
2727
@test length(out.solution) == bpdn.meta.nvar
28-
@test typeof(out.solver_specific[:Fhist]) == typeof(out.solution)
29-
@test typeof(out.solver_specific[:Hhist]) == typeof(out.solution)
30-
@test typeof(out.solver_specific[:SubsolverCounter]) == Array{Int, 1}
3128
@test typeof(out.dual_feas) == eltype(out.solution)
32-
@test length(out.solver_specific[:Fhist]) == length(out.solver_specific[:Hhist])
33-
@test length(out.solver_specific[:Fhist]) == length(out.solver_specific[:SubsolverCounter])
34-
@test obj(bpdn, out.solution) == out.solver_specific[:Fhist][end]
35-
@test h(out.solution) == out.solver_specific[:Hhist][end]
3629
@test out.status == :first_order
3730
end
3831
end
@@ -66,15 +59,7 @@ for (mod, mod_name) ∈ ((LSR1Model, "lsr1"), (LBFGSModel, "lbfgs"))
6659
TR_out = TR(mod(bpdn), h, NormL2(1.0), options, x0 = x0)
6760
@test typeof(TR_out.solution) == typeof(bpdn.meta.x0)
6861
@test length(TR_out.solution) == bpdn.meta.nvar
69-
@test typeof(TR_out.solver_specific[:Fhist]) == typeof(TR_out.solution)
70-
@test typeof(TR_out.solver_specific[:Hhist]) == typeof(TR_out.solution)
71-
@test typeof(TR_out.solver_specific[:SubsolverCounter]) == Array{Int, 1}
7262
@test typeof(TR_out.dual_feas) == eltype(TR_out.solution)
73-
@test length(TR_out.solver_specific[:Fhist]) == length(TR_out.solver_specific[:Hhist])
74-
@test length(TR_out.solver_specific[:Fhist]) ==
75-
length(TR_out.solver_specific[:SubsolverCounter])
76-
@test obj(bpdn, TR_out.solution) == TR_out.solver_specific[:Fhist][end]
77-
@test h(TR_out.solution) == TR_out.solver_specific[:Hhist][end]
7863
@test TR_out.status == :first_order
7964
end
8065
end

test/test_bounds.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,7 @@ for (mod, mod_name) ∈ ((x -> x, "exact"), (LSR1Model, "lsr1"), (LBFGSModel, "l
1515
out = solver(mod(bpdn2), h, args..., options; x0 = x0)
1616
@test typeof(out.solution) == typeof(bpdn2.meta.x0)
1717
@test length(out.solution) == bpdn2.meta.nvar
18-
@test typeof(out.solver_specific[:Fhist]) == typeof(out.solution)
19-
@test typeof(out.solver_specific[:Hhist]) == typeof(out.solution)
20-
@test typeof(out.solver_specific[:SubsolverCounter]) == Array{Int, 1}
2118
@test typeof(out.dual_feas) == eltype(out.solution)
22-
@test length(out.solver_specific[:Fhist]) == length(out.solver_specific[:Hhist])
23-
@test length(out.solver_specific[:Fhist]) == length(out.solver_specific[:SubsolverCounter])
24-
@test obj(bpdn2, out.solution) == out.solver_specific[:Fhist][end]
25-
@test h(out.solution) == out.solver_specific[:Hhist][end]
2619
@test out.status == :first_order
2720
end
2821
end

0 commit comments

Comments
 (0)