summaryrefslogtreecommitdiff
path: root/absl/hash/BUILD.bazel
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2023-05-25 10:40:43 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-05-25 10:41:35 -0700
commitc154d20abce2f1ae6bd35bd774313e351493219b (patch)
tree833c7ce2f41008b4759441f5109cdec2385d77cc /absl/hash/BUILD.bazel
parent4e4b48faadecb81dc1bd50ada1024a82bb162366 (diff)
Split absl/hash/hash_test.cc into two files
hash_test.cc leans heavily on INSTANTIATE_TYPED_TEST_SUITE_P, which is quite memory- and CPU-hungry. Split a few heavyweight tests into a new hash_instantiated_test.cc, reducing peak RAM consumption (or, on multicore systems, compilation time). PiperOrigin-RevId: 535305679 Change-Id: Ic204da0a47c749c3f7db5f902ade8d74ed3043bb
Diffstat (limited to 'absl/hash/BUILD.bazel')
-rw-r--r--absl/hash/BUILD.bazel27
1 files changed, 26 insertions, 1 deletions
diff --git a/absl/hash/BUILD.bazel b/absl/hash/BUILD.bazel
index a0db919b..7f964ae7 100644
--- a/absl/hash/BUILD.bazel
+++ b/absl/hash/BUILD.bazel
@@ -68,13 +68,17 @@ cc_library(
cc_test(
name = "hash_test",
- srcs = ["hash_test.cc"],
+ srcs = [
+ "hash_test.cc",
+ "internal/hash_test.h",
+ ],
copts = ABSL_TEST_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash",
":hash_testing",
":spy_hash_state",
+ "//absl/base:config",
"//absl/base:core_headers",
"//absl/container:btree",
"//absl/container:flat_hash_map",
@@ -88,6 +92,27 @@ cc_test(
],
)
+cc_test(
+ name = "hash_instantiated_test",
+ srcs = [
+ "hash_instantiated_test.cc",
+ "internal/hash_test.h",
+ ],
+ copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
+ deps = [
+ ":hash",
+ ":hash_testing",
+ "//absl/base:config",
+ "//absl/container:btree",
+ "//absl/container:flat_hash_map",
+ "//absl/container:flat_hash_set",
+ "//absl/container:node_hash_map",
+ "//absl/container:node_hash_set",
+ "@com_google_googletest//:gtest_main",
+ ],
+)
+
cc_binary(
name = "hash_benchmark",
testonly = 1,