From 2bbb4ecd94dff50cf9fd2ebc724685d80661bf2e Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sun, 16 Apr 2017 04:05:15 +0000 Subject: [PATCH] Cleanup one more test llvm-svn: 300417 --- .../forwardlist.cons/size.fail.cpp | 35 ------------------- .../forwardlist.cons/size.pass.cpp | 5 +++ 2 files changed, 5 insertions(+), 35 deletions(-) delete mode 100644 libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp 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 2d963a1be479..000000000000 --- 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. -// -//===----------------------------------------------------------------------===// - -// - -// explicit forward_list(size_type n); - -#include -#include - -#include "DefaultOnly.h" - -int main() -{ - { - typedef DefaultOnly T; - typedef std::forward_list 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 b536ccf4910e..061dd6da0785 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 C; + static_assert((std::is_constructible::value), ""); + static_assert((!std::is_convertible::value), ""); + } { typedef DefaultOnly T; typedef std::forward_list C;