summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-05-31 01:03:07 +0000
committerEric Fiselier <eric@efcs.ca>2016-05-31 01:03:07 +0000
commit0ddc14c256058aeab504846f901f22a51a1bd1f8 (patch)
treebe3bd17c29a6bc4ee2603188fae3bb228cdbcdc5 /libcxx/test
parent98e4019a58d7e20e38783d4f64dca30b139bc86b (diff)
downloadbcm5719-llvm-0ddc14c256058aeab504846f901f22a51a1bd1f8.tar.gz
bcm5719-llvm-0ddc14c256058aeab504846f901f22a51a1bd1f8.zip
Mark LWG issue #2585 as complete
llvm-svn: 271240
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp
index d4bd6b4e011..356e0d657c3 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp
@@ -14,9 +14,14 @@
#include <forward_list>
#include <cassert>
+#include "test_macros.h"
#include "DefaultOnly.h"
#include "min_allocator.h"
+#if TEST_STD_VER >= 11
+#include "container_test_types.h"
+#endif
+
int main()
{
{
@@ -49,7 +54,7 @@ int main()
assert(*next(c.begin(), 4) == 10);
assert(*next(c.begin(), 5) == 10);
}
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -80,5 +85,19 @@ int main()
assert(*next(c.begin(), 4) == 10);
assert(*next(c.begin(), 5) == 10);
}
+ {
+ // Test that the allocator's construct method is being used to
+ // construct the new elements and that it's called exactly N times.
+ typedef int T;
+ typedef std::forward_list<int, ContainerTestAllocator<int, int>> Container;
+ ConstructController* cc = getConstructController();
+ cc->reset();
+ {
+ Container c;
+ cc->expect<int const&>(6);
+ c.resize(6, 42);
+ assert(!cc->unchecked());
+ }
+ }
#endif
}
OpenPOWER on IntegriCloud