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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -16,6 +16,7 @@
#include <set> #include <set>
#include <cassert> #include <cassert>
#include "test_macros.h"
#include "min_allocator.h" #include "min_allocator.h"
int main() int main()
@@ -51,7 +52,7 @@ int main()
assert(*++i == V(5)); assert(*++i == V(5));
assert(*++i == V(6)); 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 std::multiset<int, std::less<int>, min_allocator<int>> C;
typedef C::value_type V; typedef C::value_type V;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -16,6 +16,7 @@
#include <set> #include <set>
#include <cassert> #include <cassert>
#include "test_macros.h"
#include "../../../test_compare.h" #include "../../../test_compare.h"
#include "test_allocator.h" #include "test_allocator.h"
@@ -40,7 +41,7 @@ int main()
assert(m.key_comp() == Cmp(10)); assert(m.key_comp() == Cmp(10));
assert(m.get_allocator() == A(4)); 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_compare<std::less<int> > Cmp;
typedef test_allocator<int> A; typedef test_allocator<int> A;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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