diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp --- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp @@ -41,11 +41,10 @@ # include #endif -#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY -# include +#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY +# include #endif -#include "test_macros.h" #include "test_iterators.h" #include "iterator_traits_cpp17_iterators.h" @@ -210,7 +209,7 @@ static_assert(testConstWithoutConcept()); #endif // !TEST_HAS_NO_LOCALIZATION -#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY +#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY static_assert(testWithoutConcept()); diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/types.compile.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/types.compile.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/types.compile.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/types.compile.pass.cpp @@ -23,9 +23,6 @@ #include #include #include -#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY -# include -#endif #include #include #include @@ -45,6 +42,9 @@ #include "test_macros.h" +#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY +# include +#endif #ifndef TEST_HAS_NO_LOCALIZATION # include #endif @@ -210,7 +210,7 @@ assert_formatter_is_disabled, CharT>(); assert_formatter_is_disabled, CharT>(); assert_formatter_is_disabled(); -#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY +#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY assert_formatter_is_disabled(); #endif assert_formatter_is_disabled, CharT>(); diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -388,6 +388,10 @@ # define TEST_HAS_NO_THREADS #endif +#if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) +# define TEST_HAS_NO_FILESYSTEM_LIBRARY +#endif + #if defined(__GNUC__) #pragma GCC diagnostic pop #endif