Skip to content

Commit 7e36757

Browse files
committed
more tests
1 parent e719b96 commit 7e36757

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

test/feasibility.jl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,42 @@ function test_dual_vector()
946946
return
947947
end
948948

949+
function test_nl_con()
950+
model = Model()
951+
set_silent(model)
952+
@variable(model, x)
953+
@constraint(model, c1, x^3 == 0)
954+
@objective(model, Min, x)
955+
956+
data = ModelAnalyzer.analyze(
957+
ModelAnalyzer.Feasibility.Analyzer(),
958+
model,
959+
primal_point = Dict(JuMP.index(x) => 0.0),
960+
dual_point = Dict(JuMP.index(c1) => 0.0),
961+
)
962+
@show list = ModelAnalyzer.list_of_issue_types(data)
963+
@test length(list) == 0
964+
return
965+
end
966+
967+
function test_nl_obj()
968+
model = Model()
969+
set_silent(model)
970+
@variable(model, x)
971+
@constraint(model, c1, x == 0)
972+
@objective(model, Min, x^3)
973+
974+
data = ModelAnalyzer.analyze(
975+
ModelAnalyzer.Feasibility.Analyzer(),
976+
model,
977+
primal_point = Dict(JuMP.index(x) => 0.0),
978+
dual_point = Dict(JuMP.index(c1) => 0.0),
979+
)
980+
@show list = ModelAnalyzer.list_of_issue_types(data)
981+
@test length(list) == 0
982+
return
983+
end
984+
949985
end # module
950986

951987
TestDualFeasibilityChecker.runtests()

0 commit comments

Comments
 (0)