Author: faridz
Date: Wed Jul 25 08:43:58 2007
New Revision: 559497
URL: http://svn.apache.org/viewvc?view=rev&rev=559497
Log:
2007-07-25 Farid Zaripov <[EMAIL PROTECTED]>
* 21.string.stdcxx-466.cpp: Corrected tests for find_first_not_of() and
find_last_not_of().
* 21.string.find.first.not.of.cpp: Test updated to reflect changes from
r559037.
* 21.string.find.first.of.cpp: Ditto.
* 21.string.find.last.not.of.cpp: Ditto.
* 21.string.find.last.of.cpp: Ditto.
Modified:
incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp
incubator/stdcxx/trunk/tests/strings/21.string.find.first.not.of.cpp
incubator/stdcxx/trunk/tests/strings/21.string.find.first.of.cpp
incubator/stdcxx/trunk/tests/strings/21.string.find.last.not.of.cpp
incubator/stdcxx/trunk/tests/strings/21.string.find.last.of.cpp
Modified: incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp?view=diff&rev=559497&r1=559496&r2=559497
==============================================================================
--- incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp (original)
+++ incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp Wed Jul 25
08:43:58 2007
@@ -29,7 +29,7 @@
int main (int argc, char* argv[])
{
- const std::string s ("efgh");
+ std::string s ("efgh");
const std::string::size_type len = s.max_size () + 1;
@@ -47,11 +47,14 @@
TEST (npos == s.rfind ("fg", 0, len));
TEST (0 == s.find_first_of ("eh", 0, len));
TEST (3 == s.find_last_of ("eh", npos, len));
- TEST (npos == s.find_first_not_of ("eh", 0, len));
- TEST (npos == s.find_last_not_of ("eh", npos, len));
TEST (0 > s.compare (0, npos, "efgh", len));
TEST (0 > s.compare (0, npos, "ijkl", len));
TEST (0 < s.compare (0, npos, "abcd", len));
+
+ s.clear ();
+
+ TEST (npos == s.find_first_not_of ("eh", 0, len));
+ TEST (npos == s.find_last_not_of ("eh", npos, len));
return 0;
}
Modified: incubator/stdcxx/trunk/tests/strings/21.string.find.first.not.of.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.find.first.not.of.cpp?view=diff&rev=559497&r1=559496&r2=559497
==============================================================================
--- incubator/stdcxx/trunk/tests/strings/21.string.find.first.not.of.cpp
(original)
+++ incubator/stdcxx/trunk/tests/strings/21.string.find.first.not.of.cpp Wed
Jul 25 08:43:58 2007
@@ -396,14 +396,7 @@
TEST ("abcdefghij", "abc", 10, 3, NPOS, 0),
TEST ("abcdefghij", "cba", 10, 1, NPOS, 0),
-#ifndef _RWSTD_NO_EXCEPTIONS
-
- TEST ("", "cba", 0, -1, 0, 1),
- TEST ("abcdefghij", "cba", 0, -1, 0, 1),
- TEST ("[EMAIL PROTECTED]", "xxx", 0, -1, 0, 1),
- TEST ("abcdefghij", "[EMAIL PROTECTED]", 0, -1, 0, 1),
-
-#endif // _RWSTD_NO_EXCEPTIONS
+ TEST ("", "cba", 0, -1, NPOS, 0),
TEST ("last test", "test", 0, 4, 0, 0)
};
Modified: incubator/stdcxx/trunk/tests/strings/21.string.find.first.of.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.find.first.of.cpp?view=diff&rev=559497&r1=559496&r2=559497
==============================================================================
--- incubator/stdcxx/trunk/tests/strings/21.string.find.first.of.cpp (original)
+++ incubator/stdcxx/trunk/tests/strings/21.string.find.first.of.cpp Wed Jul 25
08:43:58 2007
@@ -404,10 +404,10 @@
TEST ("abcdefghij", "abc", 10, 3, NPOS, 0),
TEST ("abcdefghij", "cba", 10, 1, NPOS, 0),
- TEST ("", "cba", 0, -1, 0, 1),
- TEST ("abcdefghij", "cba", 0, -1, 0, 1),
- TEST ("[EMAIL PROTECTED]", "xxx", 0, -1, 0, 1),
- TEST ("abcdefghij", "[EMAIL PROTECTED]", 0, -1, 0, 1),
+ TEST ("", "cba", 0, -1, NPOS, 0),
+ TEST ("abcdefghij", "cba", 0, -1, 0, 0),
+ TEST ("[EMAIL PROTECTED]", "xxx", 0, -1, 0, 0),
+ TEST ("abcdefghij", "[EMAIL PROTECTED]", 0, -1, 0, 0),
TEST ("last test", "test", 0, 4, 2, 0)
};
Modified: incubator/stdcxx/trunk/tests/strings/21.string.find.last.not.of.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.find.last.not.of.cpp?view=diff&rev=559497&r1=559496&r2=559497
==============================================================================
--- incubator/stdcxx/trunk/tests/strings/21.string.find.last.not.of.cpp
(original)
+++ incubator/stdcxx/trunk/tests/strings/21.string.find.last.not.of.cpp Wed Jul
25 08:43:58 2007
@@ -404,10 +404,7 @@
TEST ("defghijabc", "abc", 15, 3, 6, 0),
TEST ("defghijabc", "cba", 15, 1, 8, 0),
- TEST ("", "cba", 0, -1, 0, 1),
- TEST ("abcdefghij", "cba", 0, -1, 0, 1),
- TEST ("[EMAIL PROTECTED]", "xxx", 0, -1, 0, 1),
- TEST ("abcdefghij", "[EMAIL PROTECTED]", 0, -1, 0, 1),
+ TEST ("", "cba", 0, -1, NPOS, 0),
TEST ("last test", "test", 9, 4, 4, 0)
};
Modified: incubator/stdcxx/trunk/tests/strings/21.string.find.last.of.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.find.last.of.cpp?view=diff&rev=559497&r1=559496&r2=559497
==============================================================================
--- incubator/stdcxx/trunk/tests/strings/21.string.find.last.of.cpp (original)
+++ incubator/stdcxx/trunk/tests/strings/21.string.find.last.of.cpp Wed Jul 25
08:43:58 2007
@@ -424,10 +424,10 @@
TEST ("abcdefghij", "abc", 10, 3, 2, 0),
TEST ("abcdefghij", "cba", 10, 1, 2, 0),
- TEST ("", "cba", 0, -1, 0, 1),
- TEST ("abcdefghij", "cba", 0, -1, 0, 1),
- TEST ("[EMAIL PROTECTED]", "xxx", 0, -1, 0, 1),
- TEST ("abcdefghij", "[EMAIL PROTECTED]", 0, -1, 0, 1),
+ TEST ("", "cba", 0, -1, NPOS, 0),
+ TEST ("abcdefghij", "cbaj", 9, -1, 9, 0),
+ TEST ("[EMAIL PROTECTED]", "xxx", 4095, -1, 4095, 0),
+ TEST ("abcdefghij", "[EMAIL PROTECTED]", 9, -1, 9, 0),
TEST ("last test", "test", 9, 4, 8, 0)
};