[libcxx] [test] Use TEST_COMPILER_C1XX.

Also TEST_COMPILER_CLANG in one place. (More could be changed.)

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329977 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephan T. Lavavej
2018-04-12 23:56:17 +00:00
parent 97fc529b73
commit bf3a3685cf
4 changed files with 13 additions and 9 deletions

View File

@@ -15,14 +15,15 @@
// constexpr void // constexpr after c++17 // constexpr void // constexpr after c++17
// generate_n(Iter first, Size n, Generator gen); // generate_n(Iter first, Size n, Generator gen);
#ifdef _MSC_VER #include "test_macros.h"
#ifdef TEST_COMPILER_C1XX
#pragma warning(disable: 4244) // conversion from 'const double' to 'int', possible loss of data #pragma warning(disable: 4244) // conversion from 'const double' to 'int', possible loss of data
#endif #endif
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include "test_macros.h"
#include "test_iterators.h" #include "test_iterators.h"
#include "user_defined_integral.hpp" #include "user_defined_integral.hpp"

View File

@@ -17,11 +17,13 @@
#include <sstream> #include <sstream>
#include <cassert> #include <cassert>
#if defined(__clang__) #include "test_macros.h"
#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wliteral-conversion" #pragma clang diagnostic ignored "-Wliteral-conversion"
#endif #endif
#ifdef _MSC_VER #ifdef TEST_COMPILER_C1XX
#pragma warning(disable: 4244) // conversion from 'X' to 'Y', possible loss of data #pragma warning(disable: 4244) // conversion from 'X' to 'Y', possible loss of data
#endif #endif

View File

@@ -21,8 +21,9 @@
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
#include "test_iterators.h" #include "test_iterators.h"
#include "test_macros.h"
#ifdef _MSC_VER #ifdef TEST_COMPILER_C1XX
#pragma warning(disable: 4146) // unary minus operator applied to unsigned type, result still unsigned #pragma warning(disable: 4146) // unary minus operator applied to unsigned type, result still unsigned
#endif #endif

View File

@@ -45,10 +45,10 @@ test1()
assert((LCE::min() == (c == 0u ? 1u: 0u))); assert((LCE::min() == (c == 0u ? 1u: 0u)));
#endif #endif
#ifdef _MSC_VER #ifdef TEST_COMPILER_C1XX
#pragma warning(push) #pragma warning(push)
#pragma warning(disable: 4310) // cast truncates constant value #pragma warning(disable: 4310) // cast truncates constant value
#endif // _MSC_VER #endif // TEST_COMPILER_C1XX
#if TEST_STD_VER >= 11 #if TEST_STD_VER >= 11
static_assert((LCE::max() == result_type(m - 1u)), ""); static_assert((LCE::max() == result_type(m - 1u)), "");
@@ -56,9 +56,9 @@ test1()
assert((LCE::max() == result_type(m - 1u))); assert((LCE::max() == result_type(m - 1u)));
#endif #endif
#ifdef _MSC_VER #ifdef TEST_COMPILER_C1XX
#pragma warning(pop) #pragma warning(pop)
#endif // _MSC_VER #endif // TEST_COMPILER_C1XX
static_assert((LCE::default_seed == 1), ""); static_assert((LCE::default_seed == 1), "");
where(LCE::multiplier); where(LCE::multiplier);