[libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.

This replaces every occurrence of _LIBCPP_STD_VER in the tests with
TEST_STD_VER. Additionally, for every affected
file, #include "test_macros.h" is being added explicitly if it wasn't
already there.

https://reviews.llvm.org/D26294

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephan T. Lavavej
2016-11-04 20:26:59 +00:00
parent f333beee2c
commit e619862dbf
252 changed files with 606 additions and 314 deletions

View File

@@ -29,6 +29,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -207,7 +208,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
typedef std::map<int, double> C;
C::iterator ii1{}, ii2{};

View File

@@ -18,6 +18,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "../../../test_compare.h"
#include "test_allocator.h"
#include "min_allocator.h"
@@ -75,7 +76,7 @@ int main()
assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1));
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
V ar[] =

View File

@@ -16,6 +16,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
#include "is_transparent.h"
@@ -98,7 +99,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
typedef std::map<int, double, std::less <>> M;

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().count(C2Int{5});
}
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().count(C2Int{5});
}
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().count(C2Int{5});
}
}
#endif
#endif

View File

@@ -17,6 +17,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
#include "is_transparent.h"
@@ -297,7 +298,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
typedef std::map<int, double, std::less<>> M;

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().equal_range(C2Int{5});
}
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().equal_range(C2Int{5});
}
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().equal_range(C2Int{5});
}
}
#endif
#endif

View File

@@ -17,6 +17,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
#include "is_transparent.h"
@@ -165,7 +166,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
typedef std::map<int, double, std::less<>> M;

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().find(C2Int{5});
}
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().find(C2Int{5});
}
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().find(C2Int{5});
}
}
#endif
#endif

View File

@@ -17,6 +17,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
#include "is_transparent.h"
@@ -229,7 +230,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
typedef std::map<int, double, std::less <>> M;

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -17,6 +17,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -228,7 +229,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
typedef std::map<int, double, std::less<>> M;

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -29,6 +29,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -211,7 +212,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
typedef std::multimap<int, double> C;
C::iterator ii1{}, ii2{};

View File

@@ -17,6 +17,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -76,7 +77,7 @@ int main()
assert(*next(m.begin(), 7) == V(3, 1.5));
assert(*next(m.begin(), 8) == V(3, 2));
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
V ar[] =

View File

@@ -16,6 +16,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
#include "is_transparent.h"
@@ -92,7 +93,7 @@ int main()
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::multimap<int, double, std::less<>> M;
typedef M::size_type R;

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -34,4 +35,4 @@ int main()
M().count(C2Int{5});
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -34,4 +35,4 @@ int main()
M().count(C2Int{5});
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -34,4 +35,4 @@ int main()
M().count(C2Int{5});
}
#endif
#endif

View File

@@ -17,6 +17,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
#include "is_transparent.h"
@@ -180,7 +181,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
typedef std::multimap<int, double, std::less<>> M;

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -34,4 +35,4 @@ int main()
M().equal_range(C2Int{5});
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().equal_range(C2Int{5});
}
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().equal_range(C2Int{5});
}
}
#endif
#endif

View File

@@ -17,6 +17,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
#include "is_transparent.h"
@@ -144,7 +145,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
typedef std::multimap<int, double, std::less<>> M;

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().find(C2Int{5});
}
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().find(C2Int{5});
}
}
#endif
#endif

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else
@@ -36,4 +37,4 @@ int main()
M().find(C2Int{5});
}
}
#endif
#endif

View File

@@ -17,6 +17,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
#include "is_transparent.h"
@@ -152,7 +153,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
typedef std::multimap<int, double, std::less<>> M;

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -17,6 +17,7 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
#include "is_transparent.h"
@@ -152,7 +153,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<const int, double> V;
typedef std::multimap<int, double, std::less<>> M;

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -22,9 +22,10 @@
#include <map>
#include <cassert>
#include "test_macros.h"
#include "is_transparent.h"
#if _LIBCPP_STD_VER <= 11
#if TEST_STD_VER <= 11
#error "This test requires is C++14 (or later)"
#else

