diff options
Diffstat (limited to 'libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal')
4 files changed, 0 insertions, 158 deletions
diff --git a/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp b/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp deleted file mode 100644 index 8c27f3b812bb..000000000000 --- a/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp +++ /dev/null @@ -1,33 +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> - -// basic_string<charT,traits,Allocator>& operator+=(charT c); - -#include <string> -#include <cassert> - -template <class S> -void -test(S s, typename S::value_type str, S expected) -{ - s += str; - assert(s.__invariants()); - assert(s == expected); -} - -int main() -{ - typedef std::string S; - test(S(), 'a', S("a")); - test(S("12345"), 'a', S("12345a")); - test(S("1234567890"), 'a', S("1234567890a")); - test(S("12345678901234567890"), 'a', S("12345678901234567890a")); -} diff --git a/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp b/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp deleted file mode 100644 index cc3a48800632..000000000000 --- a/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp +++ /dev/null @@ -1,26 +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> - -// basic_string& operator+=(initializer_list<charT> il); - -#include <string> -#include <cassert> - -int main() -{ -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS - { - std::string s("123"); - s += {'a', 'b', 'c'}; - assert(s == "123abc"); - } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS -} diff --git a/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp b/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp deleted file mode 100644 index 8760a48121f0..000000000000 --- a/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.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> - -// basic_string<charT,traits,Allocator>& operator+=(const charT* s); - -#include <string> -#include <cassert> - -template <class S> -void -test(S s, const typename S::value_type* str, S expected) -{ - s += str; - assert(s.__invariants()); - assert(s == expected); -} - -int main() -{ - typedef std::string S; - test(S(), "", S()); - test(S(), "12345", S("12345")); - test(S(), "1234567890", S("1234567890")); - test(S(), "12345678901234567890", S("12345678901234567890")); - - test(S("12345"), "", S("12345")); - test(S("12345"), "12345", S("1234512345")); - test(S("12345"), "1234567890", S("123451234567890")); - test(S("12345"), "12345678901234567890", S("1234512345678901234567890")); - - test(S("1234567890"), "", S("1234567890")); - test(S("1234567890"), "12345", S("123456789012345")); - test(S("1234567890"), "1234567890", S("12345678901234567890")); - test(S("1234567890"), "12345678901234567890", S("123456789012345678901234567890")); - - test(S("12345678901234567890"), "", S("12345678901234567890")); - test(S("12345678901234567890"), "12345", S("1234567890123456789012345")); - test(S("12345678901234567890"), "1234567890", S("123456789012345678901234567890")); - test(S("12345678901234567890"), "12345678901234567890", - S("1234567890123456789012345678901234567890")); -} diff --git a/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp b/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp deleted file mode 100644 index e5f5fa2b7fcd..000000000000 --- a/libcxx/test/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp +++ /dev/null @@ -1,50 +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> - -// basic_string<charT,traits,Allocator>& -// operator+=(const basic_string<charT,traits,Allocator>& str); - -#include <string> -#include <cassert> - -template <class S> -void -test(S s, S str, S expected) -{ - s += str; - assert(s.__invariants()); - assert(s == expected); -} - -int main() -{ - typedef std::string S; - test(S(), S(), S()); - test(S(), S("12345"), S("12345")); - test(S(), S("1234567890"), S("1234567890")); - test(S(), S("12345678901234567890"), S("12345678901234567890")); - - test(S("12345"), S(), S("12345")); - test(S("12345"), S("12345"), S("1234512345")); - test(S("12345"), S("1234567890"), S("123451234567890")); - test(S("12345"), S("12345678901234567890"), S("1234512345678901234567890")); - - test(S("1234567890"), S(), S("1234567890")); - test(S("1234567890"), S("12345"), S("123456789012345")); - test(S("1234567890"), S("1234567890"), S("12345678901234567890")); - test(S("1234567890"), S("12345678901234567890"), S("123456789012345678901234567890")); - - test(S("12345678901234567890"), S(), S("12345678901234567890")); - test(S("12345678901234567890"), S("12345"), S("1234567890123456789012345")); - test(S("12345678901234567890"), S("1234567890"), S("123456789012345678901234567890")); - test(S("12345678901234567890"), S("12345678901234567890"), - S("1234567890123456789012345678901234567890")); -} |
