[libcxx][test] test _LIBCPP_VERSION with #ifdef, not #if

This commit is contained in:
Casey Carter 2021-12-29 17:53:16 -08:00
parent d5db25fb1d
commit a94739985b
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@
#include "test_macros.h"
void test(const auto& store) {
#if _LIBCPP_VERSION
#ifdef _LIBCPP_VERSION
for (const auto& arg : store.__args) {
assert(arg);
assert(static_cast<bool>(arg));

View File

@ -145,7 +145,7 @@ void format_test_string(T world, T universe, TestFunction check,
STR("hello {:0}"), world);
// *** width ***
#if _LIBCPP_VERSION
#ifdef _LIBCPP_VERSION
// This limit isn't specified in the Standard.
static_assert(std::__format::__number_max == 2'147'483'647,
"Update the assert and the test.");
@ -180,7 +180,7 @@ void format_test_string(T world, T universe, TestFunction check,
check_exception("Invalid arg-id", STR("hello {0:{01}}"), world, 1);
// *** precision ***
#if _LIBCPP_VERSION
#ifdef _LIBCPP_VERSION
// This limit isn't specified in the Standard.
static_assert(std::__format::__number_max == 2'147'483'647,
"Update the assert and the test.");