diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-04-16 04:05:15 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-04-16 04:05:15 +0000 |
commit | 2bbb4ecd94dff50cf9fd2ebc724685d80661bf2e (patch) | |
tree | a6a99ce062df8ef1111939d3587bd808054ec4e7 /libcxx/test | |
parent | 66785fdb255ed3df216deb85f7cdcd0755d2ee00 (diff) | |
download | bcm5719-llvm-2bbb4ecd94dff50cf9fd2ebc724685d80661bf2e.tar.gz bcm5719-llvm-2bbb4ecd94dff50cf9fd2ebc724685d80661bf2e.zip |
Cleanup one more <forward_list> test
llvm-svn: 300417
Diffstat (limited to 'libcxx/test')
-rw-r--r-- | libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp | 35 | ||||
-rw-r--r-- | libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp | 5 |
2 files changed, 5 insertions, 35 deletions
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp deleted file mode 100644 index 2d963a1be47..00000000000 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <forward_list> - -// explicit forward_list(size_type n); - -#include <forward_list> -#include <cassert> - -#include "DefaultOnly.h" - -int main() -{ - { - typedef DefaultOnly T; - typedef std::forward_list<T> C; - unsigned N = 10; - C c = N; - unsigned n = 0; - for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n) -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - assert(*i == T()); -#else - ; -#endif - assert(n == N); - } -} diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp index b536ccf4910..061dd6da078 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp @@ -36,6 +36,11 @@ void check_allocator(unsigned n, Allocator const &alloc = Allocator()) int main() { + { // test that the ctor is explicit + typedef std::forward_list<DefaultOnly> C; + static_assert((std::is_constructible<C, size_t>::value), ""); + static_assert((!std::is_convertible<size_t, C>::value), ""); + } { typedef DefaultOnly T; typedef std::forward_list<T> C; |