[libc++][NFC] Use TEST_HAS_NO_FILESYSTEM_LIBRARY in the test suite
authorLouis Dionne <ldionne.2@gmail.com>
Wed, 31 May 2023 18:40:01 +0000 (11:40 -0700)
committerLouis Dionne <ldionne.2@gmail.com>
Thu, 1 Jun 2023 15:20:27 +0000 (08:20 -0700)
This replaces some uses of internal libc++ macros with the equivalent
macro from "test_macros.h".

Differential Revision: https://reviews.llvm.org/D151825

libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp
libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp
libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_input_iterator.compile.pass.cpp
libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_iterator.compile.pass.cpp
libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp

index dff0185..5d7097c 100644 (file)
 // template<class I>
 // concept __iterator_traits_detail::__cpp17_bidirectional_iterator;
 
+#include "test_macros.h"
+
 #include <iterator>
 
 #include <array>
 #include <deque>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY
 #include <filesystem>
 #endif
 #include <forward_list>
@@ -59,7 +61,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_bidirectional_iterator<std:
 static_assert(std::__iterator_traits_detail::__cpp17_bidirectional_iterator<std::deque<int>::const_reverse_iterator>);
 
 // <filesystem>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY
 static_assert(!std::__iterator_traits_detail::__cpp17_bidirectional_iterator<std::filesystem::directory_iterator>);
 static_assert(!std::__iterator_traits_detail::__cpp17_bidirectional_iterator<std::filesystem::recursive_directory_iterator>);
 #endif
index 2371cbd..8f36323 100644 (file)
 // template<class I>
 // concept __iterator_traits_detail::__cpp17_forward_iterator;
 
+#include "test_macros.h"
+
 #include <iterator>
 
 #include <array>
 #include <deque>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY
 #include <filesystem>
 #endif
 #include <forward_list>
@@ -59,7 +61,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_forward_iterator<std::deque
 static_assert(std::__iterator_traits_detail::__cpp17_forward_iterator<std::deque<int>::const_reverse_iterator>);
 
 // <filesystem>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY
 static_assert(!std::__iterator_traits_detail::__cpp17_forward_iterator<std::filesystem::directory_iterator>);
 static_assert(!std::__iterator_traits_detail::__cpp17_forward_iterator<std::filesystem::recursive_directory_iterator>);
 #endif
index e6c48b5..43f22c6 100644 (file)
 // template<class I>
 // concept __iterator_traits_detail::__cpp17_input_iterator;
 
+#include "test_macros.h"
+
 #include <iterator>
 
 #include <array>
 #include <deque>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY
 #include <filesystem>
 #endif
 #include <forward_list>
@@ -59,7 +61,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_input_iterator<std::deque<i
 static_assert(std::__iterator_traits_detail::__cpp17_input_iterator<std::deque<int>::const_reverse_iterator>);
 
 // <filesystem>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY
 static_assert(std::__iterator_traits_detail::__cpp17_input_iterator<std::filesystem::directory_iterator>);
 static_assert(std::__iterator_traits_detail::__cpp17_input_iterator<std::filesystem::recursive_directory_iterator>);
 #endif
index 2dc3320..32f4022 100644 (file)
 // template<class I>
 // concept __iterator_traits_detail::__cpp17_iterator;
 
+#include "test_macros.h"
+
 #include <iterator>
 
 #include <array>
 #include <deque>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY
 #include <filesystem>
 #endif
 #include <forward_list>
@@ -59,7 +61,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_iterator<std::deque<int>::r
 static_assert(std::__iterator_traits_detail::__cpp17_iterator<std::deque<int>::const_reverse_iterator>);
 
 // <filesystem>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY
 static_assert(std::__iterator_traits_detail::__cpp17_iterator<std::filesystem::directory_iterator>);
 static_assert(std::__iterator_traits_detail::__cpp17_iterator<std::filesystem::recursive_directory_iterator>);
 #endif
index 01fef35..7e311e1 100644 (file)
 // template<class I>
 // concept __iterator_traits_detail::__cpp17_random_access_iterator;
 
+#include "test_macros.h"
+
 #include <iterator>
 
 #include <array>
 #include <deque>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY
 #include <filesystem>
 #endif
 #include <forward_list>
@@ -59,7 +61,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_random_access_iterator<std:
 static_assert(std::__iterator_traits_detail::__cpp17_random_access_iterator<std::deque<int>::const_reverse_iterator>);
 
 // <filesystem>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef TEST_HAS_NO_FILESYSTEM_LIBRARY
 static_assert(!std::__iterator_traits_detail::__cpp17_random_access_iterator<std::filesystem::directory_iterator>);
 static_assert(!std::__iterator_traits_detail::__cpp17_random_access_iterator<std::filesystem::recursive_directory_iterator>);
 #endif