Differential D47360 Diff 219818 test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp
Changeset View
Changeset View
Standalone View
Standalone View
test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// <memory_resource> feature macros | // WARNING: This test was generated by generate_feature_test_macro_components.py | ||||
// and should not be edited manually. | |||||
/* Constant Value | // <memory_resource> | ||||
__cpp_lib_memory_resource 201603L | |||||
// Test the feature test macros defined by <memory_resource> | |||||
/* Constant Value | |||||
__cpp_lib_memory_resource 201603L [C++17] | |||||
*/ | */ | ||||
// XFAIL | #include <memory_resource> | ||||
// #include <memory_resource> | |||||
#include <cassert> | |||||
#include "test_macros.h" | #include "test_macros.h" | ||||
int main(int, char**) | #if TEST_STD_VER < 14 | ||||
{ | |||||
// ensure that the macros that are supposed to be defined in <memory_resource> are defined. | # ifdef __cpp_lib_memory_resource | ||||
# error "__cpp_lib_memory_resource should not be defined before c++17" | |||||
/* | |||||
#if !defined(__cpp_lib_fooby) | |||||
# error "__cpp_lib_fooby is not defined" | |||||
#elif __cpp_lib_fooby < 201606L | |||||
# error "__cpp_lib_fooby has an invalid value" | |||||
#endif | # endif | ||||
*/ | |||||
return 0; | #elif TEST_STD_VER == 14 | ||||
} | |||||
# ifdef __cpp_lib_memory_resource | |||||
# error "__cpp_lib_memory_resource should not be defined before c++17" | |||||
# endif | |||||
#elif TEST_STD_VER == 17 | |||||
# ifndef __cpp_lib_memory_resource | |||||
# error "__cpp_lib_memory_resource should be defined in c++17" | |||||
# endif | |||||
# if __cpp_lib_memory_resource != 201603L | |||||
# error "__cpp_lib_memory_resource should have the value 201603L in c++17" | |||||
# endif | |||||
#elif TEST_STD_VER > 17 | |||||
# ifndef __cpp_lib_memory_resource | |||||
# error "__cpp_lib_memory_resource should be defined in c++2a" | |||||
# endif | |||||
# if __cpp_lib_memory_resource != 201603L | |||||
# error "__cpp_lib_memory_resource should have the value 201603L in c++2a" | |||||
# endif | |||||
#endif // TEST_STD_VER > 17 | |||||
int main(int, char**) { return 0; } |