From 4d4213f69449f1f6c1a1890746b330727b57cad9 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 7 Jan 2019 16:17:52 +0000 Subject: [PATCH] Add the feature test macros that were defined in p1353r0 to the headers of the appropriate tests. No actual tests yet, so NFC. llvm-svn: 350535 --- .../compare.version.pass.cpp | 32 +++++++++++++++++++ .../new.version.pass.cpp | 2 +- .../version.version.pass.cpp | 2 ++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.pass.cpp diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.pass.cpp new file mode 100644 index 000000000000..eff2cb293e41 --- /dev/null +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.pass.cpp @@ -0,0 +1,32 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_three_way_comparison 201711L + +*/ + +#include +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#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 +*/ +} diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp index 856bd8b0135e..6bcd242d1778 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp @@ -1,4 +1,3 @@ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -11,6 +10,7 @@ // feature macros /* Constant Value + __cpp_lib_destroying_delete 201806L __cpp_lib_hardware_interference_size 201703L __cpp_lib_launder 201606L diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp index e2179e08a83c..29fe4b298907 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp @@ -29,6 +29,7 @@ __cpp_lib_complex_udls 201309L __cpp_lib_concepts 201806L __cpp_lib_constexpr_swap_algorithms 201806L + __cpp_lib_destroying_delete 201806L __cpp_lib_enable_shared_from_this 201603L __cpp_lib_exchange_function 201304L __cpp_lib_execution 201603L @@ -75,6 +76,7 @@ __cpp_lib_string_udls 201304L __cpp_lib_string_view 201606L __cpp_lib_to_chars 201611L + __cpp_lib_three_way_comparison 201711L __cpp_lib_transformation_trait_aliases 201304L __cpp_lib_transparent_operators 201510L __cpp_lib_tuple_element_t 201402L