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