aboutsummaryrefslogtreecommitdiff
path: root/test/std/strings/basic.string/string.nonmembers/string_operator==
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 18:01:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 18:01:01 +0000
commitb7332b04df5d50c92640c74cfeb138ecb7e3f7ae (patch)
treeb1b49faa0cab1482905e0cda6f0ee5d97e3fe08f /test/std/strings/basic.string/string.nonmembers/string_operator==
parent6012fe9abb1f01b1b5b4ca908464804c21ff8602 (diff)
Notes
Diffstat (limited to 'test/std/strings/basic.string/string.nonmembers/string_operator==')
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp69
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp69
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp70
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp70
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp70
5 files changed, 0 insertions, 348 deletions
diff --git a/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp
deleted file mode 100644
index 19dd8bfbd92e..000000000000
--- a/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp
+++ /dev/null
@@ -1,69 +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>
-
-#include "min_allocator.h"
-
-template <class S>
-void
-test(const typename S::value_type* lhs, const S& rhs, bool x)
-{
- assert((lhs == rhs) == x);
-}
-
-int main()
-{
- {
- typedef std::string S;
- 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);
- }
-#if TEST_STD_VER >= 11
- {
- typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
- 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);
- }
-#endif
-}
diff --git a/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp
deleted file mode 100644
index f6e3ddec46e2..000000000000
--- a/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp
+++ /dev/null
@@ -1,69 +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>
-
-#include "min_allocator.h"
-
-template <class S>
-void
-test(const S& lhs, const typename S::value_type* rhs, bool x)
-{
- assert((lhs == rhs) == x);
-}
-
-int main()
-{
- {
- typedef std::string S;
- 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);
- }
-#if TEST_STD_VER >= 11
- {
- typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
- 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);
- }
-#endif
-}
diff --git a/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp
deleted file mode 100644
index c1d57b0bcc8b..000000000000
--- a/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp
+++ /dev/null
@@ -1,70 +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>
-
-#include "min_allocator.h"
-
-template <class S>
-void
-test(const S& lhs, const S& rhs, bool x)
-{
- assert((lhs == rhs) == x);
-}
-
-int main()
-{
- {
- typedef std::string S;
- 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);
- }
-#if TEST_STD_VER >= 11
- {
- typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
- 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);
- }
-#endif
-}
diff --git a/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp
deleted file mode 100644
index dec8f6f5af80..000000000000
--- a/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp
+++ /dev/null
@@ -1,70 +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>
-
-// we get this comparison "for free" because the string implicitly converts to the string_view
-
-#include <string>
-#include <cassert>
-
-#include "min_allocator.h"
-
-template <class S, class SV>
-void
-test(const S& lhs, SV rhs, bool x)
-{
- assert((lhs == rhs) == x);
-}
-
-int main()
-{
- {
- typedef std::string S;
- typedef std::string_view SV;
- test(S(""), SV(""), true);
- test(S(""), SV("abcde"), false);
- test(S(""), SV("abcdefghij"), false);
- test(S(""), SV("abcdefghijklmnopqrst"), false);
- test(S("abcde"), SV(""), false);
- test(S("abcde"), SV("abcde"), true);
- test(S("abcde"), SV("abcdefghij"), false);
- test(S("abcde"), SV("abcdefghijklmnopqrst"), false);
- test(S("abcdefghij"), SV(""), false);
- test(S("abcdefghij"), SV("abcde"), false);
- test(S("abcdefghij"), SV("abcdefghij"), true);
- test(S("abcdefghij"), SV("abcdefghijklmnopqrst"), false);
- test(S("abcdefghijklmnopqrst"), SV(""), false);
- 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 <char, std::char_traits<char>, min_allocator<char>> S;
- typedef std::basic_string_view<char, std::char_traits<char>> SV;
- test(S(""), SV(""), true);
- test(S(""), SV("abcde"), false);
- test(S(""), SV("abcdefghij"), false);
- test(S(""), SV("abcdefghijklmnopqrst"), false);
- test(S("abcde"), SV(""), false);
- test(S("abcde"), SV("abcde"), true);
- test(S("abcde"), SV("abcdefghij"), false);
- test(S("abcde"), SV("abcdefghijklmnopqrst"), false);
- test(S("abcdefghij"), SV(""), false);
- test(S("abcdefghij"), SV("abcde"), false);
- test(S("abcdefghij"), SV("abcdefghij"), true);
- test(S("abcdefghij"), SV("abcdefghijklmnopqrst"), false);
- test(S("abcdefghijklmnopqrst"), SV(""), false);
- test(S("abcdefghijklmnopqrst"), SV("abcde"), false);
- test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), false);
- test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), true);
- }
-#endif
-}
diff --git a/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp
deleted file mode 100644
index 2cd808659058..000000000000
--- a/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp
+++ /dev/null
@@ -1,70 +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>
-
-// we get this comparison "for free" because the string implicitly converts to the string_view
-
-#include <string>
-#include <cassert>
-
-#include "min_allocator.h"
-
-template <class S, class SV>
-void
-test(SV lhs, const S& rhs, bool x)
-{
- assert((lhs == rhs) == x);
-}
-
-int main()
-{
- {
- typedef std::string S;
- typedef std::string_view SV;
- test(SV(""), S(""), true);
- test(SV(""), S("abcde"), false);
- test(SV(""), S("abcdefghij"), false);
- test(SV(""), S("abcdefghijklmnopqrst"), false);
- test(SV("abcde"), S(""), false);
- test(SV("abcde"), S("abcde"), true);
- test(SV("abcde"), S("abcdefghij"), false);
- test(SV("abcde"), S("abcdefghijklmnopqrst"), false);
- test(SV("abcdefghij"), S(""), false);
- test(SV("abcdefghij"), S("abcde"), false);
- test(SV("abcdefghij"), S("abcdefghij"), true);
- test(SV("abcdefghij"), S("abcdefghijklmnopqrst"), false);
- test(SV("abcdefghijklmnopqrst"), S(""), false);
- 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<char, std::char_traits<char>, min_allocator<char>> S;
- typedef std::basic_string_view<char, std::char_traits<char>> SV;
- test(SV(""), S(""), true);
- test(SV(""), S("abcde"), false);
- test(SV(""), S("abcdefghij"), false);
- test(SV(""), S("abcdefghijklmnopqrst"), false);
- test(SV("abcde"), S(""), false);
- test(SV("abcde"), S("abcde"), true);
- test(SV("abcde"), S("abcdefghij"), false);
- test(SV("abcde"), S("abcdefghijklmnopqrst"), false);
- test(SV("abcdefghij"), S(""), false);
- test(SV("abcdefghij"), S("abcde"), false);
- test(SV("abcdefghij"), S("abcdefghij"), true);
- test(SV("abcdefghij"), S("abcdefghijklmnopqrst"), false);
- test(SV("abcdefghijklmnopqrst"), S(""), false);
- test(SV("abcdefghijklmnopqrst"), S("abcde"), false);
- test(SV("abcdefghijklmnopqrst"), S("abcdefghij"), false);
- test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true);
- }
-#endif
-}