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