mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-22 16:37:40 +08:00
Make dtor_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276595 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -44,6 +45,6 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -44,6 +45,6 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -43,6 +44,6 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
|
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -43,6 +44,6 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
|
typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <deque>
|
#include <deque>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -43,6 +44,6 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
|
typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <forward_list>
|
#include <forward_list>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -43,6 +44,6 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
|
typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -43,6 +44,6 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
|
typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@@ -42,6 +43,6 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::vector<bool, some_alloc<bool>> C;
|
typedef std::vector<bool, some_alloc<bool>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -43,6 +44,6 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::vector<MoveOnly, some_alloc<MoveOnly>> C;
|
typedef std::vector<MoveOnly, some_alloc<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -54,11 +55,11 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||||
some_comp<MoveOnly>> C;
|
some_comp<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -54,11 +55,11 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||||
some_comp<MoveOnly>> C;
|
some_comp<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -54,11 +55,11 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
|
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
|
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
|
||||||
some_comp<MoveOnly>> C;
|
some_comp<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "MoveOnly.h"
|
#include "MoveOnly.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
@@ -54,11 +55,11 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
|
typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
|
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
|
||||||
some_comp<MoveOnly>> C;
|
some_comp<MoveOnly>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
#include "test_allocator.h"
|
#include "test_allocator.h"
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@@ -38,6 +39,6 @@ int main()
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
|
typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
|
||||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user