Skip to content

Commit

Permalink
disable a fragile test sirius_interface.cc (#102)
Browse files Browse the repository at this point in the history
* disable a fragile test sirius_interface.cc

* fix error
  • Loading branch information
sgatto authored Oct 10, 2023
1 parent 7cd8183 commit f35768b
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions ortools/linear_solver/unittests/sirius_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -301,21 +301,11 @@ namespace operations_research {
_unittest_verify_var(&getter, x2, SRS_CONTINUOUS_VAR, lb2, ub2);
}

TEST(SiriusInterface, DISABLED_SetVariableInteger) {
// SetInteger not implemented for sirius_interface
UNITTEST_INIT_MIP();
solver.MakeRowConstraint(-solver.infinity(), 0);

int lb = -1, ub = 7;
MPVariable* x = solver.MakeIntVar(lb, ub, "x");
solver.Solve();
_unittest_verify_var(&getter, x, SRS_INTEGER_VAR, lb, ub);
x->SetInteger(false);
solver.Solve();
_unittest_verify_var(&getter, x, SRS_CONTINUOUS_VAR, lb, ub);
}

TEST(SiriusInterface, SetVariableInteger) {
TEST(SiriusInterface, DISABLED_SetVariableInteger) {
// Here we test a badly definied behaviour
// depending on the sirius version the sirius-workflow breaks at:
// either the call of x->SetInteger(false) like the test suggest
// or at solver.Solve() because integer variables are not supported
UNITTEST_INIT_MIP();
solver.MakeRowConstraint(-solver.infinity(), 0);

Expand Down

0 comments on commit f35768b

Please sign in to comment.