Make dtor_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com

llvm-svn: 276595
This commit is contained in:
Eric Fiselier 2016-07-25 00:50:32 +00:00
parent 4e91ea50a0
commit 93b8e51ebb
14 changed files with 32 additions and 18 deletions

View File

@ -16,6 +16,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -44,6 +45,6 @@ int main()
}
{
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, "");
}
}

View File

@ -16,6 +16,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -44,6 +45,6 @@ int main()
}
{
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, "");
}
}

View File

@ -16,6 +16,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -43,6 +44,6 @@ int main()
}
{
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, "");
}
}

View File

@ -16,6 +16,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -43,6 +44,6 @@ int main()
}
{
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, "");
}
}

View File

@ -16,6 +16,7 @@
#include <deque>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -43,6 +44,6 @@ int main()
}
{
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, "");
}
}

View File

@ -16,6 +16,7 @@
#include <forward_list>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -43,6 +44,6 @@ int main()
}
{
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, "");
}
}

View File

@ -16,6 +16,7 @@
#include <list>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -43,6 +44,6 @@ int main()
}
{
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, "");
}
}

View File

@ -16,6 +16,7 @@
#include <vector>
#include <cassert>
#include "test_macros.h"
#include "test_allocator.h"
template <class T>
@ -42,6 +43,6 @@ int main()
}
{
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, "");
}
}

View File

@ -16,6 +16,7 @@
#include <vector>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -43,6 +44,6 @@ int main()
}
{
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, "");
}
}

View File

@ -16,6 +16,7 @@
#include <unordered_map>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -54,11 +55,11 @@ int main()
}
{
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>,
some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_destructible<C>::value, "");
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
}
}

View File

@ -16,6 +16,7 @@
#include <unordered_map>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -54,11 +55,11 @@ int main()
}
{
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>,
some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_destructible<C>::value, "");
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
}
}

View File

@ -16,6 +16,7 @@
#include <unordered_set>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -54,11 +55,11 @@ int main()
}
{
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>,
some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_destructible<C>::value, "");
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
}
}

View File

@ -16,6 +16,7 @@
#include <unordered_set>
#include <cassert>
#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@ -54,11 +55,11 @@ int main()
}
{
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>,
some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_destructible<C>::value, "");
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
}
}

View File

@ -16,6 +16,7 @@
#include <string>
#include <cassert>
#include "test_macros.h"
#include "test_allocator.h"
template <class T>
@ -38,6 +39,6 @@ int main()
}
{
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, "");
}
}