Skip to content

Commit

Permalink
math_opt: disable regexp tests when using MSVC. (Fix #4463, Fix #4464)
Browse files Browse the repository at this point in the history
note: googletest do not support full regexp on windows...
  • Loading branch information
Mizux committed Dec 3, 2024
1 parent 927f5c9 commit 3aa471d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ortools/math_opt/solver_tests/ip_parameter_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ TEST_P(IpParameterTest, PresolveOff) {
solve_stats.first_order_iterations,
1);
}
#if !defined(_MSC_VER)
EXPECT_THAT(logs, Not(testing::ContainsRegex(GetParam().presolved_regexp)));
#endif
}

TEST_P(IpParameterTest, PresolveOn) {
Expand All @@ -435,7 +437,9 @@ TEST_P(IpParameterTest, PresolveOn) {
EXPECT_EQ(solve_stats.simplex_iterations, 0);
EXPECT_EQ(solve_stats.first_order_iterations, 0);
}
#if !defined(_MSC_VER)
EXPECT_THAT(logs, testing::ContainsRegex(GetParam().presolved_regexp));
#endif
}

// Requires disabling presolve and cuts is supported (or status errors).
Expand Down

0 comments on commit 3aa471d

Please sign in to comment.