Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER.
This is a huge cleanup that helps make the libc++ test suite more portable. Patch from STL@microsoft.com. Thanks STL! git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272716 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -48,7 +48,7 @@ int main()
|
||||
assert(in.eof());
|
||||
assert(s == L" ghij");
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
std::istringstream in(" abc\n def\n ghij");
|
||||
|
||||
@@ -54,7 +54,7 @@ int main()
|
||||
assert(in.eof());
|
||||
assert(s == L" ghij");
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
std::istringstream in(" abc* def** ghij");
|
||||
|
||||
@@ -33,7 +33,7 @@ int main()
|
||||
getline(std::wistringstream(L" abc* def* ghij"), s, L'*');
|
||||
assert(s == L" abc");
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
S s("initial text");
|
||||
|
||||
@@ -33,7 +33,7 @@ int main()
|
||||
getline(std::wistringstream(L" abc\n def\n ghij"), s);
|
||||
assert(s == L" abc");
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
S s("initial text");
|
||||
|
||||
@@ -66,7 +66,7 @@ int main()
|
||||
in >> s;
|
||||
assert(in.fail());
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
std::istringstream in("a bc defghij");
|
||||
|
||||
@@ -52,7 +52,7 @@ int main()
|
||||
assert(out.good());
|
||||
assert(L" " + s == out.str());
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
std::basic_ostringstream<S::value_type, S::traits_type, S::allocator_type> out;
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test("abcdefghijklmnopqrst", S("abcdefghij"), true);
|
||||
test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test("", S(""), false);
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghij", true);
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), "", false);
|
||||
|
||||
@@ -46,7 +46,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true);
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), S(""), false);
|
||||
|
||||
@@ -59,7 +59,7 @@ int main()
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test0('a', S(""), S("a"));
|
||||
|
||||
@@ -83,7 +83,7 @@ int main()
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test0("", S(""), S(""));
|
||||
|
||||
@@ -59,7 +59,7 @@ int main()
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test0(S(""), '1', S("1"));
|
||||
|
||||
@@ -83,7 +83,7 @@ int main()
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test0(S(""), "", S(""));
|
||||
|
||||
@@ -143,7 +143,7 @@ int main()
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test0(S(""), S(""), S(""));
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test("abcdefghijklmnopqrst", S("abcdefghij"), false);
|
||||
test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test("", S(""), true);
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghij", false);
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), "", true);
|
||||
|
||||
@@ -46,7 +46,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false);
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), S(""), true);
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test("abcdefghijklmnopqrst", S("abcdefghij"), true);
|
||||
test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test("", S(""), false);
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghij", true);
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), "", false);
|
||||
|
||||
@@ -46,7 +46,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true);
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), S(""), false);
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test("abcdefghijklmnopqrst", S("abcdefghij"), true);
|
||||
test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test("", S(""), true);
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghij", true);
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), "", true);
|
||||
|
||||
@@ -46,7 +46,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true);
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), S(""), true);
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test("abcdefghijklmnopqrst", S("abcdefghij"), false);
|
||||
test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test("", S(""), false);
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghij", false);
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), "", false);
|
||||
|
||||
@@ -46,7 +46,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false);
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), S(""), false);
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test("abcdefghijklmnopqrst", S("abcdefghij"), false);
|
||||
test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test("", S(""), true);
|
||||
|
||||
@@ -45,7 +45,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghij", false);
|
||||
test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), "", true);
|
||||
|
||||
@@ -46,7 +46,7 @@ int main()
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false);
|
||||
test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true);
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S(""), S(""), true);
|
||||
|
||||
Reference in New Issue
Block a user