Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/Test/test_basic_constraint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,19 @@
###
### Test MOI.ConstraintFunction
###
function _isapprox_simplified(f, g, config)
return isapprox(

Check warning on line 266 in src/Test/test_basic_constraint.jl

View check run for this annotation

Codecov / codecov/patch

src/Test/test_basic_constraint.jl#L265-L266

Added lines #L265 - L266 were not covered by tests
MOI.Nonlinear.SymbolicAD.simplify(f),
MOI.Nonlinear.SymbolicAD.simplify(g),
config,
)
end
if _supports(config, MOI.ConstraintFunction)
# Don't compare directly, because `f` might not be canonicalized.
f = MOI.get(model, MOI.ConstraintFunction(), c)
@test isapprox(MOI.Utilities.canonical(f), constraint_function, config)
@test isapprox(
MOI.get(model, MOI.CanonicalConstraintFunction(), c),
constraint_function,
config,
)
@test _isapprox_simplified(f, constraint_function, config)
cf = MOI.get(model, MOI.CanonicalConstraintFunction(), c)
@test _isapprox_simplified(cf, constraint_function, config)

Check warning on line 277 in src/Test/test_basic_constraint.jl

View check run for this annotation

Codecov / codecov/patch

src/Test/test_basic_constraint.jl#L275-L277

Added lines #L275 - L277 were not covered by tests
_test_attribute_value_type(model, MOI.ConstraintFunction(), c)
_test_attribute_value_type(model, MOI.CanonicalConstraintFunction(), c)
_test_function_modification(model, config, c, f)
Expand Down
1 change: 1 addition & 0 deletions test/Bridges/Constraint/NormInfinityBridge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function test_NormInfinity()
"test_basic_VectorOfVariables_NormInfinityCone",
"test_basic_VectorAffineFunction_NormInfinityCone",
"test_basic_VectorQuadraticFunction_NormInfinityCone",
"test_basic_VectorNonlinearFunction_NormInfinityCone",
],
)
return
Expand Down
2 changes: 1 addition & 1 deletion test/Bridges/Constraint/NormOneBridge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function test_NormOne()
"test_basic_VectorOfVariables_NormOneCone",
"test_basic_VectorAffineFunction_NormOneCone",
"test_basic_VectorQuadraticFunction_NormOneCone",
# "test_basic_VectorNonlinearFunction_NormOneCone",
"test_basic_VectorNonlinearFunction_NormOneCone",
],
)
return
Expand Down
Loading