Cleanup non-standard tests as reported by STL@microsoft.com. NFC.
This patch addresses the following issues in the test suite: 1. Move "std::bad_array_length" test from std/ to libcxx/ test directory since the feature is not a part of the standard. 2. Rename "futures.tas" test directory to "futures.task" since that is the correct stable name. 3. Move tests for "packaged_task<T>::result_type" from std/ to libcxx/ test directory since the typedef is a libc++ extension. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11
|
||||
// test bad_array_length
|
||||
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
#include <cassert>
|
||||
|
||||
int main()
|
||||
{
|
||||
static_assert((std::is_base_of<std::bad_alloc, std::bad_array_length>::value),
|
||||
"std::is_base_of<std::bad_alloc, std::bad_array_length>::value");
|
||||
static_assert(std::is_polymorphic<std::bad_array_length>::value,
|
||||
"std::is_polymorphic<std::bad_array_length>::value");
|
||||
std::bad_array_length b;
|
||||
std::bad_array_length b2 = b;
|
||||
b2 = b;
|
||||
const char* w = b2.what();
|
||||
assert(w);
|
||||
}
|
||||
31
test/libcxx/thread/futures/futures.task/types.pass.cpp
Normal file
31
test/libcxx/thread/futures/futures.task/types.pass.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// UNSUPPORTED: libcpp-has-no-threads
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <future>
|
||||
|
||||
// template<class R, class... ArgTypes>
|
||||
// class packaged_task<R(ArgTypes...)>
|
||||
// {
|
||||
// public:
|
||||
// typedef R result_type; // extension
|
||||
|
||||
// This is a libc++ extension.
|
||||
|
||||
#include <future>
|
||||
#include <type_traits>
|
||||
|
||||
struct A {};
|
||||
|
||||
int main()
|
||||
{
|
||||
static_assert((std::is_same<std::packaged_task<A(int, char)>::result_type, A>::value), "");
|
||||
}
|
||||
Reference in New Issue
Block a user