diff --git a/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp index 1fd2a171d807a..b65b77e96ef60 100644 --- a/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp +++ b/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp @@ -27,7 +27,7 @@ static_assert(std::three_way_comparable); static_assert(std::three_way_comparable); static_assert(std::three_way_comparable); static_assert(std::three_way_comparable); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(std::three_way_comparable); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp index e1dd88e85bf35..f18d52a0ed574 100644 --- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp @@ -95,7 +95,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp index 045b1cc9a7ada..f89029017fa8d 100644 --- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp @@ -91,7 +91,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp index 43f47d36bfe90..84b00efa7ed49 100644 --- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp @@ -96,7 +96,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp index 687f9ad45ff1a..35343c5542404 100644 --- a/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp @@ -94,7 +94,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp index 23196aa6ecf3d..9ee60a210d828 100644 --- a/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp @@ -91,7 +91,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp index 51675808f8340..87d5cf2b7be5d 100644 --- a/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp @@ -90,7 +90,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp index 448fdcbf12fe8..e57125e7e701f 100644 --- a/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp @@ -95,7 +95,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp index ffe5031d7e4d1..e8aa7f777acdc 100644 --- a/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp @@ -92,7 +92,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp index 3dd994b0868ad..3be240fb25a56 100644 --- a/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp @@ -102,7 +102,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp b/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp index 1432aee7fe732..78fac6267d18b 100644 --- a/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp @@ -90,7 +90,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp b/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp index 8c8505a2d5882..f930f40c5d18c 100644 --- a/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp @@ -91,7 +91,7 @@ int main(int, char**) static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp b/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp index 6a22864b23f10..e8072585a6601 100644 --- a/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp +++ b/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp @@ -19,7 +19,7 @@ static_assert(std::is_trivially_copyable >::value, #ifndef TEST_HAS_NO_WIDE_CHARACTERS static_assert(std::is_trivially_copyable >::value, ""); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(std::is_trivially_copyable >::value, ""); #endif static_assert(std::is_trivially_copyable >::value, ""); diff --git a/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp index 56fb05f1ad233..a15fe91ff638b 100644 --- a/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp +++ b/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp @@ -34,7 +34,7 @@ void test() { void test() { test(); test(); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp index a2afa786e0bb6..14b430580060b 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp @@ -52,7 +52,7 @@ void test() { std::make_format_args>, wchar_t>>())); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(std::basic_format_args( std::make_format_args>, char8_t>>())); diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp index 3b4834110e847..8e8afa9edc405 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp @@ -51,7 +51,7 @@ int main(int, char**) { #ifndef TEST_HAS_NO_WIDE_CHARACTERS test>, wchar_t>(); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test>, char8_t>(); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp index 049672f30f1db..e56d872670644 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp @@ -129,7 +129,7 @@ void test() { #ifndef TEST_HAS_NO_WIDE_CHARACTERS test>, wchar_t>(); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test>, char8_t>(); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp index 3286991e69fd3..6a85d3de0cdd3 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp @@ -85,7 +85,7 @@ void test() { #ifndef TEST_HAS_NO_WIDE_CHARACTERS test>, wchar_t>(); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test>, char8_t>(); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp index b211dfd3e7fab..506c485d4a5b2 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp @@ -48,7 +48,7 @@ void test() { std::make_format_args>, wchar_t>>())); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(std::basic_format_args( std::make_format_args>, char8_t>>())); diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp index 88c7cf5171898..7bb0d3e26610c 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp @@ -52,7 +52,7 @@ constexpr void test(const CharT* fmt) { constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp index c78c995543179..fd209e611c6bc 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp @@ -38,7 +38,7 @@ constexpr void test(const CharT* fmt) { constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp index e11d000f0e902..195f07742a016 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp @@ -61,7 +61,7 @@ constexpr void test(const CharT* fmt) { constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp index 9f6c8dc65c6a9..9a878ef42ba18 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp @@ -38,7 +38,7 @@ constexpr void test(const CharT* fmt) { constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp index 412bff7f2c91a..bc1398266b6c3 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp @@ -50,7 +50,7 @@ constexpr void test() { #ifndef TEST_HAS_NO_WIDE_CHARACTERS test(); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp b/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp index e822e73210872..a399cc7c1aee6 100644 --- a/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp +++ b/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp @@ -72,7 +72,7 @@ constexpr void test() { std::in_range(int()); // expected-error 10-11 {{no matching function for call to 'in_range'}} std::in_range(T()); // expected-error 10-11 {{no matching function for call to 'in_range'}} } -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T template constexpr void test_char8t() { std::cmp_equal(T(), T()); // expected-error 1 {{no matching function for call to 'cmp_equal'}} @@ -96,7 +96,7 @@ constexpr void test_char8t() { std::in_range(int()); // expected-error 1 {{no matching function for call to 'in_range'}} std::in_range(T()); // expected-error 1 {{no matching function for call to 'in_range'}} } -#endif // _LIBCPP_HAS_NO_CHAR8_T +#endif // TEST_HAS_NO_CHAR8_T #ifndef TEST_HAS_NO_UNICODE_CHARS template @@ -139,9 +139,9 @@ int main(int, char**) { test(); test(); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test_char8t(); -#endif // _LIBCPP_HAS_NO_CHAR8_T +#endif // TEST_HAS_NO_CHAR8_T #ifndef TEST_HAS_NO_UNICODE_CHARS test_uchars(); diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h index c3794ab4685dd..321347f801c76 100644 --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -380,6 +380,10 @@ inline void DoNotOptimize(Tp const& value) { # define TEST_HAS_NO_LOCALIZATION #endif +#if TEST_STD_VER <= 17 || !defined(__cpp_char8_t) +# define TEST_HAS_NO_CHAR8_T +#endif + #if defined(__GNUC__) #pragma GCC diagnostic pop #endif