• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright 2017 The Abseil Authors.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      https://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17load(
18    "//absl:copts/configure_copts.bzl",
19    "ABSL_DEFAULT_COPTS",
20    "ABSL_DEFAULT_LINKOPTS",
21    "ABSL_TEST_COPTS",
22)
23
24package(default_visibility = ["//visibility:public"])
25
26licenses(["notice"])
27
28cc_library(
29    name = "compressed_tuple",
30    hdrs = ["internal/compressed_tuple.h"],
31    copts = ABSL_DEFAULT_COPTS,
32    linkopts = ABSL_DEFAULT_LINKOPTS,
33    deps = [
34        "//absl/utility",
35    ],
36)
37
38cc_test(
39    name = "compressed_tuple_test",
40    srcs = ["internal/compressed_tuple_test.cc"],
41    copts = ABSL_TEST_COPTS,
42    linkopts = ABSL_DEFAULT_LINKOPTS,
43    deps = [
44        ":compressed_tuple",
45        ":test_instance_tracker",
46        "//absl/memory",
47        "//absl/types:any",
48        "//absl/types:optional",
49        "//absl/utility",
50        "@com_google_googletest//:gtest_main",
51    ],
52)
53
54cc_library(
55    name = "fixed_array",
56    hdrs = ["fixed_array.h"],
57    copts = ABSL_DEFAULT_COPTS,
58    linkopts = ABSL_DEFAULT_LINKOPTS,
59    deps = [
60        ":compressed_tuple",
61        "//absl/algorithm",
62        "//absl/base:config",
63        "//absl/base:core_headers",
64        "//absl/base:dynamic_annotations",
65        "//absl/base:throw_delegate",
66        "//absl/memory",
67    ],
68)
69
70cc_test(
71    name = "fixed_array_test",
72    srcs = ["fixed_array_test.cc"],
73    copts = ABSL_TEST_COPTS,
74    linkopts = ABSL_DEFAULT_LINKOPTS,
75    deps = [
76        ":counting_allocator",
77        ":fixed_array",
78        "//absl/base:config",
79        "//absl/base:exception_testing",
80        "//absl/hash:hash_testing",
81        "//absl/memory",
82        "@com_google_googletest//:gtest_main",
83    ],
84)
85
86cc_test(
87    name = "fixed_array_exception_safety_test",
88    srcs = ["fixed_array_exception_safety_test.cc"],
89    copts = ABSL_TEST_COPTS,
90    linkopts = ABSL_DEFAULT_LINKOPTS,
91    deps = [
92        ":fixed_array",
93        "//absl/base:config",
94        "//absl/base:exception_safety_testing",
95        "@com_google_googletest//:gtest_main",
96    ],
97)
98
99cc_test(
100    name = "fixed_array_benchmark",
101    srcs = ["fixed_array_benchmark.cc"],
102    copts = ABSL_TEST_COPTS + ["$(STACK_FRAME_UNLIMITED)"],
103    linkopts = ABSL_DEFAULT_LINKOPTS,
104    tags = ["benchmark"],
105    deps = [
106        ":fixed_array",
107        "@com_github_google_benchmark//:benchmark_main",
108    ],
109)
110
111cc_library(
112    name = "inlined_vector_internal",
113    hdrs = ["internal/inlined_vector.h"],
114    copts = ABSL_DEFAULT_COPTS,
115    linkopts = ABSL_DEFAULT_LINKOPTS,
116    deps = [
117        ":compressed_tuple",
118        "//absl/base:core_headers",
119        "//absl/memory",
120        "//absl/meta:type_traits",
121        "//absl/types:span",
122    ],
123)
124
125cc_library(
126    name = "inlined_vector",
127    hdrs = ["inlined_vector.h"],
128    copts = ABSL_DEFAULT_COPTS,
129    linkopts = ABSL_DEFAULT_LINKOPTS,
130    deps = [
131        ":inlined_vector_internal",
132        "//absl/algorithm",
133        "//absl/base:core_headers",
134        "//absl/base:throw_delegate",
135        "//absl/memory",
136    ],
137)
138
139cc_library(
140    name = "counting_allocator",
141    testonly = 1,
142    hdrs = ["internal/counting_allocator.h"],
143    copts = ABSL_DEFAULT_COPTS,
144    linkopts = ABSL_DEFAULT_LINKOPTS,
145    visibility = ["//visibility:private"],
146    deps = ["//absl/base:config"],
147)
148
149cc_test(
150    name = "inlined_vector_test",
151    srcs = ["inlined_vector_test.cc"],
152    copts = ABSL_TEST_COPTS,
153    linkopts = ABSL_DEFAULT_LINKOPTS,
154    deps = [
155        ":counting_allocator",
156        ":inlined_vector",
157        ":test_instance_tracker",
158        "//absl/base:config",
159        "//absl/base:core_headers",
160        "//absl/base:exception_testing",
161        "//absl/base:raw_logging_internal",
162        "//absl/hash:hash_testing",
163        "//absl/memory",
164        "//absl/strings",
165        "@com_google_googletest//:gtest_main",
166    ],
167)
168
169cc_test(
170    name = "inlined_vector_benchmark",
171    srcs = ["inlined_vector_benchmark.cc"],
172    copts = ABSL_TEST_COPTS,
173    linkopts = ABSL_DEFAULT_LINKOPTS,
174    tags = ["benchmark"],
175    deps = [
176        ":inlined_vector",
177        "//absl/base:core_headers",
178        "//absl/base:raw_logging_internal",
179        "//absl/strings",
180        "@com_github_google_benchmark//:benchmark_main",
181    ],
182)
183
184cc_test(
185    name = "inlined_vector_exception_safety_test",
186    srcs = ["inlined_vector_exception_safety_test.cc"],
187    copts = ABSL_TEST_COPTS,
188    deps = [
189        ":inlined_vector",
190        "//absl/base:config",
191        "//absl/base:exception_safety_testing",
192        "@com_google_googletest//:gtest_main",
193    ],
194)
195
196cc_library(
197    name = "test_instance_tracker",
198    testonly = 1,
199    srcs = ["internal/test_instance_tracker.cc"],
200    hdrs = ["internal/test_instance_tracker.h"],
201    copts = ABSL_DEFAULT_COPTS,
202    linkopts = ABSL_DEFAULT_LINKOPTS,
203    visibility = [
204        "//absl:__subpackages__",
205    ],
206    deps = ["//absl/types:compare"],
207)
208
209cc_test(
210    name = "test_instance_tracker_test",
211    srcs = ["internal/test_instance_tracker_test.cc"],
212    copts = ABSL_TEST_COPTS,
213    linkopts = ABSL_DEFAULT_LINKOPTS,
214    deps = [
215        ":test_instance_tracker",
216        "@com_google_googletest//:gtest_main",
217    ],
218)
219
220NOTEST_TAGS_NONMOBILE = [
221    "no_test_darwin_x86_64",
222    "no_test_loonix",
223]
224
225NOTEST_TAGS_MOBILE = [
226    "no_test_android_arm",
227    "no_test_android_arm64",
228    "no_test_android_x86",
229    "no_test_ios_x86_64",
230]
231
232NOTEST_TAGS = NOTEST_TAGS_MOBILE + NOTEST_TAGS_NONMOBILE
233
234cc_library(
235    name = "flat_hash_map",
236    hdrs = ["flat_hash_map.h"],
237    copts = ABSL_DEFAULT_COPTS,
238    linkopts = ABSL_DEFAULT_LINKOPTS,
239    deps = [
240        ":container_memory",
241        ":hash_function_defaults",
242        ":raw_hash_map",
243        "//absl/algorithm:container",
244        "//absl/memory",
245    ],
246)
247
248cc_test(
249    name = "flat_hash_map_test",
250    srcs = ["flat_hash_map_test.cc"],
251    copts = ABSL_TEST_COPTS,
252    linkopts = ABSL_DEFAULT_LINKOPTS,
253    tags = NOTEST_TAGS_NONMOBILE,
254    deps = [
255        ":flat_hash_map",
256        ":hash_generator_testing",
257        ":unordered_map_constructor_test",
258        ":unordered_map_lookup_test",
259        ":unordered_map_members_test",
260        ":unordered_map_modifiers_test",
261        "//absl/base:raw_logging_internal",
262        "//absl/types:any",
263        "@com_google_googletest//:gtest_main",
264    ],
265)
266
267cc_library(
268    name = "flat_hash_set",
269    hdrs = ["flat_hash_set.h"],
270    copts = ABSL_DEFAULT_COPTS,
271    linkopts = ABSL_DEFAULT_LINKOPTS,
272    deps = [
273        ":container_memory",
274        ":hash_function_defaults",
275        ":raw_hash_set",
276        "//absl/algorithm:container",
277        "//absl/base:core_headers",
278        "//absl/memory",
279    ],
280)
281
282cc_test(
283    name = "flat_hash_set_test",
284    srcs = ["flat_hash_set_test.cc"],
285    copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"],
286    linkopts = ABSL_DEFAULT_LINKOPTS,
287    tags = NOTEST_TAGS_NONMOBILE,
288    deps = [
289        ":flat_hash_set",
290        ":hash_generator_testing",
291        ":unordered_set_constructor_test",
292        ":unordered_set_lookup_test",
293        ":unordered_set_members_test",
294        ":unordered_set_modifiers_test",
295        "//absl/base:raw_logging_internal",
296        "//absl/memory",
297        "//absl/strings",
298        "@com_google_googletest//:gtest_main",
299    ],
300)
301
302cc_library(
303    name = "node_hash_map",
304    hdrs = ["node_hash_map.h"],
305    copts = ABSL_DEFAULT_COPTS,
306    linkopts = ABSL_DEFAULT_LINKOPTS,
307    deps = [
308        ":container_memory",
309        ":hash_function_defaults",
310        ":node_hash_policy",
311        ":raw_hash_map",
312        "//absl/algorithm:container",
313        "//absl/memory",
314    ],
315)
316
317cc_test(
318    name = "node_hash_map_test",
319    srcs = ["node_hash_map_test.cc"],
320    copts = ABSL_TEST_COPTS,
321    linkopts = ABSL_DEFAULT_LINKOPTS,
322    tags = NOTEST_TAGS_NONMOBILE,
323    deps = [
324        ":hash_generator_testing",
325        ":node_hash_map",
326        ":tracked",
327        ":unordered_map_constructor_test",
328        ":unordered_map_lookup_test",
329        ":unordered_map_members_test",
330        ":unordered_map_modifiers_test",
331        "@com_google_googletest//:gtest_main",
332    ],
333)
334
335cc_library(
336    name = "node_hash_set",
337    hdrs = ["node_hash_set.h"],
338    copts = ABSL_DEFAULT_COPTS,
339    linkopts = ABSL_DEFAULT_LINKOPTS,
340    deps = [
341        ":hash_function_defaults",
342        ":node_hash_policy",
343        ":raw_hash_set",
344        "//absl/algorithm:container",
345        "//absl/memory",
346    ],
347)
348
349cc_test(
350    name = "node_hash_set_test",
351    srcs = ["node_hash_set_test.cc"],
352    copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"],
353    linkopts = ABSL_DEFAULT_LINKOPTS,
354    tags = NOTEST_TAGS_NONMOBILE,
355    deps = [
356        ":node_hash_set",
357        ":unordered_set_constructor_test",
358        ":unordered_set_lookup_test",
359        ":unordered_set_members_test",
360        ":unordered_set_modifiers_test",
361        "@com_google_googletest//:gtest_main",
362    ],
363)
364
365cc_library(
366    name = "container_memory",
367    hdrs = ["internal/container_memory.h"],
368    copts = ABSL_DEFAULT_COPTS,
369    linkopts = ABSL_DEFAULT_LINKOPTS,
370    deps = [
371        "//absl/base:config",
372        "//absl/memory",
373        "//absl/meta:type_traits",
374        "//absl/utility",
375    ],
376)
377
378cc_test(
379    name = "container_memory_test",
380    srcs = ["internal/container_memory_test.cc"],
381    copts = ABSL_TEST_COPTS,
382    linkopts = ABSL_DEFAULT_LINKOPTS,
383    tags = NOTEST_TAGS_NONMOBILE,
384    deps = [
385        ":container_memory",
386        ":test_instance_tracker",
387        "//absl/strings",
388        "@com_google_googletest//:gtest_main",
389    ],
390)
391
392cc_library(
393    name = "hash_function_defaults",
394    hdrs = ["internal/hash_function_defaults.h"],
395    copts = ABSL_DEFAULT_COPTS,
396    linkopts = ABSL_DEFAULT_LINKOPTS,
397    deps = [
398        "//absl/base:config",
399        "//absl/hash",
400        "//absl/strings",
401        "//absl/strings:cord",
402    ],
403)
404
405cc_test(
406    name = "hash_function_defaults_test",
407    srcs = ["internal/hash_function_defaults_test.cc"],
408    copts = ABSL_TEST_COPTS,
409    linkopts = ABSL_DEFAULT_LINKOPTS,
410    tags = NOTEST_TAGS,
411    deps = [
412        ":hash_function_defaults",
413        "//absl/hash",
414        "//absl/random",
415        "//absl/strings",
416        "//absl/strings:cord",
417        "//absl/strings:cord_test_helpers",
418        "@com_google_googletest//:gtest_main",
419    ],
420)
421
422cc_library(
423    name = "hash_generator_testing",
424    testonly = 1,
425    srcs = ["internal/hash_generator_testing.cc"],
426    hdrs = ["internal/hash_generator_testing.h"],
427    copts = ABSL_TEST_COPTS,
428    linkopts = ABSL_DEFAULT_LINKOPTS,
429    deps = [
430        ":hash_policy_testing",
431        "//absl/memory",
432        "//absl/meta:type_traits",
433        "//absl/strings",
434    ],
435)
436
437cc_library(
438    name = "hash_policy_testing",
439    testonly = 1,
440    hdrs = ["internal/hash_policy_testing.h"],
441    copts = ABSL_TEST_COPTS,
442    linkopts = ABSL_DEFAULT_LINKOPTS,
443    deps = [
444        "//absl/hash",
445        "//absl/strings",
446    ],
447)
448
449cc_test(
450    name = "hash_policy_testing_test",
451    srcs = ["internal/hash_policy_testing_test.cc"],
452    copts = ABSL_TEST_COPTS,
453    linkopts = ABSL_DEFAULT_LINKOPTS,
454    deps = [
455        ":hash_policy_testing",
456        "@com_google_googletest//:gtest_main",
457    ],
458)
459
460cc_library(
461    name = "hash_policy_traits",
462    hdrs = ["internal/hash_policy_traits.h"],
463    copts = ABSL_DEFAULT_COPTS,
464    linkopts = ABSL_DEFAULT_LINKOPTS,
465    deps = ["//absl/meta:type_traits"],
466)
467
468cc_test(
469    name = "hash_policy_traits_test",
470    srcs = ["internal/hash_policy_traits_test.cc"],
471    copts = ABSL_TEST_COPTS,
472    linkopts = ABSL_DEFAULT_LINKOPTS,
473    deps = [
474        ":hash_policy_traits",
475        "@com_google_googletest//:gtest_main",
476    ],
477)
478
479cc_library(
480    name = "hashtable_debug",
481    hdrs = ["internal/hashtable_debug.h"],
482    copts = ABSL_DEFAULT_COPTS,
483    linkopts = ABSL_DEFAULT_LINKOPTS,
484    deps = [
485        ":hashtable_debug_hooks",
486    ],
487)
488
489cc_library(
490    name = "hashtable_debug_hooks",
491    hdrs = ["internal/hashtable_debug_hooks.h"],
492    copts = ABSL_DEFAULT_COPTS,
493    linkopts = ABSL_DEFAULT_LINKOPTS,
494    deps = [
495        "//absl/base:config",
496    ],
497)
498
499cc_library(
500    name = "hashtablez_sampler",
501    srcs = [
502        "internal/hashtablez_sampler.cc",
503        "internal/hashtablez_sampler_force_weak_definition.cc",
504    ],
505    hdrs = ["internal/hashtablez_sampler.h"],
506    copts = ABSL_DEFAULT_COPTS,
507    linkopts = ABSL_DEFAULT_LINKOPTS,
508    deps = [
509        ":have_sse",
510        "//absl/base",
511        "//absl/base:core_headers",
512        "//absl/debugging:stacktrace",
513        "//absl/memory",
514        "//absl/profiling:exponential_biased",
515        "//absl/profiling:sample_recorder",
516        "//absl/synchronization",
517        "//absl/utility",
518    ],
519)
520
521cc_test(
522    name = "hashtablez_sampler_test",
523    srcs = ["internal/hashtablez_sampler_test.cc"],
524    linkopts = ABSL_DEFAULT_LINKOPTS,
525    deps = [
526        ":hashtablez_sampler",
527        ":have_sse",
528        "//absl/base:core_headers",
529        "//absl/profiling:sample_recorder",
530        "//absl/synchronization",
531        "//absl/synchronization:thread_pool",
532        "//absl/time",
533        "@com_google_googletest//:gtest_main",
534    ],
535)
536
537cc_library(
538    name = "node_hash_policy",
539    hdrs = ["internal/node_hash_policy.h"],
540    copts = ABSL_DEFAULT_COPTS,
541    linkopts = ABSL_DEFAULT_LINKOPTS,
542    deps = ["//absl/base:config"],
543)
544
545cc_test(
546    name = "node_hash_policy_test",
547    srcs = ["internal/node_hash_policy_test.cc"],
548    copts = ABSL_TEST_COPTS,
549    linkopts = ABSL_DEFAULT_LINKOPTS,
550    deps = [
551        ":hash_policy_traits",
552        ":node_hash_policy",
553        "@com_google_googletest//:gtest_main",
554    ],
555)
556
557cc_library(
558    name = "raw_hash_map",
559    hdrs = ["internal/raw_hash_map.h"],
560    copts = ABSL_DEFAULT_COPTS,
561    linkopts = ABSL_DEFAULT_LINKOPTS,
562    deps = [
563        ":container_memory",
564        ":raw_hash_set",
565        "//absl/base:throw_delegate",
566    ],
567)
568
569cc_library(
570    name = "have_sse",
571    hdrs = ["internal/have_sse.h"],
572    copts = ABSL_DEFAULT_COPTS,
573    linkopts = ABSL_DEFAULT_LINKOPTS,
574    visibility = ["//visibility:private"],
575)
576
577cc_library(
578    name = "common",
579    hdrs = ["internal/common.h"],
580    copts = ABSL_DEFAULT_COPTS,
581    linkopts = ABSL_DEFAULT_LINKOPTS,
582    deps = [
583        "//absl/meta:type_traits",
584        "//absl/types:optional",
585    ],
586)
587
588cc_library(
589    name = "raw_hash_set",
590    srcs = ["internal/raw_hash_set.cc"],
591    hdrs = ["internal/raw_hash_set.h"],
592    copts = ABSL_DEFAULT_COPTS,
593    linkopts = ABSL_DEFAULT_LINKOPTS,
594    deps = [
595        ":common",
596        ":compressed_tuple",
597        ":container_memory",
598        ":hash_policy_traits",
599        ":hashtable_debug_hooks",
600        ":hashtablez_sampler",
601        ":have_sse",
602        "//absl/base:config",
603        "//absl/base:core_headers",
604        "//absl/base:endian",
605        "//absl/memory",
606        "//absl/meta:type_traits",
607        "//absl/numeric:bits",
608        "//absl/utility",
609    ],
610)
611
612cc_test(
613    name = "raw_hash_set_test",
614    srcs = ["internal/raw_hash_set_test.cc"],
615    copts = ABSL_TEST_COPTS,
616    linkstatic = 1,
617    tags = NOTEST_TAGS,
618    deps = [
619        ":container_memory",
620        ":hash_function_defaults",
621        ":hash_policy_testing",
622        ":hashtable_debug",
623        ":raw_hash_set",
624        "//absl/base",
625        "//absl/base:config",
626        "//absl/base:core_headers",
627        "//absl/base:raw_logging_internal",
628        "//absl/strings",
629        "@com_google_googletest//:gtest_main",
630    ],
631)
632
633cc_binary(
634    name = "raw_hash_set_benchmark",
635    testonly = 1,
636    srcs = ["internal/raw_hash_set_benchmark.cc"],
637    copts = ABSL_TEST_COPTS,
638    linkopts = ABSL_DEFAULT_LINKOPTS,
639    tags = ["benchmark"],
640    visibility = ["//visibility:private"],
641    deps = [
642        ":hash_function_defaults",
643        ":raw_hash_set",
644        "//absl/base:raw_logging_internal",
645        "//absl/strings:str_format",
646        "@com_github_google_benchmark//:benchmark_main",
647    ],
648)
649
650cc_binary(
651    name = "raw_hash_set_probe_benchmark",
652    testonly = 1,
653    srcs = ["internal/raw_hash_set_probe_benchmark.cc"],
654    copts = ABSL_TEST_COPTS,
655    linkopts = select({
656        "//conditions:default": [],
657    }) + ABSL_DEFAULT_LINKOPTS,
658    tags = ["benchmark"],
659    visibility = ["//visibility:private"],
660    deps = [
661        ":flat_hash_map",
662        ":hash_function_defaults",
663        ":hashtable_debug",
664        ":raw_hash_set",
665        "//absl/random",
666        "//absl/random:distributions",
667        "//absl/strings",
668        "//absl/strings:str_format",
669    ],
670)
671
672cc_test(
673    name = "raw_hash_set_allocator_test",
674    size = "small",
675    srcs = ["internal/raw_hash_set_allocator_test.cc"],
676    copts = ABSL_TEST_COPTS,
677    linkopts = ABSL_DEFAULT_LINKOPTS,
678    deps = [
679        ":raw_hash_set",
680        ":tracked",
681        "//absl/base:core_headers",
682        "@com_google_googletest//:gtest_main",
683    ],
684)
685
686cc_library(
687    name = "layout",
688    hdrs = ["internal/layout.h"],
689    copts = ABSL_DEFAULT_COPTS,
690    linkopts = ABSL_DEFAULT_LINKOPTS,
691    deps = [
692        "//absl/base:config",
693        "//absl/base:core_headers",
694        "//absl/meta:type_traits",
695        "//absl/strings",
696        "//absl/types:span",
697        "//absl/utility",
698    ],
699)
700
701cc_test(
702    name = "layout_test",
703    size = "small",
704    srcs = ["internal/layout_test.cc"],
705    copts = ABSL_TEST_COPTS,
706    linkopts = ABSL_DEFAULT_LINKOPTS,
707    tags = NOTEST_TAGS,
708    visibility = ["//visibility:private"],
709    deps = [
710        ":layout",
711        "//absl/base:config",
712        "//absl/base:core_headers",
713        "//absl/base:raw_logging_internal",
714        "//absl/types:span",
715        "@com_google_googletest//:gtest_main",
716    ],
717)
718
719cc_binary(
720    name = "layout_benchmark",
721    testonly = 1,
722    srcs = ["internal/layout_benchmark.cc"],
723    copts = ABSL_TEST_COPTS,
724    linkopts = ABSL_DEFAULT_LINKOPTS,
725    tags = ["benchmark"],
726    visibility = ["//visibility:private"],
727    deps = [
728        ":layout",
729        "//absl/base:core_headers",
730        "//absl/base:raw_logging_internal",
731        "@com_github_google_benchmark//:benchmark_main",
732    ],
733)
734
735cc_library(
736    name = "tracked",
737    testonly = 1,
738    hdrs = ["internal/tracked.h"],
739    copts = ABSL_TEST_COPTS,
740    linkopts = ABSL_DEFAULT_LINKOPTS,
741    deps = [
742        "//absl/base:config",
743    ],
744)
745
746cc_library(
747    name = "unordered_map_constructor_test",
748    testonly = 1,
749    hdrs = ["internal/unordered_map_constructor_test.h"],
750    copts = ABSL_TEST_COPTS,
751    linkopts = ABSL_DEFAULT_LINKOPTS,
752    deps = [
753        ":hash_generator_testing",
754        ":hash_policy_testing",
755        "@com_google_googletest//:gtest",
756    ],
757)
758
759cc_library(
760    name = "unordered_map_lookup_test",
761    testonly = 1,
762    hdrs = ["internal/unordered_map_lookup_test.h"],
763    copts = ABSL_TEST_COPTS,
764    linkopts = ABSL_DEFAULT_LINKOPTS,
765    deps = [
766        ":hash_generator_testing",
767        ":hash_policy_testing",
768        "@com_google_googletest//:gtest",
769    ],
770)
771
772cc_library(
773    name = "unordered_map_modifiers_test",
774    testonly = 1,
775    hdrs = ["internal/unordered_map_modifiers_test.h"],
776    copts = ABSL_TEST_COPTS,
777    linkopts = ABSL_DEFAULT_LINKOPTS,
778    deps = [
779        ":hash_generator_testing",
780        ":hash_policy_testing",
781        "@com_google_googletest//:gtest",
782    ],
783)
784
785cc_library(
786    name = "unordered_set_constructor_test",
787    testonly = 1,
788    hdrs = ["internal/unordered_set_constructor_test.h"],
789    copts = ABSL_TEST_COPTS,
790    linkopts = ABSL_DEFAULT_LINKOPTS,
791    deps = [
792        ":hash_generator_testing",
793        ":hash_policy_testing",
794        "//absl/meta:type_traits",
795        "@com_google_googletest//:gtest",
796    ],
797)
798
799cc_library(
800    name = "unordered_set_members_test",
801    testonly = 1,
802    hdrs = ["internal/unordered_set_members_test.h"],
803    copts = ABSL_TEST_COPTS,
804    linkopts = ABSL_DEFAULT_LINKOPTS,
805    deps = [
806        "//absl/meta:type_traits",
807        "@com_google_googletest//:gtest",
808    ],
809)
810
811cc_library(
812    name = "unordered_map_members_test",
813    testonly = 1,
814    hdrs = ["internal/unordered_map_members_test.h"],
815    copts = ABSL_TEST_COPTS,
816    linkopts = ABSL_DEFAULT_LINKOPTS,
817    deps = [
818        "//absl/meta:type_traits",
819        "@com_google_googletest//:gtest",
820    ],
821)
822
823cc_library(
824    name = "unordered_set_lookup_test",
825    testonly = 1,
826    hdrs = ["internal/unordered_set_lookup_test.h"],
827    copts = ABSL_TEST_COPTS,
828    linkopts = ABSL_DEFAULT_LINKOPTS,
829    deps = [
830        ":hash_generator_testing",
831        ":hash_policy_testing",
832        "@com_google_googletest//:gtest",
833    ],
834)
835
836cc_library(
837    name = "unordered_set_modifiers_test",
838    testonly = 1,
839    hdrs = ["internal/unordered_set_modifiers_test.h"],
840    copts = ABSL_TEST_COPTS,
841    linkopts = ABSL_DEFAULT_LINKOPTS,
842    deps = [
843        ":hash_generator_testing",
844        ":hash_policy_testing",
845        "@com_google_googletest//:gtest",
846    ],
847)
848
849cc_test(
850    name = "unordered_set_test",
851    srcs = ["internal/unordered_set_test.cc"],
852    copts = ABSL_TEST_COPTS,
853    linkopts = ABSL_DEFAULT_LINKOPTS,
854    tags = NOTEST_TAGS_NONMOBILE,
855    deps = [
856        ":unordered_set_constructor_test",
857        ":unordered_set_lookup_test",
858        ":unordered_set_members_test",
859        ":unordered_set_modifiers_test",
860        "@com_google_googletest//:gtest_main",
861    ],
862)
863
864cc_test(
865    name = "unordered_map_test",
866    srcs = ["internal/unordered_map_test.cc"],
867    copts = ABSL_TEST_COPTS,
868    linkopts = ABSL_DEFAULT_LINKOPTS,
869    tags = NOTEST_TAGS_NONMOBILE,
870    deps = [
871        ":unordered_map_constructor_test",
872        ":unordered_map_lookup_test",
873        ":unordered_map_members_test",
874        ":unordered_map_modifiers_test",
875        "@com_google_googletest//:gtest_main",
876    ],
877)
878
879cc_test(
880    name = "sample_element_size_test",
881    srcs = ["sample_element_size_test.cc"],
882    copts = ABSL_TEST_COPTS,
883    linkopts = ABSL_DEFAULT_LINKOPTS,
884    tags = NOTEST_TAGS_NONMOBILE,
885    visibility = ["//visibility:private"],
886    deps = [
887        ":flat_hash_map",
888        ":flat_hash_set",
889        ":node_hash_map",
890        ":node_hash_set",
891        "@com_google_googletest//:gtest_main",
892    ],
893)
894
895cc_library(
896    name = "btree",
897    srcs = [
898        "internal/btree.h",
899        "internal/btree_container.h",
900    ],
901    hdrs = [
902        "btree_map.h",
903        "btree_set.h",
904    ],
905    copts = ABSL_DEFAULT_COPTS,
906    linkopts = ABSL_DEFAULT_LINKOPTS,
907    visibility = ["//visibility:public"],
908    deps = [
909        ":common",
910        ":compressed_tuple",
911        ":container_memory",
912        ":layout",
913        "//absl/base:core_headers",
914        "//absl/base:throw_delegate",
915        "//absl/memory",
916        "//absl/meta:type_traits",
917        "//absl/strings",
918        "//absl/strings:cord",
919        "//absl/types:compare",
920        "//absl/utility",
921    ],
922)
923
924cc_library(
925    name = "btree_test_common",
926    testonly = 1,
927    hdrs = ["btree_test.h"],
928    copts = ABSL_TEST_COPTS,
929    linkopts = ABSL_DEFAULT_LINKOPTS,
930    visibility = ["//visibility:private"],
931    deps = [
932        ":btree",
933        ":flat_hash_set",
934        "//absl/strings",
935        "//absl/strings:cord",
936        "//absl/time",
937    ],
938)
939
940cc_test(
941    name = "btree_test",
942    size = "large",
943    srcs = [
944        "btree_test.cc",
945    ],
946    copts = ABSL_TEST_COPTS,
947    linkopts = ABSL_DEFAULT_LINKOPTS,
948    shard_count = 10,
949    visibility = ["//visibility:private"],
950    deps = [
951        ":btree",
952        ":btree_test_common",
953        ":counting_allocator",
954        ":test_instance_tracker",
955        "//absl/base:core_headers",
956        "//absl/base:raw_logging_internal",
957        "//absl/flags:flag",
958        "//absl/hash:hash_testing",
959        "//absl/memory",
960        "//absl/meta:type_traits",
961        "//absl/strings",
962        "//absl/types:compare",
963        "@com_google_googletest//:gtest_main",
964    ],
965)
966
967cc_binary(
968    name = "btree_benchmark",
969    testonly = 1,
970    srcs = [
971        "btree_benchmark.cc",
972    ],
973    copts = ABSL_TEST_COPTS,
974    linkopts = ABSL_DEFAULT_LINKOPTS,
975    tags = ["benchmark"],
976    visibility = ["//visibility:private"],
977    deps = [
978        ":btree",
979        ":btree_test_common",
980        ":flat_hash_map",
981        ":flat_hash_set",
982        ":hashtable_debug",
983        "//absl/base:raw_logging_internal",
984        "//absl/flags:flag",
985        "//absl/hash",
986        "//absl/memory",
987        "//absl/strings:cord",
988        "//absl/strings:str_format",
989        "//absl/time",
990        "@com_github_google_benchmark//:benchmark_main",
991    ],
992)
993