diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp index f644f2870753d3..5fe15fbf23e245 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(S s1, S s2) { S s1_ = s1; @@ -33,9 +33,8 @@ test(S s1, S s2) assert(s2 == s1_); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), S("")); test(S(""), S("12345")); @@ -53,9 +52,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("12345")); test(S("abcdefghijklmnopqrst"), S("1234567890")); test(S("abcdefghijklmnopqrst"), S("12345678901234567890")); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), S("")); test(S(""), S("12345")); @@ -73,7 +72,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("12345")); test(S("abcdefghijklmnopqrst"), S("1234567890")); test(S("abcdefghijklmnopqrst"), S("12345678901234567890")); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp index 3de398264d4dcb..b301a5055bb727 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const typename S::value_type* lhs, const S& rhs, bool x) { assert((lhs != rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test("", S(""), false); test("", S("abcde"), true); @@ -44,9 +43,9 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), true); test("abcdefghijklmnopqrst", S("abcdefghij"), true); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test("", S(""), false); test("", S("abcde"), true); @@ -64,7 +63,17 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), true); test("abcdefghijklmnopqrst", S("abcdefghij"), true); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp index 220bde69caf004..db79165d568d2c 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const typename S::value_type* rhs, bool x) { assert((lhs != rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), "", false); test(S(""), "abcde", true); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", true); test(S("abcdefghijklmnopqrst"), "abcdefghij", true); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), "", false); test(S(""), "abcde", true); @@ -64,7 +63,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", true); test(S("abcdefghijklmnopqrst"), "abcdefghij", true); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp index 51d9f60629cbec..c5007fd15a58ed 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp @@ -19,15 +19,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const S& rhs, bool x) { assert((lhs != rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), S(""), false); test(S(""), S("abcde"), true); @@ -45,9 +44,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), S(""), false); test(S(""), S("abcde"), true); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string_view.pass.cpp index 80ef8daf2c039c..23990f1fb77508 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string_view.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, SV rhs, bool x) { assert((lhs != rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string SV; test(S(""), SV(""), false); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; typedef std::basic_string_view> SV; test(S(""), SV(""), false); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_view_string.pass.cpp index bd81bb1667065a..1cb88d1786625b 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_view_string.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(SV lhs, const S& rhs, bool x) { assert((lhs != rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(SV(""), S(""), false); @@ -44,9 +43,9 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; typedef std::basic_string_view> SV; test(SV(""), S(""), false); @@ -65,7 +64,17 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp index 9ab3c0611971db..f9f8cd95fb9843 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp @@ -24,18 +24,18 @@ #include "min_allocator.h" template -void test0(typename S::value_type lhs, const S& rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test0(typename S::value_type lhs, const S& rhs, const S& x) { assert(lhs + rhs == x); } #if TEST_STD_VER >= 11 template -void test1(typename S::value_type lhs, S&& rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test1(typename S::value_type lhs, S&& rhs, const S& x) { assert(lhs + move(rhs) == x); } #endif -int main(int, char**) { +bool test() { { typedef std::string S; test0('a', S(""), S("a")); @@ -67,5 +67,14 @@ int main(int, char**) { } #endif + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); +#endif + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp index cf13fbb51d6e17..89fadc2227e292 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp @@ -24,18 +24,18 @@ #include "min_allocator.h" template -void test0(const typename S::value_type* lhs, const S& rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test0(const typename S::value_type* lhs, const S& rhs, const S& x) { assert(lhs + rhs == x); } #if TEST_STD_VER >= 11 template -void test1(const typename S::value_type* lhs, S&& rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test1(const typename S::value_type* lhs, S&& rhs, const S& x) { assert(lhs + move(rhs) == x); } #endif -int main(int, char**) { +bool test() { { typedef std::string S; test0("", S(""), S("")); @@ -128,5 +128,14 @@ int main(int, char**) { } #endif + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); +#endif + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp index 32411144db276e..ee2a2395396871 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp @@ -24,18 +24,18 @@ #include "min_allocator.h" template -void test0(const S& lhs, typename S::value_type rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test0(const S& lhs, typename S::value_type rhs, const S& x) { assert(lhs + rhs == x); } #if TEST_STD_VER >= 11 template -void test1(S&& lhs, typename S::value_type rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test1(S&& lhs, typename S::value_type rhs, const S& x) { assert(move(lhs) + rhs == x); } #endif -int main(int, char**) { +bool test() { { typedef std::string S; test0(S(""), '1', S("1")); @@ -67,5 +67,14 @@ int main(int, char**) { } #endif + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); +#endif + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp index 4fec8482966233..bdcc464e5a8e94 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp @@ -24,18 +24,18 @@ #include "min_allocator.h" template -void test0(const S& lhs, const typename S::value_type* rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test0(const S& lhs, const typename S::value_type* rhs, const S& x) { assert(lhs + rhs == x); } #if TEST_STD_VER >= 11 template -void test1(S&& lhs, const typename S::value_type* rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test1(S&& lhs, const typename S::value_type* rhs, const S& x) { assert(move(lhs) + rhs == x); } #endif -int main(int, char**) { +bool test() { { typedef std::string S; test0(S(""), "", S("")); @@ -127,5 +127,14 @@ int main(int, char**) { } #endif + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); +#endif + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp index 00aaf5cc092170..3c349ed96f74c5 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp @@ -36,29 +36,28 @@ #include "min_allocator.h" template -void test0(const S& lhs, const S& rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test0(const S& lhs, const S& rhs, const S& x) { assert(lhs + rhs == x); } #if TEST_STD_VER >= 11 template -void test1(S&& lhs, const S& rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test1(S&& lhs, const S& rhs, const S& x) { assert(move(lhs) + rhs == x); } template -void test2(const S& lhs, S&& rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test2(const S& lhs, S&& rhs, const S& x) { assert(lhs + move(rhs) == x); } template -void test3(S&& lhs, S&& rhs, const S& x) { +TEST_CONSTEXPR_CXX20 void test3(S&& lhs, S&& rhs, const S& x) { assert(move(lhs) + move(rhs) == x); } - #endif -int main(int, char**) { +bool test() { { typedef std::string S; test0(S(""), S(""), S("")); @@ -246,5 +245,14 @@ int main(int, char**) { } #endif // TEST_STD_VER >= 11 + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); +#endif + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp index 0efd829ee0d17f..1b9153168fd82f 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const typename S::value_type* lhs, const S& rhs, bool x) { assert((lhs == rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test("", S(""), true); test("", S("abcde"), false); @@ -44,9 +43,9 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), false); test("abcdefghijklmnopqrst", S("abcdefghij"), false); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test("", S(""), true); test("", S("abcde"), false); @@ -64,7 +63,17 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), false); test("abcdefghijklmnopqrst", S("abcdefghij"), false); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp index ae0d3e88d5faaf..9e6ddcf93d54d9 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const typename S::value_type* rhs, bool x) { assert((lhs == rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), "", true); test(S(""), "abcde", false); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", false); test(S("abcdefghijklmnopqrst"), "abcdefghij", false); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), "", true); test(S(""), "abcde", false); @@ -64,7 +63,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", false); test(S("abcdefghijklmnopqrst"), "abcdefghij", false); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp index 387c0016dc15b1..aafabdec68a025 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp @@ -19,15 +19,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const S& rhs, bool x) { assert((lhs == rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), S(""), true); test(S(""), S("abcde"), false); @@ -45,9 +44,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), S(""), true); test(S(""), S("abcde"), false); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp index a525c752d6cd15..be393ab5c4c0e5 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, SV rhs, bool x) { assert((lhs == rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(S(""), SV(""), true); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string , min_allocator> S; typedef std::basic_string_view> SV; test(S(""), SV(""), true); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp index 793fa2388b274f..36cd9e478b61b1 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(SV lhs, const S& rhs, bool x) { assert((lhs == rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(SV(""), S(""), true); @@ -44,9 +43,9 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; typedef std::basic_string_view> SV; test(SV(""), S(""), true); @@ -65,7 +64,17 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp index 2e96167b41997e..781aafca5d493a 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const typename S::value_type* lhs, const S& rhs, bool x) { assert((lhs > rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test("", S(""), false); test("", S("abcde"), false); @@ -44,9 +43,9 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), true); test("abcdefghijklmnopqrst", S("abcdefghij"), true); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test("", S(""), false); test("", S("abcde"), false); @@ -64,7 +63,17 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), true); test("abcdefghijklmnopqrst", S("abcdefghij"), true); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp index 57c979d0caafa1..c1e5b5b18e3cbc 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const typename S::value_type* rhs, bool x) { assert((lhs > rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), "", false); test(S(""), "abcde", false); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", true); test(S("abcdefghijklmnopqrst"), "abcdefghij", true); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), "", false); test(S(""), "abcde", false); @@ -64,7 +63,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", true); test(S("abcdefghijklmnopqrst"), "abcdefghij", true); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp index cc6f331756f962..863ecec14580ed 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp @@ -19,15 +19,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const S& rhs, bool x) { assert((lhs > rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), S(""), false); test(S(""), S("abcde"), false); @@ -45,9 +44,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), S(""), false); test(S(""), S("abcde"), false); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string_view.pass.cpp index 7f6ad7d3bd2107..2220c11571b4a5 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string_view.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, SV rhs, bool x) { assert((lhs > rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(S(""), SV(""), false); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string , min_allocator> S; typedef std::basic_string_view> SV; test(S(""), SV(""), false); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_view_string.pass.cpp index b96ee17aa2e606..18bec19a8df74a 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_view_string.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(SV lhs, const S& rhs, bool x) { assert((lhs > rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(SV(""), S(""), false); @@ -44,9 +43,9 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string , min_allocator> S; typedef std::basic_string_view> SV; test(SV(""), S(""), false); @@ -65,7 +64,17 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp index 9082f36c94882e..4ac1ddd9feccaf 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const typename S::value_type* lhs, const S& rhs, bool x) { assert((lhs >= rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test("", S(""), true); test("", S("abcde"), false); @@ -44,9 +43,9 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), true); test("abcdefghijklmnopqrst", S("abcdefghij"), true); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test("", S(""), true); test("", S("abcde"), false); @@ -64,7 +63,17 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), true); test("abcdefghijklmnopqrst", S("abcdefghij"), true); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp index 72ed73aa2d8c33..2d64d40a4a39b1 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const typename S::value_type* rhs, bool x) { assert((lhs >= rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), "", true); test(S(""), "abcde", false); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", true); test(S("abcdefghijklmnopqrst"), "abcdefghij", true); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), "", true); test(S(""), "abcde", false); @@ -64,7 +63,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", true); test(S("abcdefghijklmnopqrst"), "abcdefghij", true); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp index 604698a8d0c104..252a1f1325b56d 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp @@ -19,15 +19,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const S& rhs, bool x) { assert((lhs >= rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), S(""), true); test(S(""), S("abcde"), false); @@ -45,9 +44,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), S(""), true); test(S(""), S("abcde"), false); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string_view.pass.cpp index 131f83ea446484..f7fcc250c183db 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string_view.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, SV rhs, bool x) { assert((lhs >= rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(S(""), SV(""), true); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; typedef std::basic_string_view> SV; test(S(""), SV(""), true); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), true); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_view_string.pass.cpp index 45c0ed11eed023..e0c62c66fc6f1c 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_view_string.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(SV lhs, const S& rhs, bool x) { assert((lhs >= rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(SV(""), S(""), true); @@ -44,9 +43,9 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; typedef std::basic_string_view> SV; test(SV(""), S(""), true); @@ -65,7 +64,17 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), true); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp index 5e96bf37b34501..02f725c09a0892 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const typename S::value_type* lhs, const S& rhs, bool x) { assert((lhs < rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test("", S(""), false); test("", S("abcde"), true); @@ -44,9 +43,9 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), false); test("abcdefghijklmnopqrst", S("abcdefghij"), false); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test("", S(""), false); test("", S("abcde"), true); @@ -64,7 +63,17 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), false); test("abcdefghijklmnopqrst", S("abcdefghij"), false); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp index f01b69e620b3fd..6909cf884db9b3 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const typename S::value_type* rhs, bool x) { assert((lhs < rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), "", false); test(S(""), "abcde", true); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", false); test(S("abcdefghijklmnopqrst"), "abcdefghij", false); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), "", false); test(S(""), "abcde", true); @@ -64,7 +63,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", false); test(S("abcdefghijklmnopqrst"), "abcdefghij", false); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp index b6a61f7034f6cc..0cd4f64c812737 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp @@ -19,15 +19,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const S& rhs, bool x) { assert((lhs < rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), S(""), false); test(S(""), S("abcde"), true); @@ -45,9 +44,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), S(""), false); test(S(""), S("abcde"), true); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string_view.pass.cpp index fa81ae88fbeed3..470ee16bec1e57 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string_view.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, SV rhs, bool x) { assert((lhs < rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(S(""), SV(""), false); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; typedef std::basic_string_view> SV; test(S(""), SV(""), false); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_view_string.pass.cpp index 54f8015442a02e..b0baab5085a2a5 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_view_string.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(SV lhs, const S& rhs, bool x) { assert((lhs < rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(SV(""), S(""), false); @@ -44,9 +43,9 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; typedef std::basic_string_view> SV; test(SV(""), S(""), false); @@ -65,7 +64,17 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp index 5c43125974e959..67c090d22a83b6 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const typename S::value_type* lhs, const S& rhs, bool x) { assert((lhs <= rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test("", S(""), true); test("", S("abcde"), true); @@ -44,9 +43,9 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), false); test("abcdefghijklmnopqrst", S("abcdefghij"), false); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test("", S(""), true); test("", S("abcde"), true); @@ -64,7 +63,17 @@ int main(int, char**) test("abcdefghijklmnopqrst", S("abcde"), false); test("abcdefghijklmnopqrst", S("abcdefghij"), false); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp index 3b1dc2cb8a165c..3a6ba9e0871bb5 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp @@ -18,15 +18,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const typename S::value_type* rhs, bool x) { assert((lhs <= rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), "", true); test(S(""), "abcde", true); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", false); test(S("abcdefghijklmnopqrst"), "abcdefghij", false); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), "", true); test(S(""), "abcde", true); @@ -64,7 +63,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), "abcde", false); test(S("abcdefghijklmnopqrst"), "abcdefghij", false); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp index 219ed5101b298a..ddec31bd335553 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp @@ -19,15 +19,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, const S& rhs, bool x) { assert((lhs <= rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; test(S(""), S(""), true); test(S(""), S("abcde"), true); @@ -45,9 +44,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; test(S(""), S(""), true); test(S(""), S("abcde"), true); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), S("abcde"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string_view.pass.cpp index 52806ae60bdd63..dfd8877a62bd2f 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string_view.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(const S& lhs, SV rhs, bool x) { assert((lhs <= rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(S(""), SV(""), true); @@ -44,9 +43,9 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; typedef std::basic_string_view> SV; test(S(""), SV(""), true); @@ -65,7 +64,17 @@ int main(int, char**) test(S("abcdefghijklmnopqrst"), SV("abcde"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0; diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_view_string.pass.cpp index 961fc0e5b87a2b..527a45a199059d 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_view_string.pass.cpp @@ -17,15 +17,14 @@ #include "min_allocator.h" template -void +TEST_CONSTEXPR_CXX20 void test(SV lhs, const S& rhs, bool x) { assert((lhs <= rhs) == x); } -int main(int, char**) -{ - { +bool test() { + { typedef std::string S; typedef std::string_view SV; test(SV(""), S(""), true); @@ -44,9 +43,9 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } #if TEST_STD_VER >= 11 - { + { typedef std::basic_string, min_allocator> S; typedef std::basic_string_view> SV; test(SV(""), S(""), true); @@ -65,7 +64,17 @@ int main(int, char**) test(SV("abcdefghijklmnopqrst"), S("abcde"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); - } + } +#endif + + return true; +} + +int main(int, char**) +{ + test(); +#if TEST_STD_VER > 17 + // static_assert(test()); #endif return 0;