diff --git a/internal/ceres/gmock/mock-log.h b/internal/ceres/gmock/mock-log.h index bce54ab5e..54669b7f2 100644 --- a/internal/ceres/gmock/mock-log.h +++ b/internal/ceres/gmock/mock-log.h @@ -44,13 +44,6 @@ #include "glog/logging.h" -// Needed to make the scoped mock log tests work without modification. -namespace ceres { -namespace internal { -using google::WARNING; -} // namespace internal -} // namespace ceres - namespace testing { // A ScopedMockLog object intercepts LOG() messages issued during its diff --git a/internal/ceres/gradient_checking_cost_function_test.cc b/internal/ceres/gradient_checking_cost_function_test.cc index e7238c669..887922e02 100644 --- a/internal/ceres/gradient_checking_cost_function_test.cc +++ b/internal/ceres/gradient_checking_cost_function_test.cc @@ -45,7 +45,6 @@ #include "ceres/types.h" #include "glog/logging.h" #include "gmock/gmock.h" -#include "gmock/mock-log.h" #include "gtest/gtest.h" namespace ceres { @@ -55,7 +54,6 @@ using std::vector; using testing::AllOf; using testing::AnyNumber; using testing::HasSubstr; -using testing::ScopedMockLog; using testing::_; // Pick a (non-quadratic) function whose derivative are easy: diff --git a/internal/ceres/levenberg_marquardt_strategy_test.cc b/internal/ceres/levenberg_marquardt_strategy_test.cc index 9a7bcb45b..950ca23b0 100644 --- a/internal/ceres/levenberg_marquardt_strategy_test.cc +++ b/internal/ceres/levenberg_marquardt_strategy_test.cc @@ -145,7 +145,9 @@ TEST(LevenbergMarquardtStrategy, CorrectDiagonalToLinearSolver) { { ScopedMockLog log; EXPECT_CALL(log, Log(_, _, _)).Times(AnyNumber()); - EXPECT_CALL(log, Log(WARNING, _, + // Use GLOG_WARNING to support MSVC if GLOG_NO_ABBREVIATED_SEVERITIES + // is defined. + EXPECT_CALL(log, Log(google::GLOG_WARNING, _, HasSubstr("Failed to compute a step"))); TrustRegionStrategy::Summary summary =