mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-21 06:40:06 +08:00
[libc++] Use UNSUPPORTED instead of TEST_STD_VER #ifdef
When the whole test only works starting at some version of the Standard, use UNSUPPORTED lit markup instead of #ifdef TEST_STD_VER. This provides more visibility into the test suite. Reviewed as https://reviews.llvm.org/D57704. Thanks to Andrey Maksimov for the patch. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@353206 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03, c++11
|
||||||
|
|
||||||
// <iomanip>
|
// <iomanip>
|
||||||
|
|
||||||
// quoted
|
// quoted
|
||||||
@@ -15,10 +17,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "test_macros.h"
|
|
||||||
|
|
||||||
#if TEST_STD_VER > 11
|
|
||||||
|
|
||||||
template <class CharT, class Traits>
|
template <class CharT, class Traits>
|
||||||
bool is_skipws ( const std::basic_istream<CharT, Traits>& is ) {
|
bool is_skipws ( const std::basic_istream<CharT, Traits>& is ) {
|
||||||
return ( is.flags() & std::ios_base::skipws ) != 0;
|
return ( is.flags() & std::ios_base::skipws ) != 0;
|
||||||
@@ -173,12 +171,6 @@ int main(int, char**)
|
|||||||
assert ( unquote ( "" ) == "" ); // nothing there
|
assert ( unquote ( "" ) == "" ); // nothing there
|
||||||
assert ( unquote ( L"" ) == L"" ); // nothing there
|
assert ( unquote ( L"" ) == L"" ); // nothing there
|
||||||
test_padding ();
|
test_padding ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
int main(int, char**) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
@@ -6,13 +6,12 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
#include <scoped_allocator>
|
#include <scoped_allocator>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "test_macros.h"
|
|
||||||
|
|
||||||
#if TEST_STD_VER >= 11
|
|
||||||
// #include <memory>
|
// #include <memory>
|
||||||
//
|
//
|
||||||
// template <class Alloc>
|
// template <class Alloc>
|
||||||
@@ -121,6 +120,3 @@ int main(int, char**)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
int main(int, char**) { return 0; }
|
|
||||||
#endif
|
|
||||||
|
@@ -6,12 +6,11 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "test_macros.h"
|
|
||||||
|
|
||||||
#if TEST_STD_VER >= 11
|
|
||||||
// #include <memory>
|
// #include <memory>
|
||||||
//
|
//
|
||||||
// template <class Alloc>
|
// template <class Alloc>
|
||||||
@@ -120,6 +119,3 @@ int main(int, char**)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
int main(int, char**) { return 0; }
|
|
||||||
#endif
|
|
||||||
|
@@ -11,11 +11,11 @@
|
|||||||
// nullptr_t
|
// nullptr_t
|
||||||
// is_null_pointer
|
// is_null_pointer
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03, c++11
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <cstddef> // for std::nullptr_t
|
#include <cstddef> // for std::nullptr_t
|
||||||
#include "test_macros.h"
|
|
||||||
|
|
||||||
#if TEST_STD_VER > 11
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void test_nullptr_imp()
|
void test_nullptr_imp()
|
||||||
{
|
{
|
||||||
@@ -54,8 +54,3 @@ int main(int, char**)
|
|||||||
static_assert(!std::is_null_pointer<incomplete_type>::value, "");
|
static_assert(!std::is_null_pointer<incomplete_type>::value, "");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
int main(int, char**) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
@@ -6,12 +6,10 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// This is for bugs 18853 and 19118
|
// This is for bugs 18853 and 19118
|
||||||
|
|
||||||
#include "test_macros.h"
|
|
||||||
|
|
||||||
#if TEST_STD_VER >= 11
|
|
||||||
|
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
@@ -32,6 +30,3 @@ int main(int, char**)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
int main(int, char**) { return 0; }
|
|
||||||
#endif
|
|
||||||
|
Reference in New Issue
Block a user