[libc++] Prepare string.{access, capacity, cons} tests for constexpr

Reviewed By: ldionne, #libc

Spies: libcxx-commits, arphaman

Differential Revision: https://reviews.llvm.org/D119123
This commit is contained in:
Nikolas Klauser committed 2022-02-08 23:39:44 +01:00
1 parent ca9f0ec1a3
commit e85018b7dd
42 files changed
+734 -361

No files matched your search

@@ -71,9 +71,8 @@ test(std::basic_string_view<charT> sv, const A& a)
}
}
int main(int, char**)
{
{
bool test() {
{
typedef test_allocator<char> A;
typedef std::basic_string_view<char, std::char_traits<char> > SV;
@@ -88,9 +87,9 @@ int main(int, char**)
test(SV("123456798012345679801234567980123456798012345679801234567980"));
test(SV("123456798012345679801234567980123456798012345679801234567980"), A(2));
}
}
#if TEST_STD_VER >= 11
{
{
typedef min_allocator<char> A;
typedef std::basic_string_view<char, std::char_traits<char> > SV;
@@ -105,7 +104,17 @@ int main(int, char**)
test(SV("123456798012345679801234567980123456798012345679801234567980"));
test(SV("123456798012345679801234567980123456798012345679801234567980"), A());
}
}
#endif
return true;
}
int main(int, char**)
{
test();
#if TEST_STD_VER > 17
// static_assert(test());
#endif
return 0;