[libcxx-commits] [libcxx] 93230ac - [libcxx][test] Use bool allocators for vector<bool>::get_allocator test
Casey Carter via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 25 10:29:16 PST 2022
Author: Casey Carter
Date: 2022-01-25T10:29:12-08:00
New Revision: 93230ac1d2cf32419ce88fdd850f92a02bec5553
URL: https://github.com/llvm/llvm-project/commit/93230ac1d2cf32419ce88fdd850f92a02bec5553
DIFF: https://github.com/llvm/llvm-project/commit/93230ac1d2cf32419ce88fdd850f92a02bec5553.diff
LOG: [libcxx][test] Use bool allocators for vector<bool>::get_allocator test
... to be consistent with other `get_allocator` tests, and to avoid requiring `vector<T, allocator<U>>` to be valid.
Added:
Modified:
libcxx/test/std/containers/sequences/vector.bool/get_allocator.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/containers/sequences/vector.bool/get_allocator.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/get_allocator.pass.cpp
index 566d1f81bafc7..f518b4601eef3 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/get_allocator.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/get_allocator.pass.cpp
@@ -20,13 +20,13 @@
int main(int, char**) {
{
- std::allocator<int> alloc;
+ std::allocator<bool> alloc;
const std::vector<bool> vb(alloc);
assert(vb.get_allocator() == alloc);
}
{
- other_allocator<int> alloc(1);
- const std::vector<bool, other_allocator<int> > vb(alloc);
+ other_allocator<bool> alloc(1);
+ const std::vector<bool, other_allocator<bool> > vb(alloc);
assert(vb.get_allocator() == alloc);
}
More information about the libcxx-commits
mailing list