diff options
Diffstat (limited to 'libcxx/test/strings/basic.string/string.nonmembers')
32 files changed, 0 insertions, 1651 deletions
diff --git a/libcxx/test/strings/basic.string/string.nonmembers/nothing_to_do.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b643..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp deleted file mode 100644 index 44aa73c9c9f4..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_istream<charT,traits>& -// getline(basic_istream<charT,traits>& is, -// basic_string<charT,traits,Allocator>& str); - -#include <string> -#include <sstream> -#include <cassert> - -int main() -{ - { - std::istringstream in(" abc\n def\n ghij"); - std::string s("initial text"); - getline(in, s); - assert(in.good()); - assert(s == " abc"); - getline(in, s); - assert(in.good()); - assert(s == " def"); - getline(in, s); - assert(in.eof()); - assert(s == " ghij"); - } - { - std::wistringstream in(L" abc\n def\n ghij"); - std::wstring s(L"initial text"); - getline(in, s); - assert(in.good()); - assert(s == L" abc"); - getline(in, s); - assert(in.good()); - assert(s == L" def"); - getline(in, s); - assert(in.eof()); - assert(s == L" ghij"); - } -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line_delim.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line_delim.pass.cpp deleted file mode 100644 index d8e2fec50329..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line_delim.pass.cpp +++ /dev/null @@ -1,55 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_istream<charT,traits>& -// getline(basic_istream<charT,traits>& is, -// basic_string<charT,traits,Allocator>& str, charT delim); - -#include <string> -#include <sstream> -#include <cassert> - -int main() -{ - { - std::istringstream in(" abc* def** ghij"); - std::string s("initial text"); - getline(in, s, '*'); - assert(in.good()); - assert(s == " abc"); - getline(in, s, '*'); - assert(in.good()); - assert(s == " def"); - getline(in, s, '*'); - assert(in.good()); - assert(s == ""); - getline(in, s, '*'); - assert(in.eof()); - assert(s == " ghij"); - } - { - std::wistringstream in(L" abc* def** ghij"); - std::wstring s(L"initial text"); - getline(in, s, L'*'); - assert(in.good()); - assert(s == L" abc"); - getline(in, s, L'*'); - assert(in.good()); - assert(s == L" def"); - getline(in, s, L'*'); - assert(in.good()); - assert(s == L""); - getline(in, s, L'*'); - assert(in.eof()); - assert(s == L" ghij"); - } -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp deleted file mode 100644 index 7be2958b5bd8..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_istream<charT,traits>& -// getline(basic_istream<charT,traits>&& is, -// basic_string<charT,traits,Allocator>& str, charT delim); - -#include <string> -#include <sstream> -#include <cassert> - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - std::string s("initial text"); - getline(std::istringstream(" abc* def* ghij"), s, '*'); - assert(s == " abc"); - } - { - std::wstring s(L"initial text"); - getline(std::wistringstream(L" abc* def* ghij"), s, L'*'); - assert(s == L" abc"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp deleted file mode 100644 index 7e46ad50296a..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_istream<charT,traits>& -// getline(basic_istream<charT,traits>&& is, -// basic_string<charT,traits,Allocator>& str); - -#include <string> -#include <sstream> -#include <cassert> - -int main() -{ -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { - std::string s("initial text"); - getline(std::istringstream(" abc\n def\n ghij"), s); - assert(s == " abc"); - } - { - std::wstring s(L"initial text"); - getline(std::wistringstream(L" abc\n def\n ghij"), s); - assert(s == L" abc"); - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string.io/stream_extract.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string.io/stream_extract.pass.cpp deleted file mode 100644 index f017370675af..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string.io/stream_extract.pass.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_istream<charT,traits>& -// operator>>(basic_istream<charT,traits>& is, -// basic_string<charT,traits,Allocator>& str); - -#include <string> -#include <sstream> -#include <cassert> - -int main() -{ - { - std::istringstream in("a bc defghij"); - std::string s("initial text"); - in >> s; - assert(in.good()); - assert(s == "a"); - assert(in.peek() == ' '); - in >> s; - assert(in.good()); - assert(s == "bc"); - assert(in.peek() == ' '); - in.width(3); - in >> s; - assert(in.good()); - assert(s == "def"); - assert(in.peek() == 'g'); - in >> s; - assert(in.eof()); - assert(s == "ghij"); - in >> s; - assert(in.fail()); - } - { - std::wistringstream in(L"a bc defghij"); - std::wstring s(L"initial text"); - in >> s; - assert(in.good()); - assert(s == L"a"); - assert(in.peek() == L' '); - in >> s; - assert(in.good()); - assert(s == L"bc"); - assert(in.peek() == L' '); - in.width(3); - in >> s; - assert(in.good()); - assert(s == L"def"); - assert(in.peek() == L'g'); - in >> s; - assert(in.eof()); - assert(s == L"ghij"); - in >> s; - assert(in.fail()); - } -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string.io/stream_insert.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string.io/stream_insert.pass.cpp deleted file mode 100644 index 617609961f94..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string.io/stream_insert.pass.cpp +++ /dev/null @@ -1,53 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_ostream<charT, traits>& -// operator<<(basic_ostream<charT, traits>& os, -// const basic_string<charT,traits,Allocator>& str); - -#include <string> -#include <sstream> -#include <cassert> - -int main() -{ - { - std::ostringstream out; - std::string s("some text"); - out << s; - assert(out.good()); - assert(s == out.str()); - } - { - std::ostringstream out; - std::string s("some text"); - out.width(12); - out << s; - assert(out.good()); - assert(" " + s == out.str()); - } - { - std::wostringstream out; - std::wstring s(L"some text"); - out << s; - assert(out.good()); - assert(s == out.str()); - } - { - std::wostringstream out; - std::wstring s(L"some text"); - out.width(12); - out << s; - assert(out.good()); - assert(L" " + s == out.str()); - } -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp deleted file mode 100644 index 7b34a7a485df..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp +++ /dev/null @@ -1,53 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// void swap(basic_string<charT,traits,Allocator>& lhs, -// basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <stdexcept> -#include <algorithm> -#include <cassert> - -template <class S> -void -test(S s1, S s2) -{ - S s1_ = s1; - S s2_ = s2; - swap(s1, s2); - assert(s1.__invariants()); - assert(s2.__invariants()); - assert(s1 == s2_); - assert(s2 == s1_); -} - -int main() -{ - typedef std::string S; - test(S(""), S("")); - test(S(""), S("12345")); - test(S(""), S("1234567890")); - test(S(""), S("12345678901234567890")); - test(S("abcde"), S("")); - test(S("abcde"), S("12345")); - test(S("abcde"), S("1234567890")); - test(S("abcde"), S("12345678901234567890")); - test(S("abcdefghij"), S("")); - test(S("abcdefghij"), S("12345")); - test(S("abcdefghij"), S("1234567890")); - test(S("abcdefghij"), S("12345678901234567890")); - test(S("abcdefghijklmnopqrst"), S("")); - test(S("abcdefghijklmnopqrst"), S("12345")); - test(S("abcdefghijklmnopqrst"), S("1234567890")); - test(S("abcdefghijklmnopqrst"), S("12345678901234567890")); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp deleted file mode 100644 index 01767e48e84e..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// void swap(basic_string& c) -// noexcept(!allocator_type::propagate_on_container_swap::value || -// __is_nothrow_swappable<allocator_type>::value); - -// This tests a conforming extension - -#include <string> -#include <cassert> - -#include "../../test_allocator.h" - -template <class T> -struct some_alloc -{ - typedef T value_type; - - some_alloc() {} - some_alloc(const some_alloc&); - void deallocate(void*, unsigned) {} - - typedef std::true_type propagate_on_container_swap; -}; - -int main() -{ -#if __has_feature(cxx_noexcept) - { - typedef std::string C; - C c1, c2; - static_assert(noexcept(swap(c1, c2)), ""); - } - { - typedef std::basic_string<char, std::char_traits<char>, test_allocator<char>> C; - C c1, c2; - static_assert(noexcept(swap(c1, c2)), ""); - } - { - typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C; - C c1, c2; - static_assert(!noexcept(swap(c1, c2)), ""); - } -#endif -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp deleted file mode 100644 index 7c5fb30b0429..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator!=(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const typename S::value_type* lhs, const S& rhs, bool x) -{ - assert((lhs != rhs) == x); -} - -typedef std::string S; - -int main() -{ - test("", S(""), false); - test("", S("abcde"), true); - test("", S("abcdefghij"), true); - test("", S("abcdefghijklmnopqrst"), true); - test("abcde", S(""), true); - test("abcde", S("abcde"), false); - test("abcde", S("abcdefghij"), true); - test("abcde", S("abcdefghijklmnopqrst"), true); - test("abcdefghij", S(""), true); - test("abcdefghij", S("abcde"), true); - test("abcdefghij", S("abcdefghij"), false); - test("abcdefghij", S("abcdefghijklmnopqrst"), true); - test("abcdefghijklmnopqrst", S(""), true); - test("abcdefghijklmnopqrst", S("abcde"), true); - test("abcdefghijklmnopqrst", S("abcdefghij"), true); - test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp deleted file mode 100644 index 8fcc0c5533d2..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator!=(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const typename S::value_type* rhs, bool x) -{ - assert((lhs != rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), "", false); - test(S(""), "abcde", true); - test(S(""), "abcdefghij", true); - test(S(""), "abcdefghijklmnopqrst", true); - test(S("abcde"), "", true); - test(S("abcde"), "abcde", false); - test(S("abcde"), "abcdefghij", true); - test(S("abcde"), "abcdefghijklmnopqrst", true); - test(S("abcdefghij"), "", true); - test(S("abcdefghij"), "abcde", true); - test(S("abcdefghij"), "abcdefghij", false); - test(S("abcdefghij"), "abcdefghijklmnopqrst", true); - test(S("abcdefghijklmnopqrst"), "", true); - test(S("abcdefghijklmnopqrst"), "abcde", true); - test(S("abcdefghijklmnopqrst"), "abcdefghij", true); - test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp deleted file mode 100644 index 186399721e84..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator!=(const basic_string<charT,traits,Allocator>& lhs, -// const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const S& rhs, bool x) -{ - assert((lhs != rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), S(""), false); - test(S(""), S("abcde"), true); - test(S(""), S("abcdefghij"), true); - test(S(""), S("abcdefghijklmnopqrst"), true); - test(S("abcde"), S(""), true); - test(S("abcde"), S("abcde"), false); - test(S("abcde"), S("abcdefghij"), true); - test(S("abcde"), S("abcdefghijklmnopqrst"), true); - test(S("abcdefghij"), S(""), true); - test(S("abcdefghij"), S("abcde"), true); - test(S("abcdefghij"), S("abcdefghij"), false); - test(S("abcdefghij"), S("abcdefghijklmnopqrst"), true); - test(S("abcdefghijklmnopqrst"), S(""), true); - test(S("abcdefghijklmnopqrst"), S("abcde"), true); - test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true); - test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp deleted file mode 100644 index 65662f0db587..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator> -// operator+(charT lhs, const basic_string<charT,traits,Allocator>& rhs); - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator>&& -// operator+(charT lhs, basic_string<charT,traits,Allocator>&& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test0(typename S::value_type lhs, const S& rhs, const S& x) -{ - assert(lhs + rhs == x); -} - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template <class S> -void -test1(typename S::value_type lhs, S&& rhs, const S& x) -{ - assert(lhs + move(rhs) == x); -} - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -typedef std::string S; - -int main() -{ - test0('a', S(""), S("a")); - test0('a', S("12345"), S("a12345")); - test0('a', S("1234567890"), S("a1234567890")); - test0('a', S("12345678901234567890"), S("a12345678901234567890")); - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - - test1('a', S(""), S("a")); - test1('a', S("12345"), S("a12345")); - test1('a', S("1234567890"), S("a1234567890")); - test1('a', S("12345678901234567890"), S("a12345678901234567890")); - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp deleted file mode 100644 index 00d12d4b8661..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp +++ /dev/null @@ -1,82 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator> -// operator+(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs); - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator>&& -// operator+(const charT* lhs, basic_string<charT,traits,Allocator>&& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test0(const typename S::value_type* lhs, const S& rhs, const S& x) -{ - assert(lhs + rhs == x); -} - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template <class S> -void -test1(const typename S::value_type* lhs, S&& rhs, const S& x) -{ - assert(lhs + move(rhs) == x); -} - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -typedef std::string S; - -int main() -{ - test0("", S(""), S("")); - test0("", S("12345"), S("12345")); - test0("", S("1234567890"), S("1234567890")); - test0("", S("12345678901234567890"), S("12345678901234567890")); - test0("abcde", S(""), S("abcde")); - test0("abcde", S("12345"), S("abcde12345")); - test0("abcde", S("1234567890"), S("abcde1234567890")); - test0("abcde", S("12345678901234567890"), S("abcde12345678901234567890")); - test0("abcdefghij", S(""), S("abcdefghij")); - test0("abcdefghij", S("12345"), S("abcdefghij12345")); - test0("abcdefghij", S("1234567890"), S("abcdefghij1234567890")); - test0("abcdefghij", S("12345678901234567890"), S("abcdefghij12345678901234567890")); - test0("abcdefghijklmnopqrst", S(""), S("abcdefghijklmnopqrst")); - test0("abcdefghijklmnopqrst", S("12345"), S("abcdefghijklmnopqrst12345")); - test0("abcdefghijklmnopqrst", S("1234567890"), S("abcdefghijklmnopqrst1234567890")); - test0("abcdefghijklmnopqrst", S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - - test1("", S(""), S("")); - test1("", S("12345"), S("12345")); - test1("", S("1234567890"), S("1234567890")); - test1("", S("12345678901234567890"), S("12345678901234567890")); - test1("abcde", S(""), S("abcde")); - test1("abcde", S("12345"), S("abcde12345")); - test1("abcde", S("1234567890"), S("abcde1234567890")); - test1("abcde", S("12345678901234567890"), S("abcde12345678901234567890")); - test1("abcdefghij", S(""), S("abcdefghij")); - test1("abcdefghij", S("12345"), S("abcdefghij12345")); - test1("abcdefghij", S("1234567890"), S("abcdefghij1234567890")); - test1("abcdefghij", S("12345678901234567890"), S("abcdefghij12345678901234567890")); - test1("abcdefghijklmnopqrst", S(""), S("abcdefghijklmnopqrst")); - test1("abcdefghijklmnopqrst", S("12345"), S("abcdefghijklmnopqrst12345")); - test1("abcdefghijklmnopqrst", S("1234567890"), S("abcdefghijklmnopqrst1234567890")); - test1("abcdefghijklmnopqrst", S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp deleted file mode 100644 index 6136d55566cf..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator> -// operator+(const basic_string<charT,traits,Allocator>& lhs, charT rhs); - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator>&& -// operator+(basic_string<charT,traits,Allocator>&& lhs, charT rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test0(const S& lhs, typename S::value_type rhs, const S& x) -{ - assert(lhs + rhs == x); -} - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template <class S> -void -test1(S&& lhs, typename S::value_type rhs, const S& x) -{ - assert(move(lhs) + rhs == x); -} - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -typedef std::string S; - -int main() -{ - test0(S(""), '1', S("1")); - test0(S("abcde"), '1', S("abcde1")); - test0(S("abcdefghij"), '1', S("abcdefghij1")); - test0(S("abcdefghijklmnopqrst"), '1', S("abcdefghijklmnopqrst1")); - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - - test1(S(""), '1', S("1")); - test1(S("abcde"), '1', S("abcde1")); - test1(S("abcdefghij"), '1', S("abcdefghij1")); - test1(S("abcdefghijklmnopqrst"), '1', S("abcdefghijklmnopqrst1")); - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp deleted file mode 100644 index db8f4d685728..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp +++ /dev/null @@ -1,82 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator> -// operator+(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs); - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator>&& -// operator+(basic_string<charT,traits,Allocator>&& lhs, const charT* rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test0(const S& lhs, const typename S::value_type* rhs, const S& x) -{ - assert(lhs + rhs == x); -} - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template <class S> -void -test1(S&& lhs, const typename S::value_type* rhs, const S& x) -{ - assert(move(lhs) + rhs == x); -} - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -typedef std::string S; - -int main() -{ - test0(S(""), "", S("")); - test0(S(""), "12345", S("12345")); - test0(S(""), "1234567890", S("1234567890")); - test0(S(""), "12345678901234567890", S("12345678901234567890")); - test0(S("abcde"), "", S("abcde")); - test0(S("abcde"), "12345", S("abcde12345")); - test0(S("abcde"), "1234567890", S("abcde1234567890")); - test0(S("abcde"), "12345678901234567890", S("abcde12345678901234567890")); - test0(S("abcdefghij"), "", S("abcdefghij")); - test0(S("abcdefghij"), "12345", S("abcdefghij12345")); - test0(S("abcdefghij"), "1234567890", S("abcdefghij1234567890")); - test0(S("abcdefghij"), "12345678901234567890", S("abcdefghij12345678901234567890")); - test0(S("abcdefghijklmnopqrst"), "", S("abcdefghijklmnopqrst")); - test0(S("abcdefghijklmnopqrst"), "12345", S("abcdefghijklmnopqrst12345")); - test0(S("abcdefghijklmnopqrst"), "1234567890", S("abcdefghijklmnopqrst1234567890")); - test0(S("abcdefghijklmnopqrst"), "12345678901234567890", S("abcdefghijklmnopqrst12345678901234567890")); - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - - test1(S(""), "", S("")); - test1(S(""), "12345", S("12345")); - test1(S(""), "1234567890", S("1234567890")); - test1(S(""), "12345678901234567890", S("12345678901234567890")); - test1(S("abcde"), "", S("abcde")); - test1(S("abcde"), "12345", S("abcde12345")); - test1(S("abcde"), "1234567890", S("abcde1234567890")); - test1(S("abcde"), "12345678901234567890", S("abcde12345678901234567890")); - test1(S("abcdefghij"), "", S("abcdefghij")); - test1(S("abcdefghij"), "12345", S("abcdefghij12345")); - test1(S("abcdefghij"), "1234567890", S("abcdefghij1234567890")); - test1(S("abcdefghij"), "12345678901234567890", S("abcdefghij12345678901234567890")); - test1(S("abcdefghijklmnopqrst"), "", S("abcdefghijklmnopqrst")); - test1(S("abcdefghijklmnopqrst"), "12345", S("abcdefghijklmnopqrst12345")); - test1(S("abcdefghijklmnopqrst"), "1234567890", S("abcdefghijklmnopqrst1234567890")); - test1(S("abcdefghijklmnopqrst"), "12345678901234567890", S("abcdefghijklmnopqrst12345678901234567890")); - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp deleted file mode 100644 index 1ffcf922edf5..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp +++ /dev/null @@ -1,142 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator> -// operator+(const basic_string<charT,traits,Allocator>& lhs, -// const basic_string<charT,traits,Allocator>& rhs); - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator>&& -// operator+(const basic_string<charT,traits,Allocator>&& lhs, -// const basic_string<charT,traits,Allocator>& rhs); - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator>&& -// operator+(const basic_string<charT,traits,Allocator>& lhs, -// const basic_string<charT,traits,Allocator>&& rhs); - -// template<class charT, class traits, class Allocator> -// basic_string<charT,traits,Allocator>&& -// operator+(const basic_string<charT,traits,Allocator>&& lhs, -// const basic_string<charT,traits,Allocator>&& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test0(const S& lhs, const S& rhs, const S& x) -{ - assert(lhs + rhs == x); -} - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template <class S> -void -test1(S&& lhs, const S& rhs, const S& x) -{ - assert(move(lhs) + rhs == x); -} - -template <class S> -void -test2(const S& lhs, S&& rhs, const S& x) -{ - assert(lhs + move(rhs) == x); -} - -template <class S> -void -test3(S&& lhs, S&& rhs, const S& x) -{ - assert(move(lhs) + move(rhs) == x); -} - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -typedef std::string S; - -int main() -{ - test0(S(""), S(""), S("")); - test0(S(""), S("12345"), S("12345")); - test0(S(""), S("1234567890"), S("1234567890")); - test0(S(""), S("12345678901234567890"), S("12345678901234567890")); - test0(S("abcde"), S(""), S("abcde")); - test0(S("abcde"), S("12345"), S("abcde12345")); - test0(S("abcde"), S("1234567890"), S("abcde1234567890")); - test0(S("abcde"), S("12345678901234567890"), S("abcde12345678901234567890")); - test0(S("abcdefghij"), S(""), S("abcdefghij")); - test0(S("abcdefghij"), S("12345"), S("abcdefghij12345")); - test0(S("abcdefghij"), S("1234567890"), S("abcdefghij1234567890")); - test0(S("abcdefghij"), S("12345678901234567890"), S("abcdefghij12345678901234567890")); - test0(S("abcdefghijklmnopqrst"), S(""), S("abcdefghijklmnopqrst")); - test0(S("abcdefghijklmnopqrst"), S("12345"), S("abcdefghijklmnopqrst12345")); - test0(S("abcdefghijklmnopqrst"), S("1234567890"), S("abcdefghijklmnopqrst1234567890")); - test0(S("abcdefghijklmnopqrst"), S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - - test1(S(""), S(""), S("")); - test1(S(""), S("12345"), S("12345")); - test1(S(""), S("1234567890"), S("1234567890")); - test1(S(""), S("12345678901234567890"), S("12345678901234567890")); - test1(S("abcde"), S(""), S("abcde")); - test1(S("abcde"), S("12345"), S("abcde12345")); - test1(S("abcde"), S("1234567890"), S("abcde1234567890")); - test1(S("abcde"), S("12345678901234567890"), S("abcde12345678901234567890")); - test1(S("abcdefghij"), S(""), S("abcdefghij")); - test1(S("abcdefghij"), S("12345"), S("abcdefghij12345")); - test1(S("abcdefghij"), S("1234567890"), S("abcdefghij1234567890")); - test1(S("abcdefghij"), S("12345678901234567890"), S("abcdefghij12345678901234567890")); - test1(S("abcdefghijklmnopqrst"), S(""), S("abcdefghijklmnopqrst")); - test1(S("abcdefghijklmnopqrst"), S("12345"), S("abcdefghijklmnopqrst12345")); - test1(S("abcdefghijklmnopqrst"), S("1234567890"), S("abcdefghijklmnopqrst1234567890")); - test1(S("abcdefghijklmnopqrst"), S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); - - test2(S(""), S(""), S("")); - test2(S(""), S("12345"), S("12345")); - test2(S(""), S("1234567890"), S("1234567890")); - test2(S(""), S("12345678901234567890"), S("12345678901234567890")); - test2(S("abcde"), S(""), S("abcde")); - test2(S("abcde"), S("12345"), S("abcde12345")); - test2(S("abcde"), S("1234567890"), S("abcde1234567890")); - test2(S("abcde"), S("12345678901234567890"), S("abcde12345678901234567890")); - test2(S("abcdefghij"), S(""), S("abcdefghij")); - test2(S("abcdefghij"), S("12345"), S("abcdefghij12345")); - test2(S("abcdefghij"), S("1234567890"), S("abcdefghij1234567890")); - test2(S("abcdefghij"), S("12345678901234567890"), S("abcdefghij12345678901234567890")); - test2(S("abcdefghijklmnopqrst"), S(""), S("abcdefghijklmnopqrst")); - test2(S("abcdefghijklmnopqrst"), S("12345"), S("abcdefghijklmnopqrst12345")); - test2(S("abcdefghijklmnopqrst"), S("1234567890"), S("abcdefghijklmnopqrst1234567890")); - test2(S("abcdefghijklmnopqrst"), S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); - - test3(S(""), S(""), S("")); - test3(S(""), S("12345"), S("12345")); - test3(S(""), S("1234567890"), S("1234567890")); - test3(S(""), S("12345678901234567890"), S("12345678901234567890")); - test3(S("abcde"), S(""), S("abcde")); - test3(S("abcde"), S("12345"), S("abcde12345")); - test3(S("abcde"), S("1234567890"), S("abcde1234567890")); - test3(S("abcde"), S("12345678901234567890"), S("abcde12345678901234567890")); - test3(S("abcdefghij"), S(""), S("abcdefghij")); - test3(S("abcdefghij"), S("12345"), S("abcdefghij12345")); - test3(S("abcdefghij"), S("1234567890"), S("abcdefghij1234567890")); - test3(S("abcdefghij"), S("12345678901234567890"), S("abcdefghij12345678901234567890")); - test3(S("abcdefghijklmnopqrst"), S(""), S("abcdefghijklmnopqrst")); - test3(S("abcdefghijklmnopqrst"), S("12345"), S("abcdefghijklmnopqrst12345")); - test3(S("abcdefghijklmnopqrst"), S("1234567890"), S("abcdefghijklmnopqrst1234567890")); - test3(S("abcdefghijklmnopqrst"), S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp deleted file mode 100644 index 249cd45e70b5..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator==(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const typename S::value_type* lhs, const S& rhs, bool x) -{ - assert((lhs == rhs) == x); -} - -typedef std::string S; - -int main() -{ - test("", S(""), true); - test("", S("abcde"), false); - test("", S("abcdefghij"), false); - test("", S("abcdefghijklmnopqrst"), false); - test("abcde", S(""), false); - test("abcde", S("abcde"), true); - test("abcde", S("abcdefghij"), false); - test("abcde", S("abcdefghijklmnopqrst"), false); - test("abcdefghij", S(""), false); - test("abcdefghij", S("abcde"), false); - test("abcdefghij", S("abcdefghij"), true); - test("abcdefghij", S("abcdefghijklmnopqrst"), false); - test("abcdefghijklmnopqrst", S(""), false); - test("abcdefghijklmnopqrst", S("abcde"), false); - test("abcdefghijklmnopqrst", S("abcdefghij"), false); - test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp deleted file mode 100644 index 94039ff6b03c..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator==(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const typename S::value_type* rhs, bool x) -{ - assert((lhs == rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), "", true); - test(S(""), "abcde", false); - test(S(""), "abcdefghij", false); - test(S(""), "abcdefghijklmnopqrst", false); - test(S("abcde"), "", false); - test(S("abcde"), "abcde", true); - test(S("abcde"), "abcdefghij", false); - test(S("abcde"), "abcdefghijklmnopqrst", false); - test(S("abcdefghij"), "", false); - test(S("abcdefghij"), "abcde", false); - test(S("abcdefghij"), "abcdefghij", true); - test(S("abcdefghij"), "abcdefghijklmnopqrst", false); - test(S("abcdefghijklmnopqrst"), "", false); - test(S("abcdefghijklmnopqrst"), "abcde", false); - test(S("abcdefghijklmnopqrst"), "abcdefghij", false); - test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp deleted file mode 100644 index ed9df5a34c77..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator==(const basic_string<charT,traits,Allocator>& lhs, -// const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const S& rhs, bool x) -{ - assert((lhs == rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), S(""), true); - test(S(""), S("abcde"), false); - test(S(""), S("abcdefghij"), false); - test(S(""), S("abcdefghijklmnopqrst"), false); - test(S("abcde"), S(""), false); - test(S("abcde"), S("abcde"), true); - test(S("abcde"), S("abcdefghij"), false); - test(S("abcde"), S("abcdefghijklmnopqrst"), false); - test(S("abcdefghij"), S(""), false); - test(S("abcdefghij"), S("abcde"), false); - test(S("abcdefghij"), S("abcdefghij"), true); - test(S("abcdefghij"), S("abcdefghijklmnopqrst"), false); - test(S("abcdefghijklmnopqrst"), S(""), false); - test(S("abcdefghijklmnopqrst"), S("abcde"), false); - test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); - test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp deleted file mode 100644 index 32b4de40a31a..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator>(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const typename S::value_type* lhs, const S& rhs, bool x) -{ - assert((lhs > rhs) == x); -} - -typedef std::string S; - -int main() -{ - test("", S(""), false); - test("", S("abcde"), false); - test("", S("abcdefghij"), false); - test("", S("abcdefghijklmnopqrst"), false); - test("abcde", S(""), true); - test("abcde", S("abcde"), false); - test("abcde", S("abcdefghij"), false); - test("abcde", S("abcdefghijklmnopqrst"), false); - test("abcdefghij", S(""), true); - test("abcdefghij", S("abcde"), true); - test("abcdefghij", S("abcdefghij"), false); - test("abcdefghij", S("abcdefghijklmnopqrst"), false); - test("abcdefghijklmnopqrst", S(""), true); - test("abcdefghijklmnopqrst", S("abcde"), true); - test("abcdefghijklmnopqrst", S("abcdefghij"), true); - test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp deleted file mode 100644 index c216a43f03b2..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator>(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const typename S::value_type* rhs, bool x) -{ - assert((lhs > rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), "", false); - test(S(""), "abcde", false); - test(S(""), "abcdefghij", false); - test(S(""), "abcdefghijklmnopqrst", false); - test(S("abcde"), "", true); - test(S("abcde"), "abcde", false); - test(S("abcde"), "abcdefghij", false); - test(S("abcde"), "abcdefghijklmnopqrst", false); - test(S("abcdefghij"), "", true); - test(S("abcdefghij"), "abcde", true); - test(S("abcdefghij"), "abcdefghij", false); - test(S("abcdefghij"), "abcdefghijklmnopqrst", false); - test(S("abcdefghijklmnopqrst"), "", true); - test(S("abcdefghijklmnopqrst"), "abcde", true); - test(S("abcdefghijklmnopqrst"), "abcdefghij", true); - test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp deleted file mode 100644 index 88e83b3a5bc0..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator>(const basic_string<charT,traits,Allocator>& lhs, -// const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const S& rhs, bool x) -{ - assert((lhs > rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), S(""), false); - test(S(""), S("abcde"), false); - test(S(""), S("abcdefghij"), false); - test(S(""), S("abcdefghijklmnopqrst"), false); - test(S("abcde"), S(""), true); - test(S("abcde"), S("abcde"), false); - test(S("abcde"), S("abcdefghij"), false); - test(S("abcde"), S("abcdefghijklmnopqrst"), false); - test(S("abcdefghij"), S(""), true); - test(S("abcdefghij"), S("abcde"), true); - test(S("abcdefghij"), S("abcdefghij"), false); - test(S("abcdefghij"), S("abcdefghijklmnopqrst"), false); - test(S("abcdefghijklmnopqrst"), S(""), true); - test(S("abcdefghijklmnopqrst"), S("abcde"), true); - test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true); - test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp deleted file mode 100644 index 6e6208bb488d..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator>=(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const typename S::value_type* lhs, const S& rhs, bool x) -{ - assert((lhs >= rhs) == x); -} - -typedef std::string S; - -int main() -{ - test("", S(""), true); - test("", S("abcde"), false); - test("", S("abcdefghij"), false); - test("", S("abcdefghijklmnopqrst"), false); - test("abcde", S(""), true); - test("abcde", S("abcde"), true); - test("abcde", S("abcdefghij"), false); - test("abcde", S("abcdefghijklmnopqrst"), false); - test("abcdefghij", S(""), true); - test("abcdefghij", S("abcde"), true); - test("abcdefghij", S("abcdefghij"), true); - test("abcdefghij", S("abcdefghijklmnopqrst"), false); - test("abcdefghijklmnopqrst", S(""), true); - test("abcdefghijklmnopqrst", S("abcde"), true); - test("abcdefghijklmnopqrst", S("abcdefghij"), true); - test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp deleted file mode 100644 index 9a496f7f5cf8..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator>=(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const typename S::value_type* rhs, bool x) -{ - assert((lhs >= rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), "", true); - test(S(""), "abcde", false); - test(S(""), "abcdefghij", false); - test(S(""), "abcdefghijklmnopqrst", false); - test(S("abcde"), "", true); - test(S("abcde"), "abcde", true); - test(S("abcde"), "abcdefghij", false); - test(S("abcde"), "abcdefghijklmnopqrst", false); - test(S("abcdefghij"), "", true); - test(S("abcdefghij"), "abcde", true); - test(S("abcdefghij"), "abcdefghij", true); - test(S("abcdefghij"), "abcdefghijklmnopqrst", false); - test(S("abcdefghijklmnopqrst"), "", true); - test(S("abcdefghijklmnopqrst"), "abcde", true); - test(S("abcdefghijklmnopqrst"), "abcdefghij", true); - test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp deleted file mode 100644 index c6bb659e5ab2..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator>=(const basic_string<charT,traits,Allocator>& lhs, -// const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const S& rhs, bool x) -{ - assert((lhs >= rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), S(""), true); - test(S(""), S("abcde"), false); - test(S(""), S("abcdefghij"), false); - test(S(""), S("abcdefghijklmnopqrst"), false); - test(S("abcde"), S(""), true); - test(S("abcde"), S("abcde"), true); - test(S("abcde"), S("abcdefghij"), false); - test(S("abcde"), S("abcdefghijklmnopqrst"), false); - test(S("abcdefghij"), S(""), true); - test(S("abcdefghij"), S("abcde"), true); - test(S("abcdefghij"), S("abcdefghij"), true); - test(S("abcdefghij"), S("abcdefghijklmnopqrst"), false); - test(S("abcdefghijklmnopqrst"), S(""), true); - test(S("abcdefghijklmnopqrst"), S("abcde"), true); - test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true); - test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp deleted file mode 100644 index 8c6270e02117..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator<(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const typename S::value_type* lhs, const S& rhs, bool x) -{ - assert((lhs < rhs) == x); -} - -typedef std::string S; - -int main() -{ - test("", S(""), false); - test("", S("abcde"), true); - test("", S("abcdefghij"), true); - test("", S("abcdefghijklmnopqrst"), true); - test("abcde", S(""), false); - test("abcde", S("abcde"), false); - test("abcde", S("abcdefghij"), true); - test("abcde", S("abcdefghijklmnopqrst"), true); - test("abcdefghij", S(""), false); - test("abcdefghij", S("abcde"), false); - test("abcdefghij", S("abcdefghij"), false); - test("abcdefghij", S("abcdefghijklmnopqrst"), true); - test("abcdefghijklmnopqrst", S(""), false); - test("abcdefghijklmnopqrst", S("abcde"), false); - test("abcdefghijklmnopqrst", S("abcdefghij"), false); - test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp deleted file mode 100644 index 9791d914ff9c..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator<(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const typename S::value_type* rhs, bool x) -{ - assert((lhs < rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), "", false); - test(S(""), "abcde", true); - test(S(""), "abcdefghij", true); - test(S(""), "abcdefghijklmnopqrst", true); - test(S("abcde"), "", false); - test(S("abcde"), "abcde", false); - test(S("abcde"), "abcdefghij", true); - test(S("abcde"), "abcdefghijklmnopqrst", true); - test(S("abcdefghij"), "", false); - test(S("abcdefghij"), "abcde", false); - test(S("abcdefghij"), "abcdefghij", false); - test(S("abcdefghij"), "abcdefghijklmnopqrst", true); - test(S("abcdefghijklmnopqrst"), "", false); - test(S("abcdefghijklmnopqrst"), "abcde", false); - test(S("abcdefghijklmnopqrst"), "abcdefghij", false); - test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp deleted file mode 100644 index 726f70bb563b..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator<(const basic_string<charT,traits,Allocator>& lhs, -// const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const S& rhs, bool x) -{ - assert((lhs < rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), S(""), false); - test(S(""), S("abcde"), true); - test(S(""), S("abcdefghij"), true); - test(S(""), S("abcdefghijklmnopqrst"), true); - test(S("abcde"), S(""), false); - test(S("abcde"), S("abcde"), false); - test(S("abcde"), S("abcdefghij"), true); - test(S("abcde"), S("abcdefghijklmnopqrst"), true); - test(S("abcdefghij"), S(""), false); - test(S("abcdefghij"), S("abcde"), false); - test(S("abcdefghij"), S("abcdefghij"), false); - test(S("abcdefghij"), S("abcdefghijklmnopqrst"), true); - test(S("abcdefghijklmnopqrst"), S(""), false); - test(S("abcdefghijklmnopqrst"), S("abcde"), false); - test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); - test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp deleted file mode 100644 index d206bf308bf3..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator<=(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const typename S::value_type* lhs, const S& rhs, bool x) -{ - assert((lhs <= rhs) == x); -} - -typedef std::string S; - -int main() -{ - test("", S(""), true); - test("", S("abcde"), true); - test("", S("abcdefghij"), true); - test("", S("abcdefghijklmnopqrst"), true); - test("abcde", S(""), false); - test("abcde", S("abcde"), true); - test("abcde", S("abcdefghij"), true); - test("abcde", S("abcdefghijklmnopqrst"), true); - test("abcdefghij", S(""), false); - test("abcdefghij", S("abcde"), false); - test("abcdefghij", S("abcdefghij"), true); - test("abcdefghij", S("abcdefghijklmnopqrst"), true); - test("abcdefghijklmnopqrst", S(""), false); - test("abcdefghijklmnopqrst", S("abcde"), false); - test("abcdefghijklmnopqrst", S("abcdefghij"), false); - test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp deleted file mode 100644 index aad4694dcc69..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator<=(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const typename S::value_type* rhs, bool x) -{ - assert((lhs <= rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), "", true); - test(S(""), "abcde", true); - test(S(""), "abcdefghij", true); - test(S(""), "abcdefghijklmnopqrst", true); - test(S("abcde"), "", false); - test(S("abcde"), "abcde", true); - test(S("abcde"), "abcdefghij", true); - test(S("abcde"), "abcdefghijklmnopqrst", true); - test(S("abcdefghij"), "", false); - test(S("abcdefghij"), "abcde", false); - test(S("abcdefghij"), "abcdefghij", true); - test(S("abcdefghij"), "abcdefghijklmnopqrst", true); - test(S("abcdefghijklmnopqrst"), "", false); - test(S("abcdefghijklmnopqrst"), "abcde", false); - test(S("abcdefghijklmnopqrst"), "abcdefghij", false); - test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); -} diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp deleted file mode 100644 index 470878af6176..000000000000 --- a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <string> - -// template<class charT, class traits, class Allocator> -// bool operator<=(const basic_string<charT,traits,Allocator>& lhs, -// const basic_string<charT,traits,Allocator>& rhs); - -#include <string> -#include <cassert> - -template <class S> -void -test(const S& lhs, const S& rhs, bool x) -{ - assert((lhs <= rhs) == x); -} - -typedef std::string S; - -int main() -{ - test(S(""), S(""), true); - test(S(""), S("abcde"), true); - test(S(""), S("abcdefghij"), true); - test(S(""), S("abcdefghijklmnopqrst"), true); - test(S("abcde"), S(""), false); - test(S("abcde"), S("abcde"), true); - test(S("abcde"), S("abcdefghij"), true); - test(S("abcde"), S("abcdefghijklmnopqrst"), true); - test(S("abcdefghij"), S(""), false); - test(S("abcdefghij"), S("abcde"), false); - test(S("abcdefghij"), S("abcdefghij"), true); - test(S("abcdefghij"), S("abcdefghijklmnopqrst"), true); - test(S("abcdefghijklmnopqrst"), S(""), false); - test(S("abcdefghijklmnopqrst"), S("abcde"), false); - test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); - test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); -} |
