stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r558688 - /incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp
Date Mon, 23 Jul 2007 11:33:41 GMT
Author: faridz
Date: Mon Jul 23 04:33:41 2007
New Revision: 558688

URL: http://svn.apache.org/viewvc?view=rev&rev=558688
Log:
2007-07-23 Farid Zaripov <Farid_Zaripov@epam.com>

	* 21.string.rfind.stdcxx-466.cpp: New regression test for STDCXX-466.

Added:
    incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp   (with props)

Added: incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp?view=auto&rev=558688
==============================================================================
--- incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp (added)
+++ incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp Mon Jul 23 04:33:41
2007
@@ -0,0 +1,41 @@
+/************************************************************************
+ *
+ * 21.string.rfind.stdcxx-466.cpp - test case from STDCXX-466 issue
+ *
+ * $Id$
+ *
+ ***************************************************************************
+ *
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ **************************************************************************/
+
+#include <cassert>
+#include <string>
+
+int main (int argc, char* argv[])
+{
+    std::string s ("abcd");
+    try {
+        assert (std::string::npos == s.rfind ("bc", 0, s.max_size () + 1));
+    }
+    catch (...) {
+        assert (!"Unexpected exception was thrown");
+    }
+
+    return 0;
+}

Propchange: incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message