aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t')
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc93
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc92
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc92
-rw-r--r--gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/4.cc42
4 files changed, 0 insertions, 319 deletions
diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc
deleted file mode 100644
index 8fd5149e5..000000000
--- a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-// 1999-06-09 bkoz
-
-// Copyright (C) 1994, 1999, 2000, 2003, 2009 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-// 21.3.6.1 basic_string find
-
-#include <string>
-#include <testsuite_hooks.h>
-
-bool test01(void)
-{
- bool test __attribute__((unused)) = true;
- typedef std::wstring::size_type csize_type;
- typedef std::wstring::const_reference cref;
- typedef std::wstring::reference ref;
- csize_type npos = std::wstring::npos;
- csize_type csz01, csz02;
-
- const wchar_t str_lit01[] = L"mave";
- const std::wstring str01(L"mavericks, santa cruz");
- std::wstring str02(str_lit01);
- std::wstring str03(L"s, s");
- std::wstring str04;
-
- // size_type find(const wstring&, size_type pos = 0) const;
- csz01 = str01.find(str01);
- VERIFY( csz01 == 0 );
- csz01 = str01.find(str01, 4);
- VERIFY( csz01 == npos );
- csz01 = str01.find(str02, 0);
- VERIFY( csz01 == 0 );
- csz01 = str01.find(str02, 3);
- VERIFY( csz01 == npos );
- csz01 = str01.find(str03, 0);
- VERIFY( csz01 == 8 );
- csz01 = str01.find(str03, 3);
- VERIFY( csz01 == 8 );
- csz01 = str01.find(str03, 12);
- VERIFY( csz01 == npos );
-
- // An empty string consists of no characters
- // therefore it should be found at every point in a string,
- // except beyond the end
- csz01 = str01.find(str04, 0);
- VERIFY( csz01 == 0 );
- csz01 = str01.find(str04, 5);
- VERIFY( csz01 == 5 );
- csz01 = str01.find(str04, str01.size());
- VERIFY( csz01 == str01.size() );
- csz01 = str01.find(str04, str01.size()+1);
- VERIFY( csz01 == npos );
-
- // size_type find(const wchar_t* s, size_type pos, size_type n) const;
- csz01 = str01.find(str_lit01, 0, 3);
- VERIFY( csz01 == 0 );
- csz01 = str01.find(str_lit01, 3, 0);
- VERIFY( csz01 == 3 );
-
- // size_type find(const wchar_t* s, size_type pos = 0) const;
- csz01 = str01.find(str_lit01);
- VERIFY( csz01 == 0 );
- csz01 = str01.find(str_lit01, 3);
- VERIFY( csz01 == npos );
-
- // size_type find(wchar_t c, size_type pos = 0) const;
- csz01 = str01.find(L'z');
- csz02 = str01.size() - 1;
- VERIFY( csz01 == csz02 );
- csz01 = str01.find(L'/');
- VERIFY( csz01 == npos );
- return test;
-}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc
deleted file mode 100644
index ff799163b..000000000
--- a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-// 1999-06-09 bkoz
-
-// Copyright (C) 1994, 1999, 2000, 2003, 2009 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-// 21.3.6.3 basic_string find_first_of
-
-#include <string>
-#include <testsuite_hooks.h>
-
-bool test02(void)
-{
- bool test __attribute__((unused)) = true;
- typedef std::wstring::size_type csize_type;
- csize_type npos = std::wstring::npos;
- csize_type csz01, csz02;
-
- const wchar_t str_lit01[] = L"mave";
- const std::wstring str01(L"mavericks, santa cruz");
- std::wstring str02(str_lit01);
- std::wstring str03(L"s, s");
- std::wstring str04;
-
- // size_type find_first_of(const wstring&, size_type pos = 0) const;
- std::wstring str05(L"xena rulez");
- csz01 = str01.find_first_of(str01);
- VERIFY( csz01 == 0 );
- csz01 = str01.find_first_of(str01, 4);
- VERIFY( csz01 == 4 );
- csz01 = str01.find_first_of(str02, 0);
- VERIFY( csz01 == 0 );
- csz01 = str01.find_first_of(str02, 3);
- VERIFY( csz01 == 3 );
- csz01 = str01.find_first_of(str03, 0);
- VERIFY( csz01 == 8 );
- csz01 = str01.find_first_of(str03, 3);
- VERIFY( csz01 == 8 );
- csz01 = str01.find_first_of(str03, 12);
- VERIFY( csz01 == 16 );
- csz01 = str01.find_first_of(str05, 0);
- VERIFY( csz01 == 1 );
- csz01 = str01.find_first_of(str05, 4);
- VERIFY( csz01 == 4 );
-
- // An empty string consists of no characters
- // therefore it should be found at every point in a string,
- // except beyond the end
- // However, str1.find_first_of(str2,pos) finds the first character in
- // str1 (starting at pos) that exists in str2, which is none for empty str2
- csz01 = str01.find_first_of(str04, 0);
- VERIFY( csz01 == npos );
- csz01 = str01.find_first_of(str04, 5);
- VERIFY( csz01 == npos );
-
- // size_type find_first_of(const wchar_t* s, size_type pos, size_type n) const;
- csz01 = str01.find_first_of(str_lit01, 0, 3);
- VERIFY( csz01 == 0 );
- csz01 = str01.find_first_of(str_lit01, 3, 0);
- VERIFY( csz01 == npos );
-
- // size_type find_first_of(const wchar_t* s, size_type pos = 0) const;
- csz01 = str01.find_first_of(str_lit01);
- VERIFY( csz01 == 0 );
- csz01 = str01.find_first_of(str_lit01, 3);
- VERIFY( csz01 == 3 );
-
- // size_type find_first_of(wchar_t c, size_type pos = 0) const;
- csz01 = str01.find_first_of(L'z');
- csz02 = str01.size() - 1;
- VERIFY( csz01 == csz02 );
- return test;
-}
-
-int main()
-{
- test02();
- return 0;
-}
diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc
deleted file mode 100644
index 4017f7383..000000000
--- a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-// 2003-05-04 Paolo Carlini <pcarlini@unitus.it>
-
-// Copyright (C) 2003, 2005, 2009 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-// 21.3.6.5 basic_string find_first_not_of
-
-#include <string>
-#include <testsuite_hooks.h>
-
-bool test03(void)
-{
- bool test __attribute__((unused)) = true;
- typedef std::wstring::size_type csize_type;
- csize_type npos = std::wstring::npos;
- csize_type csz01;
-
- const std::wstring str01(L"Bob Rock, per me");
- const wchar_t str_lit01[] = L"Bob Rock";
- std::wstring str02(L"ovvero Trivi");
- std::wstring str03(str_lit01);
- std::wstring str04;
-
- // size_type find_first_not_of(const string&, size_type pos = 0) const;
- csz01 = str01.find_first_not_of(str01);
- VERIFY( csz01 == npos );
- csz01 = str01.find_first_not_of(str02, 0);
- VERIFY( csz01 == 0 );
- csz01 = str01.find_first_not_of(str02, 10);
- VERIFY( csz01 == 10 );
- csz01 = str01.find_first_not_of(str02, 12);
- VERIFY( csz01 == 14 );
- csz01 = str01.find_first_not_of(str03, 0);
- VERIFY( csz01 == 8 );
- csz01 = str01.find_first_not_of(str03, 15);
- VERIFY( csz01 == 15 );
- csz01 = str01.find_first_not_of(str03, 16);
- VERIFY( csz01 == npos );
- csz01 = str01.find_first_not_of(str04, 0);
- VERIFY( csz01 == 0 );
- csz01 = str01.find_first_not_of(str04, 12);
- VERIFY( csz01 == 12 );
- csz01 = str03.find_first_not_of(str01, 0);
- VERIFY( csz01 == npos );
- csz01 = str04.find_first_not_of(str02, 0);
- VERIFY( csz01 == npos );
-
- // size_type find_first_not_of(const char* s, size_type pos, size_type n) const;
- csz01 = str01.find_first_not_of(str_lit01, 0, 0);
- VERIFY( csz01 == 0 );
- csz01 = str01.find_first_not_of(str_lit01, 0, 8);
- VERIFY( csz01 == 8 );
- csz01 = str01.find_first_not_of(str_lit01, 10, 0);
- VERIFY( csz01 == 10 );
-
- // size_type find_first_not_of(const char* s, size_type pos = 0) const;
- csz01 = str01.find_first_not_of(str_lit01);
- VERIFY( csz01 == 8 );
- csz01 = str02.find_first_not_of(str_lit01, 2);
- VERIFY( csz01 == 2 );
-
- // size_type find_first_not_of(char c, size_type pos = 0) const;
- csz01 = str01.find_first_not_of(L'B');
- VERIFY( csz01 == 1 );
- csz01 = str01.find_first_not_of(L'o', 1);
- VERIFY( csz01 == 2 );
- csz01 = str02.find_first_not_of(L'z');
- VERIFY( csz01 == 0 );
- csz01 = str04.find_first_not_of(L'S');
- VERIFY( csz01 == npos );
- return test;
-}
-
-int main()
-{
- test03();
- return 0;
-}
diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/4.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/4.cc
deleted file mode 100644
index 973ee92f7..000000000
--- a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/4.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-// 2007-03-30 Paolo Carlini <pcarlini@suse.de>
-
-// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-// 21.3.6.1 basic_string find
-
-#include <string>
-#include <testsuite_hooks.h>
-
-// libstdc++/31401
-void test01()
-{
- bool test __attribute__((unused)) = true;
- typedef std::wstring::size_type csize_type;
- csize_type npos = std::wstring::npos;
-
- std::wstring use = L"anu";
- csize_type pos1 = use.find(L"a", npos);
-
- VERIFY( pos1 == npos );
-}
-
-int main()
-{
- test01();
- return 0;
-}