mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 10:07:41 +08:00
[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:
@@ -15,6 +15,8 @@
|
||||
#include <type_traits>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
typedef std::modulus<int> F;
|
||||
@@ -23,7 +25,7 @@ int main()
|
||||
static_assert((std::is_same<int, F::second_argument_type>::value), "" );
|
||||
static_assert((std::is_same<int, F::result_type>::value), "" );
|
||||
assert(f(36, 8) == 4);
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
#if TEST_STD_VER > 11
|
||||
typedef std::modulus<> F2;
|
||||
const F2 f2 = F2();
|
||||
assert(f2(36, 8) == 4);
|
||||
|
Reference in New Issue
Block a user