From ab654ac3f3d73abdfd763556fc80972ea61b9b5b Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Wed, 21 Feb 2024 18:28:21 +0100 Subject: [PATCH] algorithms: update to use base/gmock.h --- ortools/algorithms/BUILD.bazel | 4 +++- ortools/algorithms/binary_search_test.cc | 2 +- ortools/algorithms/duplicate_remover_test.cc | 2 +- ortools/algorithms/dynamic_partition_test.cc | 2 +- ortools/algorithms/dynamic_permutation_test.cc | 2 +- ortools/algorithms/find_graph_symmetries_test.cc | 3 +-- ortools/algorithms/radix_sort_test.cc | 2 +- ortools/algorithms/set_cover_test.cc | 2 +- ortools/algorithms/sparse_permutation_test.cc | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ortools/algorithms/BUILD.bazel b/ortools/algorithms/BUILD.bazel index ccf5546c1a..308a484fff 100644 --- a/ortools/algorithms/BUILD.bazel +++ b/ortools/algorithms/BUILD.bazel @@ -62,6 +62,7 @@ cc_library( deps = [ "//ortools/base", "//ortools/base:dump_vars", + "//ortools/base:gmock", "@com_google_absl//absl/numeric:int128", ], ) @@ -107,6 +108,7 @@ cc_test( deps = [ ":radix_sort", "//ortools/base:dump_vars", + "//ortools/base:gmock", "//ortools/base:mathutil", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/log", @@ -332,9 +334,9 @@ cc_test( ":sparse_permutation", "//ortools/base", "//ortools/base:dump_vars", + "//ortools/base:gmock", "//ortools/base:map_util", "//ortools/base:path", - "//ortools/base:status_matchers", "//ortools/graph:io", "@com_google_absl//absl/random", "@com_google_absl//absl/status", diff --git a/ortools/algorithms/binary_search_test.cc b/ortools/algorithms/binary_search_test.cc index 500ed33c37..6ffb2f425b 100644 --- a/ortools/algorithms/binary_search_test.cc +++ b/ortools/algorithms/binary_search_test.cc @@ -27,8 +27,8 @@ #include "absl/strings/str_format.h" #include "absl/time/time.h" #include "benchmark/benchmark.h" -#include "gmock/gmock.h" #include "gtest/gtest.h" +#include "ortools/base/gmock.h" #include "ortools/base/hash.h" namespace operations_research { diff --git a/ortools/algorithms/duplicate_remover_test.cc b/ortools/algorithms/duplicate_remover_test.cc index ad2553f8e6..b7c738b938 100644 --- a/ortools/algorithms/duplicate_remover_test.cc +++ b/ortools/algorithms/duplicate_remover_test.cc @@ -17,8 +17,8 @@ #include #include "benchmark/benchmark.h" -#include "gmock/gmock.h" #include "gtest/gtest.h" +#include "ortools/base/gmock.h" #include "ortools/base/linked_hash_set.h" #include "ortools/util/random_engine.h" #include "util/tuple/dump_vars.h" diff --git a/ortools/algorithms/dynamic_partition_test.cc b/ortools/algorithms/dynamic_partition_test.cc index 004f35ac99..233eb73666 100644 --- a/ortools/algorithms/dynamic_partition_test.cc +++ b/ortools/algorithms/dynamic_partition_test.cc @@ -23,8 +23,8 @@ #include "absl/random/bit_gen_ref.h" #include "absl/random/random.h" #include "absl/strings/str_join.h" -#include "gmock/gmock.h" #include "gtest/gtest.h" +#include "ortools/base/gmock.h" #include "ortools/base/stl_util.h" namespace operations_research { diff --git a/ortools/algorithms/dynamic_permutation_test.cc b/ortools/algorithms/dynamic_permutation_test.cc index 9e3a0f507c..270acb2eec 100644 --- a/ortools/algorithms/dynamic_permutation_test.cc +++ b/ortools/algorithms/dynamic_permutation_test.cc @@ -15,8 +15,8 @@ #include -#include "gmock/gmock.h" #include "gtest/gtest.h" +#include "ortools/base/gmock.h" namespace operations_research { namespace { diff --git a/ortools/algorithms/find_graph_symmetries_test.cc b/ortools/algorithms/find_graph_symmetries_test.cc index 97d2065fd2..3ac85fddb7 100644 --- a/ortools/algorithms/find_graph_symmetries_test.cc +++ b/ortools/algorithms/find_graph_symmetries_test.cc @@ -38,13 +38,12 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "absl/types/span.h" -#include "gmock/gmock.h" #include "gtest/gtest.h" #include "ortools/algorithms/dynamic_partition.h" #include "ortools/algorithms/dynamic_permutation.h" #include "ortools/algorithms/sparse_permutation.h" -#include "ortools/base/status_matchers.h" #include "ortools/base/dump_vars.h" +#include "ortools/base/gmock.h" #include "ortools/base/helpers.h" #include "ortools/base/map_util.h" #include "ortools/base/path.h" diff --git a/ortools/algorithms/radix_sort_test.cc b/ortools/algorithms/radix_sort_test.cc index 6df67d07f3..0248b5e20f 100644 --- a/ortools/algorithms/radix_sort_test.cc +++ b/ortools/algorithms/radix_sort_test.cc @@ -29,9 +29,9 @@ #include "absl/random/random.h" #include "absl/types/span.h" #include "benchmark/benchmark.h" -#include "gmock/gmock.h" #include "gtest/gtest.h" #include "ortools/base/dump_vars.h" +#include "ortools/base/gmock.h" #include "ortools/base/logging.h" #include "ortools/base/mathutil.h" diff --git a/ortools/algorithms/set_cover_test.cc b/ortools/algorithms/set_cover_test.cc index f5cd8b8923..f4a388e433 100644 --- a/ortools/algorithms/set_cover_test.cc +++ b/ortools/algorithms/set_cover_test.cc @@ -19,12 +19,12 @@ #include "absl/log/check.h" #include "absl/strings/str_cat.h" #include "benchmark/benchmark.h" -#include "gmock/gmock.h" #include "gtest/gtest.h" #include "ortools/algorithms/set_cover.pb.h" #include "ortools/algorithms/set_cover_invariant.h" #include "ortools/algorithms/set_cover_mip.h" #include "ortools/algorithms/set_cover_model.h" +#include "ortools/base/gmock.h" #include "ortools/base/logging.h" namespace operations_research { diff --git a/ortools/algorithms/sparse_permutation_test.cc b/ortools/algorithms/sparse_permutation_test.cc index 6efa4f7f53..a31927b2b8 100644 --- a/ortools/algorithms/sparse_permutation_test.cc +++ b/ortools/algorithms/sparse_permutation_test.cc @@ -19,8 +19,8 @@ #include "absl/container/flat_hash_set.h" #include "absl/random/distributions.h" -#include "gmock/gmock.h" #include "gtest/gtest.h" +#include "ortools/base/gmock.h" namespace operations_research { namespace {