View File

@@ -16,6 +16,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -91,7 +92,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
typedef std::multiset<int, std::less<>> M;

View File

@@ -17,6 +17,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -180,7 +181,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
typedef std::multiset<V, std::less<>> M;

View File

@@ -17,6 +17,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -164,7 +165,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
typedef std::multiset<V, std::less<>> M;

View File

@@ -29,6 +29,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -195,7 +196,7 @@ int main()
assert(*i == j);
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
typedef std::multiset<int> C;
C::iterator ii1{}, ii2{};

View File

@@ -17,6 +17,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -152,7 +153,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
typedef std::multiset<V, std::less<>> M;

View File

@@ -16,6 +16,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -51,7 +52,7 @@ int main()
assert(*++i == V(5));
assert(*++i == V(6));
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::multiset<int, std::less<int>, min_allocator<int>> C;
typedef C::value_type V;

View File

@@ -18,6 +18,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "test_allocator.h"
@@ -57,7 +58,7 @@ int main()
assert(*next(m.begin(), 7) == 3);
assert(*next(m.begin(), 8) == 3);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
V ar[] =

View File

@@ -17,6 +17,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -152,7 +153,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
typedef std::multiset<V, std::less<>> M;

View File

@@ -16,6 +16,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -93,7 +94,7 @@ int main()
assert(r == 0);
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
typedef std::set<int, std::less<>> M;

View File

@@ -17,6 +17,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -228,7 +229,7 @@ int main()
assert(r.second == next(m.begin(), 8));
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
typedef std::set<V, std::less<>> M;

View File

@@ -17,6 +17,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -164,7 +165,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
typedef std::set<V, std::less<>> M;

View File

@@ -29,6 +29,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -191,7 +192,7 @@ int main()
assert(*i == j);
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
typedef std::set<int> C;
C::iterator ii1{}, ii2{};

View File

@@ -17,6 +17,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -228,7 +229,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
typedef std::set<V, std::less<>> M;

View File

@@ -16,6 +16,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "../../../test_compare.h"
#include "test_allocator.h"
@@ -40,7 +41,7 @@ int main()
assert(m.key_comp() == Cmp(10));
assert(m.get_allocator() == A(4));
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef test_compare<std::less<int> > Cmp;
typedef test_allocator<int> A;

View File

@@ -22,6 +22,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "test_allocator.h"
@@ -55,7 +56,7 @@ int main()
assert(*next(m.begin()) == 2);
assert(*next(m.begin(), 2) == 3);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
V ar[] =

View File

@@ -17,6 +17,7 @@
#include <set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -228,7 +229,7 @@ int main()
}
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int V;
typedef std::set<V, std::less<>> M;

View File

