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 visibility = [ 397 "//visibility:private", 398 ], 399 deps = [ 400 "//absl/base:config", 401 "//absl/hash", 402 "//absl/strings", 403 "//absl/strings:cord", 404 ], 405) 406 407cc_test( 408 name = "hash_function_defaults_test", 409 srcs = ["internal/hash_function_defaults_test.cc"], 410 copts = ABSL_TEST_COPTS, 411 linkopts = ABSL_DEFAULT_LINKOPTS, 412 tags = NOTEST_TAGS_MOBILE + ["no_test_loonix"], 413 deps = [ 414 ":hash_function_defaults", 415 "//absl/hash", 416 "//absl/random", 417 "//absl/strings", 418 "//absl/strings:cord", 419 "//absl/strings:cord_test_helpers", 420 "@com_google_googletest//:gtest_main", 421 ], 422) 423 424cc_library( 425 name = "hash_generator_testing", 426 testonly = 1, 427 srcs = ["internal/hash_generator_testing.cc"], 428 hdrs = ["internal/hash_generator_testing.h"], 429 copts = ABSL_TEST_COPTS, 430 linkopts = ABSL_DEFAULT_LINKOPTS, 431 deps = [ 432 ":hash_policy_testing", 433 "//absl/memory", 434 "//absl/meta:type_traits", 435 "//absl/strings", 436 ], 437) 438 439cc_library( 440 name = "hash_policy_testing", 441 testonly = 1, 442 hdrs = ["internal/hash_policy_testing.h"], 443 copts = ABSL_TEST_COPTS, 444 linkopts = ABSL_DEFAULT_LINKOPTS, 445 deps = [ 446 "//absl/hash", 447 "//absl/strings", 448 ], 449) 450 451cc_test( 452 name = "hash_policy_testing_test", 453 srcs = ["internal/hash_policy_testing_test.cc"], 454 copts = ABSL_TEST_COPTS, 455 linkopts = ABSL_DEFAULT_LINKOPTS, 456 deps = [ 457 ":hash_policy_testing", 458 "@com_google_googletest//:gtest_main", 459 ], 460) 461 462cc_library( 463 name = "hash_policy_traits", 464 hdrs = ["internal/hash_policy_traits.h"], 465 copts = ABSL_DEFAULT_COPTS, 466 linkopts = ABSL_DEFAULT_LINKOPTS, 467 deps = [ 468 ":common_policy_traits", 469 "//absl/meta:type_traits", 470 ], 471) 472 473cc_test( 474 name = "hash_policy_traits_test", 475 srcs = ["internal/hash_policy_traits_test.cc"], 476 copts = ABSL_TEST_COPTS, 477 linkopts = ABSL_DEFAULT_LINKOPTS, 478 deps = [ 479 ":hash_policy_traits", 480 "@com_google_googletest//:gtest_main", 481 ], 482) 483 484cc_library( 485 name = "common_policy_traits", 486 hdrs = ["internal/common_policy_traits.h"], 487 copts = ABSL_DEFAULT_COPTS, 488 linkopts = ABSL_DEFAULT_LINKOPTS, 489 visibility = ["//visibility:private"], 490 deps = ["//absl/meta:type_traits"], 491) 492 493cc_test( 494 name = "common_policy_traits_test", 495 srcs = ["internal/common_policy_traits_test.cc"], 496 copts = ABSL_TEST_COPTS, 497 linkopts = ABSL_DEFAULT_LINKOPTS, 498 deps = [ 499 ":common_policy_traits", 500 "@com_google_googletest//:gtest_main", 501 ], 502) 503 504cc_library( 505 name = "hashtable_debug", 506 hdrs = ["internal/hashtable_debug.h"], 507 copts = ABSL_DEFAULT_COPTS, 508 linkopts = ABSL_DEFAULT_LINKOPTS, 509 deps = [ 510 ":hashtable_debug_hooks", 511 ], 512) 513 514cc_library( 515 name = "hashtable_debug_hooks", 516 hdrs = ["internal/hashtable_debug_hooks.h"], 517 copts = ABSL_DEFAULT_COPTS, 518 linkopts = ABSL_DEFAULT_LINKOPTS, 519 deps = [ 520 "//absl/base:config", 521 ], 522) 523 524cc_library( 525 name = "hashtablez_sampler", 526 srcs = [ 527 "internal/hashtablez_sampler.cc", 528 "internal/hashtablez_sampler_force_weak_definition.cc", 529 ], 530 hdrs = ["internal/hashtablez_sampler.h"], 531 copts = ABSL_DEFAULT_COPTS, 532 linkopts = ABSL_DEFAULT_LINKOPTS, 533 deps = [ 534 "//absl/base", 535 "//absl/base:config", 536 "//absl/base:core_headers", 537 "//absl/debugging:stacktrace", 538 "//absl/memory", 539 "//absl/profiling:exponential_biased", 540 "//absl/profiling:sample_recorder", 541 "//absl/synchronization", 542 "//absl/utility", 543 ], 544) 545 546cc_test( 547 name = "hashtablez_sampler_test", 548 srcs = ["internal/hashtablez_sampler_test.cc"], 549 linkopts = ABSL_DEFAULT_LINKOPTS, 550 tags = [ 551 "no_test_wasm", 552 ], 553 deps = [ 554 ":hashtablez_sampler", 555 "//absl/base:config", 556 "//absl/base:core_headers", 557 "//absl/profiling:sample_recorder", 558 "//absl/synchronization", 559 "//absl/synchronization:thread_pool", 560 "//absl/time", 561 "@com_google_googletest//:gtest_main", 562 ], 563) 564 565cc_library( 566 name = "node_slot_policy", 567 hdrs = ["internal/node_slot_policy.h"], 568 copts = ABSL_DEFAULT_COPTS, 569 linkopts = ABSL_DEFAULT_LINKOPTS, 570 deps = ["//absl/base:config"], 571) 572 573cc_test( 574 name = "node_slot_policy_test", 575 srcs = ["internal/node_slot_policy_test.cc"], 576 copts = ABSL_TEST_COPTS, 577 linkopts = ABSL_DEFAULT_LINKOPTS, 578 deps = [ 579 ":hash_policy_traits", 580 ":node_slot_policy", 581 "@com_google_googletest//:gtest_main", 582 ], 583) 584 585cc_library( 586 name = "raw_hash_map", 587 hdrs = ["internal/raw_hash_map.h"], 588 copts = ABSL_DEFAULT_COPTS, 589 linkopts = ABSL_DEFAULT_LINKOPTS, 590 deps = [ 591 ":container_memory", 592 ":raw_hash_set", 593 "//absl/base:throw_delegate", 594 ], 595) 596 597cc_library( 598 name = "common", 599 hdrs = ["internal/common.h"], 600 copts = ABSL_DEFAULT_COPTS, 601 linkopts = ABSL_DEFAULT_LINKOPTS, 602 deps = [ 603 "//absl/meta:type_traits", 604 "//absl/types:optional", 605 ], 606) 607 608cc_library( 609 name = "raw_hash_set", 610 srcs = ["internal/raw_hash_set.cc"], 611 hdrs = ["internal/raw_hash_set.h"], 612 copts = ABSL_DEFAULT_COPTS, 613 linkopts = ABSL_DEFAULT_LINKOPTS, 614 deps = [ 615 ":common", 616 ":compressed_tuple", 617 ":container_memory", 618 ":hash_policy_traits", 619 ":hashtable_debug_hooks", 620 ":hashtablez_sampler", 621 "//absl/base:config", 622 "//absl/base:core_headers", 623 "//absl/base:endian", 624 "//absl/base:prefetch", 625 "//absl/base:raw_logging_internal", 626 "//absl/memory", 627 "//absl/meta:type_traits", 628 "//absl/numeric:bits", 629 "//absl/utility", 630 ], 631) 632 633cc_test( 634 name = "raw_hash_set_test", 635 srcs = ["internal/raw_hash_set_test.cc"], 636 copts = ABSL_TEST_COPTS, 637 linkstatic = 1, 638 tags = NOTEST_TAGS_MOBILE + [ 639 "no_test_loonix", 640 # TODO(b/237097643): investigate race and remove 641 "noarm_gemu", 642 ], 643 deps = [ 644 ":container_memory", 645 ":flat_hash_map", 646 ":flat_hash_set", 647 ":hash_function_defaults", 648 ":hash_policy_testing", 649 ":hashtable_debug", 650 ":raw_hash_set", 651 "//absl/base", 652 "//absl/base:config", 653 "//absl/base:core_headers", 654 "//absl/base:prefetch", 655 "//absl/base:raw_logging_internal", 656 "//absl/log", 657 "//absl/strings", 658 "@com_google_googletest//:gtest_main", 659 ], 660) 661 662cc_binary( 663 name = "raw_hash_set_benchmark", 664 testonly = 1, 665 srcs = ["internal/raw_hash_set_benchmark.cc"], 666 copts = ABSL_TEST_COPTS, 667 linkopts = ABSL_DEFAULT_LINKOPTS, 668 tags = ["benchmark"], 669 visibility = ["//visibility:private"], 670 deps = [ 671 ":hash_function_defaults", 672 ":raw_hash_set", 673 "//absl/base:raw_logging_internal", 674 "//absl/strings:str_format", 675 "@com_github_google_benchmark//:benchmark_main", 676 ], 677) 678 679cc_binary( 680 name = "raw_hash_set_probe_benchmark", 681 testonly = 1, 682 srcs = ["internal/raw_hash_set_probe_benchmark.cc"], 683 copts = ABSL_TEST_COPTS, 684 linkopts = select({ 685 "//conditions:default": [], 686 }) + ABSL_DEFAULT_LINKOPTS, 687 tags = ["benchmark"], 688 visibility = ["//visibility:private"], 689 deps = [ 690 ":flat_hash_map", 691 ":hash_function_defaults", 692 ":hashtable_debug", 693 ":raw_hash_set", 694 "//absl/random", 695 "//absl/random:distributions", 696 "//absl/strings", 697 "//absl/strings:str_format", 698 ], 699) 700 701cc_test( 702 name = "raw_hash_set_allocator_test", 703 size = "small", 704 srcs = ["internal/raw_hash_set_allocator_test.cc"], 705 copts = ABSL_TEST_COPTS, 706 linkopts = ABSL_DEFAULT_LINKOPTS, 707 deps = [ 708 ":raw_hash_set", 709 ":tracked", 710 "//absl/base:core_headers", 711 "@com_google_googletest//:gtest_main", 712 ], 713) 714 715cc_library( 716 name = "layout", 717 hdrs = ["internal/layout.h"], 718 copts = ABSL_DEFAULT_COPTS, 719 linkopts = ABSL_DEFAULT_LINKOPTS, 720 deps = [ 721 "//absl/base:config", 722 "//absl/base:core_headers", 723 "//absl/meta:type_traits", 724 "//absl/strings", 725 "//absl/types:span", 726 "//absl/utility", 727 ], 728) 729 730cc_test( 731 name = "layout_test", 732 size = "small", 733 srcs = ["internal/layout_test.cc"], 734 copts = ABSL_TEST_COPTS, 735 linkopts = ABSL_DEFAULT_LINKOPTS, 736 tags = NOTEST_TAGS_MOBILE + ["no_test_loonix"], 737 visibility = ["//visibility:private"], 738 deps = [ 739 ":layout", 740 "//absl/base:config", 741 "//absl/base:core_headers", 742 "//absl/base:raw_logging_internal", 743 "//absl/types:span", 744 "@com_google_googletest//:gtest_main", 745 ], 746) 747 748cc_binary( 749 name = "layout_benchmark", 750 testonly = 1, 751 srcs = ["internal/layout_benchmark.cc"], 752 copts = ABSL_TEST_COPTS, 753 linkopts = ABSL_DEFAULT_LINKOPTS, 754 tags = ["benchmark"], 755 visibility = ["//visibility:private"], 756 deps = [ 757 ":layout", 758 "//absl/base:core_headers", 759 "//absl/base:raw_logging_internal", 760 "@com_github_google_benchmark//:benchmark_main", 761 ], 762) 763 764cc_library( 765 name = "tracked", 766 testonly = 1, 767 hdrs = ["internal/tracked.h"], 768 copts = ABSL_TEST_COPTS, 769 linkopts = ABSL_DEFAULT_LINKOPTS, 770 deps = [ 771 "//absl/base:config", 772 ], 773) 774 775cc_library( 776 name = "unordered_map_constructor_test", 777 testonly = 1, 778 hdrs = ["internal/unordered_map_constructor_test.h"], 779 copts = ABSL_TEST_COPTS, 780 linkopts = ABSL_DEFAULT_LINKOPTS, 781 deps = [ 782 ":hash_generator_testing", 783 ":hash_policy_testing", 784 "@com_google_googletest//:gtest", 785 ], 786) 787 788cc_library( 789 name = "unordered_map_lookup_test", 790 testonly = 1, 791 hdrs = ["internal/unordered_map_lookup_test.h"], 792 copts = ABSL_TEST_COPTS, 793 linkopts = ABSL_DEFAULT_LINKOPTS, 794 deps = [ 795 ":hash_generator_testing", 796 ":hash_policy_testing", 797 "@com_google_googletest//:gtest", 798 ], 799) 800 801cc_library( 802 name = "unordered_map_modifiers_test", 803 testonly = 1, 804 hdrs = ["internal/unordered_map_modifiers_test.h"], 805 copts = ABSL_TEST_COPTS, 806 linkopts = ABSL_DEFAULT_LINKOPTS, 807 deps = [ 808 ":hash_generator_testing", 809 ":hash_policy_testing", 810 "@com_google_googletest//:gtest", 811 ], 812) 813 814cc_library( 815 name = "unordered_set_constructor_test", 816 testonly = 1, 817 hdrs = ["internal/unordered_set_constructor_test.h"], 818 copts = ABSL_TEST_COPTS, 819 linkopts = ABSL_DEFAULT_LINKOPTS, 820 deps = [ 821 ":hash_generator_testing", 822 ":hash_policy_testing", 823 "//absl/meta:type_traits", 824 "@com_google_googletest//:gtest", 825 ], 826) 827 828cc_library( 829 name = "unordered_set_members_test", 830 testonly = 1, 831 hdrs = ["internal/unordered_set_members_test.h"], 832 copts = ABSL_TEST_COPTS, 833 linkopts = ABSL_DEFAULT_LINKOPTS, 834 deps = [ 835 "//absl/meta:type_traits", 836 "@com_google_googletest//:gtest", 837 ], 838) 839 840cc_library( 841 name = "unordered_map_members_test", 842 testonly = 1, 843 hdrs = ["internal/unordered_map_members_test.h"], 844 copts = ABSL_TEST_COPTS, 845 linkopts = ABSL_DEFAULT_LINKOPTS, 846 deps = [ 847 "//absl/meta:type_traits", 848 "@com_google_googletest//:gtest", 849 ], 850) 851 852cc_library( 853 name = "unordered_set_lookup_test", 854 testonly = 1, 855 hdrs = ["internal/unordered_set_lookup_test.h"], 856 copts = ABSL_TEST_COPTS, 857 linkopts = ABSL_DEFAULT_LINKOPTS, 858 deps = [ 859 ":hash_generator_testing", 860 ":hash_policy_testing", 861 "@com_google_googletest//:gtest", 862 ], 863) 864 865cc_library( 866 name = "unordered_set_modifiers_test", 867 testonly = 1, 868 hdrs = ["internal/unordered_set_modifiers_test.h"], 869 copts = ABSL_TEST_COPTS, 870 linkopts = ABSL_DEFAULT_LINKOPTS, 871 deps = [ 872 ":hash_generator_testing", 873 ":hash_policy_testing", 874 "@com_google_googletest//:gtest", 875 ], 876) 877 878cc_test( 879 name = "unordered_set_test", 880 srcs = ["internal/unordered_set_test.cc"], 881 copts = ABSL_TEST_COPTS, 882 linkopts = ABSL_DEFAULT_LINKOPTS, 883 tags = ["no_test_loonix"], 884 deps = [ 885 ":unordered_set_constructor_test", 886 ":unordered_set_lookup_test", 887 ":unordered_set_members_test", 888 ":unordered_set_modifiers_test", 889 "@com_google_googletest//:gtest_main", 890 ], 891) 892 893cc_test( 894 name = "unordered_map_test", 895 srcs = ["internal/unordered_map_test.cc"], 896 copts = ABSL_TEST_COPTS, 897 linkopts = ABSL_DEFAULT_LINKOPTS, 898 tags = ["no_test_loonix"], 899 deps = [ 900 ":unordered_map_constructor_test", 901 ":unordered_map_lookup_test", 902 ":unordered_map_members_test", 903 ":unordered_map_modifiers_test", 904 "@com_google_googletest//:gtest_main", 905 ], 906) 907 908cc_test( 909 name = "sample_element_size_test", 910 srcs = ["sample_element_size_test.cc"], 911 copts = ABSL_TEST_COPTS, 912 linkopts = ABSL_DEFAULT_LINKOPTS, 913 tags = ["no_test_loonix"], 914 visibility = ["//visibility:private"], 915 deps = [ 916 ":flat_hash_map", 917 ":flat_hash_set", 918 ":node_hash_map", 919 ":node_hash_set", 920 "@com_google_googletest//:gtest_main", 921 ], 922) 923 924cc_library( 925 name = "btree", 926 srcs = [ 927 "internal/btree.h", 928 "internal/btree_container.h", 929 ], 930 hdrs = [ 931 "btree_map.h", 932 "btree_set.h", 933 ], 934 copts = ABSL_DEFAULT_COPTS, 935 linkopts = ABSL_DEFAULT_LINKOPTS, 936 visibility = ["//visibility:public"], 937 deps = [ 938 ":common", 939 ":common_policy_traits", 940 ":compressed_tuple", 941 ":container_memory", 942 ":layout", 943 "//absl/base:core_headers", 944 "//absl/base:raw_logging_internal", 945 "//absl/base:throw_delegate", 946 "//absl/memory", 947 "//absl/meta:type_traits", 948 "//absl/strings", 949 "//absl/strings:cord", 950 "//absl/types:compare", 951 "//absl/utility", 952 ], 953) 954 955cc_library( 956 name = "btree_test_common", 957 testonly = 1, 958 hdrs = ["btree_test.h"], 959 copts = ABSL_TEST_COPTS, 960 linkopts = ABSL_DEFAULT_LINKOPTS, 961 visibility = ["//visibility:private"], 962 deps = [ 963 ":btree", 964 ":flat_hash_set", 965 "//absl/strings", 966 "//absl/strings:cord", 967 "//absl/time", 968 ], 969) 970 971cc_test( 972 name = "btree_test", 973 size = "large", 974 srcs = [ 975 "btree_test.cc", 976 ], 977 copts = ABSL_TEST_COPTS, 978 linkopts = ABSL_DEFAULT_LINKOPTS, 979 shard_count = 10, 980 tags = [ 981 "no_test:os:ios", 982 "no_test_ios", 983 "no_test_wasm", 984 ], 985 visibility = ["//visibility:private"], 986 deps = [ 987 ":btree", 988 ":btree_test_common", 989 ":counting_allocator", 990 ":test_instance_tracker", 991 "//absl/algorithm:container", 992 "//absl/base:core_headers", 993 "//absl/base:raw_logging_internal", 994 "//absl/flags:flag", 995 "//absl/hash:hash_testing", 996 "//absl/memory", 997 "//absl/random", 998 "//absl/strings", 999 "//absl/types:compare", 1000 "@com_google_googletest//:gtest_main", 1001 ], 1002) 1003 1004cc_binary( 1005 name = "btree_benchmark", 1006 testonly = 1, 1007 srcs = [ 1008 "btree_benchmark.cc", 1009 ], 1010 copts = ABSL_TEST_COPTS, 1011 linkopts = ABSL_DEFAULT_LINKOPTS, 1012 tags = ["benchmark"], 1013 visibility = ["//visibility:private"], 1014 deps = [ 1015 ":btree", 1016 ":btree_test_common", 1017 ":flat_hash_map", 1018 ":flat_hash_set", 1019 ":hashtable_debug", 1020 "//absl/algorithm:container", 1021 "//absl/base:raw_logging_internal", 1022 "//absl/hash", 1023 "//absl/log", 1024 "//absl/memory", 1025 "//absl/random", 1026 "//absl/strings:cord", 1027 "//absl/strings:str_format", 1028 "//absl/time", 1029 "@com_github_google_benchmark//:benchmark_main", 1030 ], 1031) 1032