solver_tests: enable tests using EqualsProto()
This commit is contained in:
committed by
Corentin Le Molgat
parent
a4a4e486c4
commit
c3aebd1845
@@ -424,6 +424,7 @@ cc_library(
|
||||
":update_result",
|
||||
":variable_and_expressions",
|
||||
"//ortools/base:logging",
|
||||
"//ortools/base:message_matchers",
|
||||
"//ortools/base:status_matchers",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/log",
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/message_matchers.h"
|
||||
#include "ortools/math_opt/cpp/math_opt.h"
|
||||
#include "ortools/math_opt/cpp/update_result.h"
|
||||
#include "ortools/math_opt/cpp/variable_and_expressions.h"
|
||||
@@ -941,7 +942,6 @@ testing::Matcher<ComputeInfeasibleSubsystemResult> IsInfeasible(
|
||||
&ComputeInfeasibleSubsystemResult::is_minimal,
|
||||
Eq(expected_is_minimal.value())));
|
||||
}
|
||||
/* TODO(user) implement EqualsProto
|
||||
if (expected_infeasible_subsystem.has_value()) {
|
||||
matchers.push_back(
|
||||
Field("infeasible_subsystem",
|
||||
@@ -950,7 +950,6 @@ testing::Matcher<ComputeInfeasibleSubsystemResult> IsInfeasible(
|
||||
testing::EqualsProto(
|
||||
expected_infeasible_subsystem.value().Proto()))));
|
||||
}
|
||||
*/
|
||||
return AllOfArray(matchers);
|
||||
}
|
||||
|
||||
|
||||
@@ -332,23 +332,23 @@ cc_library(
|
||||
# alwayslink = 1,
|
||||
#)
|
||||
|
||||
# missing EqualsProto
|
||||
#cc_library(
|
||||
# name = "infeasible_subsystem_tests",
|
||||
# testonly = 1,
|
||||
# srcs = ["infeasible_subsystem_tests.cc"],
|
||||
# hdrs = ["infeasible_subsystem_tests.h"],
|
||||
# deps = [
|
||||
# "//ortools/math_opt:infeasible_subsystem_cc_proto",
|
||||
# "//ortools/math_opt/cpp:matchers",
|
||||
# "//ortools/math_opt/cpp:math_opt",
|
||||
# "//ortools/port:scoped_std_stream_capture",
|
||||
# "@com_google_absl//absl/status",
|
||||
# "@com_google_absl//absl/status:statusor",
|
||||
# "@com_google_absl//absl/strings",
|
||||
# "@com_google_absl//absl/time",
|
||||
# "@com_google_googletest//:gtest",
|
||||
# ],
|
||||
# # Make sure the tests are included when using --dynamic_mode=off.
|
||||
# alwayslink = 1,
|
||||
#)
|
||||
cc_library(
|
||||
name = "infeasible_subsystem_tests",
|
||||
testonly = 1,
|
||||
srcs = ["infeasible_subsystem_tests.cc"],
|
||||
hdrs = ["infeasible_subsystem_tests.h"],
|
||||
deps = [
|
||||
"//ortools/base:message_matchers",
|
||||
"//ortools/math_opt:infeasible_subsystem_cc_proto",
|
||||
"//ortools/math_opt/cpp:matchers",
|
||||
"//ortools/math_opt/cpp:math_opt",
|
||||
"//ortools/port:scoped_std_stream_capture",
|
||||
"@com_google_absl//absl/status",
|
||||
"@com_google_absl//absl/status:statusor",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/time",
|
||||
"@com_google_googletest//:gtest",
|
||||
],
|
||||
# Make sure the tests are included when using --dynamic_mode=off.
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "absl/time/time.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "ortools/base/message_matchers.h"
|
||||
#include "ortools/math_opt/cpp/matchers.h"
|
||||
#include "ortools/math_opt/cpp/math_opt.h"
|
||||
#include "ortools/math_opt/infeasible_subsystem.pb.h"
|
||||
|
||||
Reference in New Issue
Block a user