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("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test") 18load( 19 "//absl:copts/configure_copts.bzl", 20 "ABSL_DEFAULT_COPTS", 21 "ABSL_DEFAULT_LINKOPTS", 22 "ABSL_TEST_COPTS", 23) 24 25package(default_visibility = ["//visibility:public"]) 26 27licenses(["notice"]) 28 29cc_library( 30 name = "compressed_tuple", 31 hdrs = ["internal/compressed_tuple.h"], 32 copts = ABSL_DEFAULT_COPTS, 33 linkopts = ABSL_DEFAULT_LINKOPTS, 34 deps = [ 35 "//absl/utility", 36 ], 37) 38 39cc_test( 40 name = "compressed_tuple_test", 41 srcs = ["internal/compressed_tuple_test.cc"], 42 copts = ABSL_TEST_COPTS, 43 linkopts = ABSL_DEFAULT_LINKOPTS, 44 deps = [ 45 ":compressed_tuple", 46 ":test_instance_tracker", 47 "//absl/memory", 48 "//absl/types:any", 49 "//absl/types:optional", 50 "//absl/utility", 51 "@com_google_googletest//:gtest_main", 52 ], 53) 54 55cc_library( 56 name = "fixed_array", 57 hdrs = ["fixed_array.h"], 58 copts = ABSL_DEFAULT_COPTS, 59 linkopts = ABSL_DEFAULT_LINKOPTS, 60 deps = [ 61 ":compressed_tuple", 62 "//absl/algorithm", 63 "//absl/base:config", 64 "//absl/base:core_headers", 65 "//absl/base:dynamic_annotations", 66 "//absl/base:throw_delegate", 67 "//absl/memory", 68 ], 69) 70 71cc_test( 72 name = "fixed_array_test", 73 srcs = ["fixed_array_test.cc"], 74 copts = ABSL_TEST_COPTS, 75 linkopts = ABSL_DEFAULT_LINKOPTS, 76 deps = [ 77 ":counting_allocator", 78 ":fixed_array", 79 "//absl/base:config", 80 "//absl/base:exception_testing", 81 "//absl/hash:hash_testing", 82 "//absl/memory", 83 "@com_google_googletest//:gtest_main", 84 ], 85) 86 87cc_test( 88 name = "fixed_array_exception_safety_test", 89 srcs = ["fixed_array_exception_safety_test.cc"], 90 copts = ABSL_TEST_COPTS, 91 linkopts = ABSL_DEFAULT_LINKOPTS, 92 deps = [ 93 ":fixed_array", 94 "//absl/base:config", 95 "//absl/base:exception_safety_testing", 96 "@com_google_googletest//:gtest_main", 97 ], 98) 99 100cc_test( 101 name = "fixed_array_benchmark", 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 ], 138) 139 140cc_library( 141 name = "counting_allocator", 142 testonly = 1, 143 hdrs = ["internal/counting_allocator.h"], 144 copts = ABSL_DEFAULT_COPTS, 145 linkopts = ABSL_DEFAULT_LINKOPTS, 146 visibility = ["//visibility:private"], 147 deps = ["//absl/base:config"], 148) 149 150cc_test( 151 name = "inlined_vector_test", 152 srcs = ["inlined_vector_test.cc"], 153 copts = ABSL_TEST_COPTS, 154 linkopts = ABSL_DEFAULT_LINKOPTS, 155 deps = [ 156 ":counting_allocator", 157 ":inlined_vector", 158 ":test_instance_tracker", 159 "//absl/base:config", 160 "//absl/base:core_headers", 161 "//absl/base:exception_testing", 162 "//absl/base:raw_logging_internal", 163 "//absl/hash:hash_testing", 164 "//absl/memory", 165 "//absl/strings", 166 "@com_google_googletest//:gtest_main", 167 ], 168) 169 170cc_test( 171 name = "inlined_vector_benchmark", 172 srcs = ["inlined_vector_benchmark.cc"], 173 copts = ABSL_TEST_COPTS, 174 linkopts = ABSL_DEFAULT_LINKOPTS, 175 tags = ["benchmark"], 176 deps = [ 177 ":inlined_vector", 178 "//absl/base:core_headers", 179 "//absl/base:raw_logging_internal", 180 "//absl/strings", 181 "@com_github_google_benchmark//:benchmark_main", 182 ], 183) 184 185cc_test( 186 name = "inlined_vector_exception_safety_test", 187 srcs = ["inlined_vector_exception_safety_test.cc"], 188 copts = ABSL_TEST_COPTS, 189 deps = [ 190 ":inlined_vector", 191 "//absl/base:config", 192 "//absl/base:exception_safety_testing", 193 "@com_google_googletest//:gtest_main", 194 ], 195) 196 197cc_library( 198 name = "test_instance_tracker", 199 testonly = 1, 200 srcs = ["internal/test_instance_tracker.cc"], 201 hdrs = ["internal/test_instance_tracker.h"], 202 copts = ABSL_DEFAULT_COPTS, 203 linkopts = ABSL_DEFAULT_LINKOPTS, 204 visibility = [ 205 "//absl:__subpackages__", 206 ], 207 deps = ["//absl/types:compare"], 208) 209 210cc_test( 211 name = "test_instance_tracker_test", 212 srcs = ["internal/test_instance_tracker_test.cc"], 213 copts = ABSL_TEST_COPTS, 214 linkopts = ABSL_DEFAULT_LINKOPTS, 215 deps = [ 216 ":test_instance_tracker", 217 "@com_google_googletest//:gtest_main", 218 ], 219) 220 221NOTEST_TAGS_NONMOBILE = [ 222 "no_test_darwin_x86_64", 223 "no_test_loonix", 224] 225 226NOTEST_TAGS_MOBILE = [ 227 "no_test_android_arm", 228 "no_test_android_arm64", 229 "no_test_android_x86", 230 "no_test_ios_x86_64", 231] 232 233NOTEST_TAGS = NOTEST_TAGS_MOBILE + NOTEST_TAGS_NONMOBILE 234 235cc_library( 236 name = "flat_hash_map", 237 hdrs = ["flat_hash_map.h"], 238 copts = ABSL_DEFAULT_COPTS, 239 linkopts = ABSL_DEFAULT_LINKOPTS, 240 deps = [ 241 ":container_memory", 242 ":hash_function_defaults", 243 ":raw_hash_map", 244 "//absl/algorithm:container", 245 "//absl/memory", 246 ], 247) 248 249cc_test( 250 name = "flat_hash_map_test", 251 srcs = ["flat_hash_map_test.cc"], 252 copts = ABSL_TEST_COPTS, 253 linkopts = ABSL_DEFAULT_LINKOPTS, 254 tags = NOTEST_TAGS_NONMOBILE, 255 deps = [ 256 ":flat_hash_map", 257 ":hash_generator_testing", 258 ":unordered_map_constructor_test", 259 ":unordered_map_lookup_test", 260 ":unordered_map_members_test", 261 ":unordered_map_modifiers_test", 262 "//absl/base:raw_logging_internal", 263 "//absl/types:any", 264 "@com_google_googletest//:gtest_main", 265 ], 266) 267 268cc_library( 269 name = "flat_hash_set", 270 hdrs = ["flat_hash_set.h"], 271 copts = ABSL_DEFAULT_COPTS, 272 linkopts = ABSL_DEFAULT_LINKOPTS, 273 deps = [ 274 ":container_memory", 275 ":hash_function_defaults", 276 ":raw_hash_set", 277 "//absl/algorithm:container", 278 "//absl/base:core_headers", 279 "//absl/memory", 280 ], 281) 282 283cc_test( 284 name = "flat_hash_set_test", 285 srcs = ["flat_hash_set_test.cc"], 286 copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"], 287 linkopts = ABSL_DEFAULT_LINKOPTS, 288 tags = NOTEST_TAGS_NONMOBILE, 289 deps = [ 290 ":flat_hash_set", 291 ":hash_generator_testing", 292 ":unordered_set_constructor_test", 293 ":unordered_set_lookup_test", 294 ":unordered_set_members_test", 295 ":unordered_set_modifiers_test", 296 "//absl/base:raw_logging_internal", 297 "//absl/memory", 298 "//absl/strings", 299 "@com_google_googletest//:gtest_main", 300 ], 301) 302 303cc_library( 304 name = "node_hash_map", 305 hdrs = ["node_hash_map.h"], 306 copts = ABSL_DEFAULT_COPTS, 307 linkopts = ABSL_DEFAULT_LINKOPTS, 308 deps = [ 309 ":container_memory", 310 ":hash_function_defaults", 311 ":node_hash_policy", 312 ":raw_hash_map", 313 "//absl/algorithm:container", 314 "//absl/memory", 315 ], 316) 317 318cc_test( 319 name = "node_hash_map_test", 320 srcs = ["node_hash_map_test.cc"], 321 copts = ABSL_TEST_COPTS, 322 linkopts = ABSL_DEFAULT_LINKOPTS, 323 tags = NOTEST_TAGS_NONMOBILE, 324 deps = [ 325 ":hash_generator_testing", 326 ":node_hash_map", 327 ":tracked", 328 ":unordered_map_constructor_test", 329 ":unordered_map_lookup_test", 330 ":unordered_map_members_test", 331 ":unordered_map_modifiers_test", 332 "@com_google_googletest//:gtest_main", 333 ], 334) 335 336cc_library( 337 name = "node_hash_set", 338 hdrs = ["node_hash_set.h"], 339 copts = ABSL_DEFAULT_COPTS, 340 linkopts = ABSL_DEFAULT_LINKOPTS, 341 deps = [ 342 ":hash_function_defaults", 343 ":node_hash_policy", 344 ":raw_hash_set", 345 "//absl/algorithm:container", 346 "//absl/memory", 347 ], 348) 349 350cc_test( 351 name = "node_hash_set_test", 352 srcs = ["node_hash_set_test.cc"], 353 copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"], 354 linkopts = ABSL_DEFAULT_LINKOPTS, 355 tags = NOTEST_TAGS_NONMOBILE, 356 deps = [ 357 ":node_hash_set", 358 ":unordered_set_constructor_test", 359 ":unordered_set_lookup_test", 360 ":unordered_set_members_test", 361 ":unordered_set_modifiers_test", 362 "@com_google_googletest//:gtest_main", 363 ], 364) 365 366cc_library( 367 name = "container_memory", 368 hdrs = ["internal/container_memory.h"], 369 copts = ABSL_DEFAULT_COPTS, 370 linkopts = ABSL_DEFAULT_LINKOPTS, 371 deps = [ 372 "//absl/base:config", 373 "//absl/memory", 374 "//absl/meta:type_traits", 375 "//absl/utility", 376 ], 377) 378 379cc_test( 380 name = "container_memory_test", 381 srcs = ["internal/container_memory_test.cc"], 382 copts = ABSL_TEST_COPTS, 383 linkopts = ABSL_DEFAULT_LINKOPTS, 384 tags = NOTEST_TAGS_NONMOBILE, 385 deps = [ 386 ":container_memory", 387 ":test_instance_tracker", 388 "//absl/strings", 389 "@com_google_googletest//:gtest_main", 390 ], 391) 392 393cc_library( 394 name = "hash_function_defaults", 395 hdrs = ["internal/hash_function_defaults.h"], 396 copts = ABSL_DEFAULT_COPTS, 397 linkopts = ABSL_DEFAULT_LINKOPTS, 398 deps = [ 399 "//absl/base:config", 400 "//absl/hash", 401 "//absl/strings", 402 "//absl/strings:cord", 403 ], 404) 405 406cc_test( 407 name = "hash_function_defaults_test", 408 srcs = ["internal/hash_function_defaults_test.cc"], 409 copts = ABSL_TEST_COPTS, 410 linkopts = ABSL_DEFAULT_LINKOPTS, 411 tags = NOTEST_TAGS, 412 deps = [ 413 ":hash_function_defaults", 414 "//absl/hash", 415 "//absl/random", 416 "//absl/strings", 417 "//absl/strings:cord", 418 "//absl/strings:cord_test_helpers", 419 "@com_google_googletest//:gtest_main", 420 ], 421) 422 423cc_library( 424 name = "hash_generator_testing", 425 testonly = 1, 426 srcs = ["internal/hash_generator_testing.cc"], 427 hdrs = ["internal/hash_generator_testing.h"], 428 copts = ABSL_TEST_COPTS, 429 linkopts = ABSL_DEFAULT_LINKOPTS, 430 deps = [ 431 ":hash_policy_testing", 432 "//absl/memory", 433 "//absl/meta:type_traits", 434 "//absl/strings", 435 ], 436) 437 438cc_library( 439 name = "hash_policy_testing", 440 testonly = 1, 441 hdrs = ["internal/hash_policy_testing.h"], 442 copts = ABSL_TEST_COPTS, 443 linkopts = ABSL_DEFAULT_LINKOPTS, 444 deps = [ 445 "//absl/hash", 446 "//absl/strings", 447 ], 448) 449 450cc_test( 451 name = "hash_policy_testing_test", 452 srcs = ["internal/hash_policy_testing_test.cc"], 453 copts = ABSL_TEST_COPTS, 454 linkopts = ABSL_DEFAULT_LINKOPTS, 455 deps = [ 456 ":hash_policy_testing", 457 "@com_google_googletest//:gtest_main", 458 ], 459) 460 461cc_library( 462 name = "hash_policy_traits", 463 hdrs = ["internal/hash_policy_traits.h"], 464 copts = ABSL_DEFAULT_COPTS, 465 linkopts = ABSL_DEFAULT_LINKOPTS, 466 deps = ["//absl/meta:type_traits"], 467) 468 469cc_test( 470 name = "hash_policy_traits_test", 471 srcs = ["internal/hash_policy_traits_test.cc"], 472 copts = ABSL_TEST_COPTS, 473 linkopts = ABSL_DEFAULT_LINKOPTS, 474 deps = [ 475 ":hash_policy_traits", 476 "@com_google_googletest//:gtest_main", 477 ], 478) 479 480cc_library( 481 name = "hashtable_debug", 482 hdrs = ["internal/hashtable_debug.h"], 483 copts = ABSL_DEFAULT_COPTS, 484 linkopts = ABSL_DEFAULT_LINKOPTS, 485 deps = [ 486 ":hashtable_debug_hooks", 487 ], 488) 489 490cc_library( 491 name = "hashtable_debug_hooks", 492 hdrs = ["internal/hashtable_debug_hooks.h"], 493 copts = ABSL_DEFAULT_COPTS, 494 linkopts = ABSL_DEFAULT_LINKOPTS, 495 deps = [ 496 "//absl/base:config", 497 ], 498) 499 500cc_library( 501 name = "hashtablez_sampler", 502 srcs = [ 503 "internal/hashtablez_sampler.cc", 504 "internal/hashtablez_sampler_force_weak_definition.cc", 505 ], 506 hdrs = ["internal/hashtablez_sampler.h"], 507 copts = ABSL_DEFAULT_COPTS, 508 linkopts = ABSL_DEFAULT_LINKOPTS, 509 deps = [ 510 ":have_sse", 511 "//absl/base", 512 "//absl/base:core_headers", 513 "//absl/base:exponential_biased", 514 "//absl/debugging:stacktrace", 515 "//absl/memory", 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/synchronization", 530 "//absl/synchronization:thread_pool", 531 "//absl/time", 532 "@com_google_googletest//:gtest_main", 533 ], 534) 535 536cc_library( 537 name = "node_hash_policy", 538 hdrs = ["internal/node_hash_policy.h"], 539 copts = ABSL_DEFAULT_COPTS, 540 linkopts = ABSL_DEFAULT_LINKOPTS, 541 deps = ["//absl/base:config"], 542) 543 544cc_test( 545 name = "node_hash_policy_test", 546 srcs = ["internal/node_hash_policy_test.cc"], 547 copts = ABSL_TEST_COPTS, 548 linkopts = ABSL_DEFAULT_LINKOPTS, 549 deps = [ 550 ":hash_policy_traits", 551 ":node_hash_policy", 552 "@com_google_googletest//:gtest_main", 553 ], 554) 555 556cc_library( 557 name = "raw_hash_map", 558 hdrs = ["internal/raw_hash_map.h"], 559 copts = ABSL_DEFAULT_COPTS, 560 linkopts = ABSL_DEFAULT_LINKOPTS, 561 deps = [ 562 ":container_memory", 563 ":raw_hash_set", 564 "//absl/base:throw_delegate", 565 ], 566) 567 568cc_library( 569 name = "have_sse", 570 hdrs = ["internal/have_sse.h"], 571 copts = ABSL_DEFAULT_COPTS, 572 linkopts = ABSL_DEFAULT_LINKOPTS, 573 visibility = ["//visibility:private"], 574) 575 576cc_library( 577 name = "common", 578 hdrs = ["internal/common.h"], 579 copts = ABSL_DEFAULT_COPTS, 580 linkopts = ABSL_DEFAULT_LINKOPTS, 581 deps = [ 582 "//absl/meta:type_traits", 583 "//absl/types:optional", 584 ], 585) 586 587cc_library( 588 name = "raw_hash_set", 589 srcs = ["internal/raw_hash_set.cc"], 590 hdrs = ["internal/raw_hash_set.h"], 591 copts = ABSL_DEFAULT_COPTS, 592 linkopts = ABSL_DEFAULT_LINKOPTS, 593 deps = [ 594 ":common", 595 ":compressed_tuple", 596 ":container_memory", 597 ":hash_policy_traits", 598 ":hashtable_debug_hooks", 599 ":hashtablez_sampler", 600 ":have_sse", 601 ":layout", 602 "//absl/base:bits", 603 "//absl/base:config", 604 "//absl/base:core_headers", 605 "//absl/base:endian", 606 "//absl/memory", 607 "//absl/meta:type_traits", 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_test( 634 name = "raw_hash_set_allocator_test", 635 size = "small", 636 srcs = ["internal/raw_hash_set_allocator_test.cc"], 637 copts = ABSL_TEST_COPTS, 638 linkopts = ABSL_DEFAULT_LINKOPTS, 639 deps = [ 640 ":raw_hash_set", 641 ":tracked", 642 "//absl/base:core_headers", 643 "@com_google_googletest//:gtest_main", 644 ], 645) 646 647cc_library( 648 name = "layout", 649 hdrs = ["internal/layout.h"], 650 copts = ABSL_DEFAULT_COPTS, 651 linkopts = ABSL_DEFAULT_LINKOPTS, 652 deps = [ 653 "//absl/base:config", 654 "//absl/base:core_headers", 655 "//absl/meta:type_traits", 656 "//absl/strings", 657 "//absl/types:span", 658 "//absl/utility", 659 ], 660) 661 662cc_test( 663 name = "layout_test", 664 size = "small", 665 srcs = ["internal/layout_test.cc"], 666 copts = ABSL_TEST_COPTS, 667 linkopts = ABSL_DEFAULT_LINKOPTS, 668 tags = NOTEST_TAGS, 669 visibility = ["//visibility:private"], 670 deps = [ 671 ":layout", 672 "//absl/base:config", 673 "//absl/base:core_headers", 674 "//absl/base:raw_logging_internal", 675 "//absl/types:span", 676 "@com_google_googletest//:gtest_main", 677 ], 678) 679 680cc_library( 681 name = "tracked", 682 testonly = 1, 683 hdrs = ["internal/tracked.h"], 684 copts = ABSL_TEST_COPTS, 685 linkopts = ABSL_DEFAULT_LINKOPTS, 686 deps = [ 687 "//absl/base:config", 688 ], 689) 690 691cc_library( 692 name = "unordered_map_constructor_test", 693 testonly = 1, 694 hdrs = ["internal/unordered_map_constructor_test.h"], 695 copts = ABSL_TEST_COPTS, 696 linkopts = ABSL_DEFAULT_LINKOPTS, 697 deps = [ 698 ":hash_generator_testing", 699 ":hash_policy_testing", 700 "@com_google_googletest//:gtest", 701 ], 702) 703 704cc_library( 705 name = "unordered_map_lookup_test", 706 testonly = 1, 707 hdrs = ["internal/unordered_map_lookup_test.h"], 708 copts = ABSL_TEST_COPTS, 709 linkopts = ABSL_DEFAULT_LINKOPTS, 710 deps = [ 711 ":hash_generator_testing", 712 ":hash_policy_testing", 713 "@com_google_googletest//:gtest", 714 ], 715) 716 717cc_library( 718 name = "unordered_map_modifiers_test", 719 testonly = 1, 720 hdrs = ["internal/unordered_map_modifiers_test.h"], 721 copts = ABSL_TEST_COPTS, 722 linkopts = ABSL_DEFAULT_LINKOPTS, 723 deps = [ 724 ":hash_generator_testing", 725 ":hash_policy_testing", 726 "@com_google_googletest//:gtest", 727 ], 728) 729 730cc_library( 731 name = "unordered_set_constructor_test", 732 testonly = 1, 733 hdrs = ["internal/unordered_set_constructor_test.h"], 734 copts = ABSL_TEST_COPTS, 735 linkopts = ABSL_DEFAULT_LINKOPTS, 736 deps = [ 737 ":hash_generator_testing", 738 ":hash_policy_testing", 739 "//absl/meta:type_traits", 740 "@com_google_googletest//:gtest", 741 ], 742) 743 744cc_library( 745 name = "unordered_set_members_test", 746 testonly = 1, 747 hdrs = ["internal/unordered_set_members_test.h"], 748 copts = ABSL_TEST_COPTS, 749 linkopts = ABSL_DEFAULT_LINKOPTS, 750 deps = [ 751 "//absl/meta:type_traits", 752 "@com_google_googletest//:gtest", 753 ], 754) 755 756cc_library( 757 name = "unordered_map_members_test", 758 testonly = 1, 759 hdrs = ["internal/unordered_map_members_test.h"], 760 copts = ABSL_TEST_COPTS, 761 linkopts = ABSL_DEFAULT_LINKOPTS, 762 deps = [ 763 "//absl/meta:type_traits", 764 "@com_google_googletest//:gtest", 765 ], 766) 767 768cc_library( 769 name = "unordered_set_lookup_test", 770 testonly = 1, 771 hdrs = ["internal/unordered_set_lookup_test.h"], 772 copts = ABSL_TEST_COPTS, 773 linkopts = ABSL_DEFAULT_LINKOPTS, 774 deps = [ 775 ":hash_generator_testing", 776 ":hash_policy_testing", 777 "@com_google_googletest//:gtest", 778 ], 779) 780 781cc_library( 782 name = "unordered_set_modifiers_test", 783 testonly = 1, 784 hdrs = ["internal/unordered_set_modifiers_test.h"], 785 copts = ABSL_TEST_COPTS, 786 linkopts = ABSL_DEFAULT_LINKOPTS, 787 deps = [ 788 ":hash_generator_testing", 789 ":hash_policy_testing", 790 "@com_google_googletest//:gtest", 791 ], 792) 793 794cc_test( 795 name = "unordered_set_test", 796 srcs = ["internal/unordered_set_test.cc"], 797 copts = ABSL_TEST_COPTS, 798 linkopts = ABSL_DEFAULT_LINKOPTS, 799 tags = NOTEST_TAGS_NONMOBILE, 800 deps = [ 801 ":unordered_set_constructor_test", 802 ":unordered_set_lookup_test", 803 ":unordered_set_members_test", 804 ":unordered_set_modifiers_test", 805 "@com_google_googletest//:gtest_main", 806 ], 807) 808 809cc_test( 810 name = "unordered_map_test", 811 srcs = ["internal/unordered_map_test.cc"], 812 copts = ABSL_TEST_COPTS, 813 linkopts = ABSL_DEFAULT_LINKOPTS, 814 tags = NOTEST_TAGS_NONMOBILE, 815 deps = [ 816 ":unordered_map_constructor_test", 817 ":unordered_map_lookup_test", 818 ":unordered_map_members_test", 819 ":unordered_map_modifiers_test", 820 "@com_google_googletest//:gtest_main", 821 ], 822) 823 824cc_library( 825 name = "btree", 826 srcs = [ 827 "internal/btree.h", 828 "internal/btree_container.h", 829 ], 830 hdrs = [ 831 "btree_map.h", 832 "btree_set.h", 833 ], 834 copts = ABSL_DEFAULT_COPTS, 835 linkopts = ABSL_DEFAULT_LINKOPTS, 836 visibility = ["//visibility:public"], 837 deps = [ 838 ":common", 839 ":compressed_tuple", 840 ":container_memory", 841 ":layout", 842 "//absl/base:core_headers", 843 "//absl/base:throw_delegate", 844 "//absl/memory", 845 "//absl/meta:type_traits", 846 "//absl/strings", 847 "//absl/strings:cord", 848 "//absl/types:compare", 849 "//absl/utility", 850 ], 851) 852 853cc_library( 854 name = "btree_test_common", 855 testonly = 1, 856 hdrs = ["btree_test.h"], 857 copts = ABSL_TEST_COPTS, 858 linkopts = ABSL_DEFAULT_LINKOPTS, 859 visibility = ["//visibility:private"], 860 deps = [ 861 ":btree", 862 ":flat_hash_set", 863 "//absl/strings", 864 "//absl/strings:cord", 865 "//absl/time", 866 ], 867) 868 869cc_test( 870 name = "btree_test", 871 size = "large", 872 srcs = [ 873 "btree_test.cc", 874 ], 875 copts = ABSL_TEST_COPTS, 876 linkopts = ABSL_DEFAULT_LINKOPTS, 877 shard_count = 10, 878 visibility = ["//visibility:private"], 879 deps = [ 880 ":btree", 881 ":btree_test_common", 882 ":counting_allocator", 883 ":test_instance_tracker", 884 "//absl/base:core_headers", 885 "//absl/base:raw_logging_internal", 886 "//absl/flags:flag", 887 "//absl/hash:hash_testing", 888 "//absl/memory", 889 "//absl/meta:type_traits", 890 "//absl/strings", 891 "//absl/types:compare", 892 "@com_google_googletest//:gtest_main", 893 ], 894) 895 896cc_binary( 897 name = "btree_benchmark", 898 testonly = 1, 899 srcs = [ 900 "btree_benchmark.cc", 901 ], 902 copts = ABSL_TEST_COPTS, 903 linkopts = ABSL_DEFAULT_LINKOPTS, 904 tags = ["benchmark"], 905 visibility = ["//visibility:private"], 906 deps = [ 907 ":btree", 908 ":btree_test_common", 909 ":flat_hash_map", 910 ":flat_hash_set", 911 ":hashtable_debug", 912 "//absl/base:raw_logging_internal", 913 "//absl/flags:flag", 914 "//absl/hash", 915 "//absl/memory", 916 "//absl/strings:cord", 917 "//absl/strings:str_format", 918 "//absl/time", 919 "@com_github_google_benchmark//:benchmark_main", 920 ], 921) 922