@@ -15,6 +15,8 @@
#include <iterator>
#include <cassert>
#include "test_macros.h"
int main()
{
{
@@ -36,7 +38,7 @@ int main()
assert(i == j);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
{
typedef std::array<int, 5> C;

View File

@@ -14,6 +14,7 @@
#include <deque>
#include <cassert>
#include "test_macros.h"
#include "test_allocator.h"
#include "DefaultOnly.h"
#include "min_allocator.h"
@@ -22,7 +23,7 @@ template <class T, class Allocator>
void
test2(unsigned n)
{
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
typedef std::deque<T, Allocator> C;
typedef typename C::const_iterator const_iterator;
assert(DefaultOnly::count == 0);
@@ -64,7 +65,7 @@ template <class T, class Allocator>
void
test3(unsigned n, Allocator const &alloc = Allocator())
{
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
typedef std::deque<T, Allocator> C;
typedef typename C::const_iterator const_iterator;
{
@@ -104,7 +105,7 @@ int main()
test<DefaultOnly, min_allocator<DefaultOnly> >(4095);
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
test3<DefaultOnly, std::allocator<DefaultOnly>> (1023);
test3<int, std::allocator<int>>(1);
test3<int, min_allocator<int>> (3);

View File

@@ -20,6 +20,7 @@
#include <iterator>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -44,7 +45,7 @@ int main()
assert(i == j);
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
std::deque<int>::iterator ii1{}, ii2{};
std::deque<int>::iterator ii4 = ii1;

View File

@@ -15,13 +15,14 @@
#include <forward_list>
#include <cassert>
#include "test_macros.h"
#include "DefaultOnly.h"
#include "min_allocator.h"
template <class T, class Allocator>
void check_allocator(unsigned n, Allocator const &alloc = Allocator())
{
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
typedef std::forward_list<T, Allocator> C;
C d(n, alloc);
assert(d.get_allocator() == alloc);

View File

@@ -20,6 +20,7 @@
#include <cassert>
#include <iterator>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -120,7 +121,7 @@ int main()
C::const_iterator j;
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
std::forward_list<int>::iterator ii1{}, ii2{};
std::forward_list<int>::iterator ii4 = ii1;

View File

@@ -20,6 +20,7 @@
#include <cassert>
#include <iterator>
#include "test_macros.h"
#include "min_allocator.h"
struct A
@@ -135,7 +136,7 @@ int main()
assert(j->first == 3);
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
std::list<int> c;
std::list<int>::iterator ii1{}, ii2{};

View File

@@ -13,6 +13,7 @@
#include <list>
#include <cassert>
#include "test_macros.h"
#include "DefaultOnly.h"
#include "test_allocator.h"
#include "min_allocator.h"
@@ -21,7 +22,7 @@ template <class T, class Allocator>
void
test3(unsigned n, Allocator const &alloc = Allocator())
{
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
typedef std::list<T, Allocator> C;
typedef typename C::const_iterator const_iterator;
{
@@ -59,7 +60,7 @@ int main()
++i;
assert(*i == 0);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::list<int, min_allocator<int> > C;
C l(3, min_allocator<int> ());

View File

@@ -20,6 +20,7 @@
#include <cassert>
#include <iterator>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -94,7 +95,7 @@ int main()
C::const_iterator j;
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
std::vector<bool>::iterator ii1{}, ii2{};
std::vector<bool>::iterator ii4 = ii1;

View File

@@ -20,6 +20,7 @@
#include <cassert>
#include <iterator>
#include "test_macros.h"
#include "min_allocator.h"
struct A
@@ -135,7 +136,7 @@ int main()
assert(j->first == 3);
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
typedef std::vector<int> C;
C::iterator ii1{}, ii2{};

View File

@@ -24,6 +24,7 @@
#include <string>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -108,7 +109,7 @@ int main()
C::const_iterator i;
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
typedef std::unordered_map<int,double> C;
C::iterator ii1{}, ii2{};

View File

@@ -20,6 +20,7 @@
#include <cassert>
#include <cfloat>
#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
@@ -91,7 +92,7 @@ int main()
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;

View File

@@ -21,6 +21,7 @@
#include <cassert>
#include <cfloat>
#include "test_macros.h"
#include "test_iterators.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
@@ -97,7 +98,7 @@ int main()
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;

View File

@@ -24,6 +24,7 @@
#include <string>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -114,7 +115,7 @@ int main()
C::const_iterator i;
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
typedef std::unordered_multimap<int,double> C;
C::iterator ii1{}, ii2{};

View File

@@ -84,7 +84,7 @@ int main()
assert(c.load_factor() == 0);
assert(c.max_load_factor() == 1);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef NotConstructible T;
typedef test_allocator<std::pair<const T, T>> A;

View File

@@ -20,6 +20,7 @@
#include <cassert>
#include <cfloat>
#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
@@ -135,7 +136,7 @@ int main()
assert(c.key_eq() == test_compare<std::equal_to<int> >());
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;

View File

@@ -21,6 +21,7 @@
#include <cassert>
#include <cfloat>
#include "test_macros.h"
#include "test_iterators.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
@@ -141,7 +142,7 @@ int main()
assert(c.key_eq() == test_compare<std::equal_to<int> >());
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;

View File

@@ -23,6 +23,7 @@
#include <unordered_set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -107,7 +108,7 @@ int main()
C::const_iterator i;
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
typedef std::unordered_multiset<int> C;
C::iterator ii1{}, ii2{};

View File

@@ -62,7 +62,7 @@ int main()
assert(c.load_factor() == 0);
assert(c.max_load_factor() == 1);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef NotConstructible T;
typedef test_hash<std::hash<T>> HF;

View File

@@ -19,6 +19,7 @@
#include <cassert>
#include <cfloat>
#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
@@ -88,7 +89,7 @@ int main()
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int T;
typedef test_hash<std::hash<T>> HF;

View File

@@ -20,6 +20,7 @@
#include <cassert>
#include <cfloat>
#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
@@ -93,7 +94,7 @@ int main()
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int T;
typedef test_hash<std::hash<T>> HF;

View File

@@ -23,6 +23,7 @@
#include <unordered_set>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -107,7 +108,7 @@ int main()
C::const_iterator i;
}
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{ // N3644 testing
typedef std::unordered_set<int> C;
C::iterator ii1{}, ii2{};

View File

@@ -62,7 +62,7 @@ int main()
assert(c.load_factor() == 0);
assert(c.max_load_factor() == 1);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef NotConstructible T;
typedef test_hash<std::hash<T>> HF;

View File

@@ -19,6 +19,7 @@
#include <cassert>
#include <cfloat>
#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
@@ -88,7 +89,7 @@ int main()
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int T;
typedef test_hash<std::hash<T>> HF;

View File

@@ -20,6 +20,7 @@
#include <cassert>
#include <cfloat>
#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
@@ -93,7 +94,7 @@ int main()
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef int T;
typedef test_hash<std::hash<T>> HF;

View File

@@ -15,9 +15,11 @@
#include <experimental/optional>
#include "test_macros.h"
int main()
{
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
using std::experimental::optional;
using std::experimental::nullopt_t;
using std::experimental::nullopt;

View File

@@ -39,7 +39,7 @@ int main () {
test ( U"a", 1 );
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
constexpr const char *s = "ABC";
constexpr std::experimental::basic_string_view<char> sv( s, 2 );

View File

@@ -42,7 +42,7 @@ int main () {
test ( U"a", 1 );
#endif
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
constexpr std::experimental::basic_string_view<char> sv ( "ABC", 2 );
static_assert ( sv.length() == 2, "" );

View File

@@ -23,7 +23,7 @@
template<typename SV>
void test1 () {
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
constexpr SV sv1;
static_assert ( sv1.size() == 0, "" );

View File

@@ -17,6 +17,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -49,7 +50,7 @@ int main()
test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -16,6 +16,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -48,7 +49,7 @@ int main()
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -17,6 +17,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -49,7 +50,7 @@ int main()
test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true, true);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -16,6 +16,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -48,7 +49,7 @@ int main()
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true, true);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -17,6 +17,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -49,7 +50,7 @@ int main()
test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false, false);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -16,6 +16,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -48,7 +49,7 @@ int main()
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false, false);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -17,6 +17,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -49,7 +50,7 @@ int main()
test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true, true);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -16,6 +16,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -48,7 +49,7 @@ int main()
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true, true);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -17,6 +17,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -49,7 +50,7 @@ int main()
test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false, false);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -16,6 +16,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -48,7 +49,7 @@ int main()
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false, false);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -17,6 +17,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -49,7 +50,7 @@ int main()
test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

View File

@@ -16,6 +16,7 @@
#include <experimental/string_view>
#include <cassert>
#include "test_macros.h"
#include "constexpr_char_traits.hpp"
template <class S>
@@ -48,7 +49,7 @@ int main()
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false);
}
#if _LIBCPP_STD_VER > 11
#if TEST_STD_VER > 11
{
typedef std::experimental::basic_string_view<char, constexpr_char_traits<char>> SV;
constexpr SV sv1;

Some files were not shown because too many files have changed in this diff Show More