aboutsummaryrefslogtreecommitdiff
path: root/absl/container/btree_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/btree_test.cc')
-rw-r--r--absl/container/btree_test.cc25
1 files changed, 5 insertions, 20 deletions
diff --git a/absl/container/btree_test.cc b/absl/container/btree_test.cc
index a204c6d5..3e239c50 100644
--- a/absl/container/btree_test.cc
+++ b/absl/container/btree_test.cc
@@ -37,7 +37,7 @@
#include "absl/base/macros.h"
#include "absl/container/btree_map.h"
#include "absl/container/btree_set.h"
-#include "absl/container/internal/counting_allocator.h"
+#include "absl/container/internal/test_allocator.h"
#include "absl/container/internal/test_instance_tracker.h"
#include "absl/flags/flag.h"
#include "absl/hash/hash_testing.h"
@@ -667,25 +667,10 @@ void BtreeMultiTest() {
DoTest("identical: ", &container, identical_values);
}
-template <typename T>
-struct PropagatingCountingAlloc : public CountingAllocator<T> {
- using propagate_on_container_copy_assignment = std::true_type;
- using propagate_on_container_move_assignment = std::true_type;
- using propagate_on_container_swap = std::true_type;
-
- using Base = CountingAllocator<T>;
- using Base::Base;
-
- template <typename U>
- explicit PropagatingCountingAlloc(const PropagatingCountingAlloc<U> &other)
- : Base(other.bytes_used_) {}
-
- template <typename U>
- struct rebind {
- using other = PropagatingCountingAlloc<U>;
- };
-};
-
+// TODO(ezb): get rid of BtreeAllocatorTest and replace with test cases using
+// specific propagating allocs (e.g. CopyAssignPropagatingCountingAlloc) and
+// also a test for MinimumAlignmentAlloc. Motivation is better test coverage and
+// faster compilation time.
template <typename T>
void BtreeAllocatorTest() {
using value_type = typename T::value_type;