[libc++][NFC] Add TEST_HAS_NO_INCOMPLETE_RANGES.
This avoids using an libc++ internal macro in our tests. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D121515
This commit is contained in:
parent
d38c9d3834
commit
e72cedcb01
|
@ -85,7 +85,7 @@ void test_std_array() {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
#ifndef TEST_HAS_NO_INCOMPLETE_RANGES
|
||||
void test_range_std_container() {
|
||||
{
|
||||
std::string str{"ABCDE"};
|
||||
|
@ -103,7 +103,7 @@ void test_range_std_container() {
|
|||
assert(s.data() == str.data());
|
||||
}
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
#endif // TEST_HAS_NO_INCOMPLETE_RANGES
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
|
@ -111,9 +111,9 @@ int main(int, char**)
|
|||
test_c_array();
|
||||
test_std_array();
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
#ifndef TEST_HAS_NO_INCOMPLETE_RANGES
|
||||
test_range_std_container();
|
||||
#endif // _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
#endif // TEST_HAS_NO_INCOMPLETE_RANGES
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -394,6 +394,10 @@ inline void DoNotOptimize(Tp const& value) {
|
|||
# define TEST_HAS_NO_FGETPOS_FSETPOS
|
||||
#endif
|
||||
|
||||
#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
|
||||
# define TEST_HAS_NO_INCOMPLETE_RANGES
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue