stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r426298 - in /incubator/stdcxx/trunk/tests: include/21.strings.h src/21.strings.cpp
Date Thu, 27 Jul 2006 22:45:48 GMT
Author: sebor
Date: Thu Jul 27 15:45:48 2006
New Revision: 426298

URL: http://svn.apache.org/viewvc?rev=426298&view=rev
Log:
2006-07-27  Farid Ziripov <faridz@kyiv.vdiweb.com>
            Martin Sebor  <sebor@roguewave.com>

        * 21.strings.h (rw_setvars): Declared.
        (assert_equal): Changed return type to int.
        * 21.strings.cpp (rw_setvars): Renamed from _rw_setvars and made extern.

Modified:
    incubator/stdcxx/trunk/tests/include/21.strings.h
    incubator/stdcxx/trunk/tests/src/21.strings.cpp

Modified: incubator/stdcxx/trunk/tests/include/21.strings.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/include/21.strings.h?rev=426298&r1=426297&r2=426298&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/include/21.strings.h (original)
+++ incubator/stdcxx/trunk/tests/include/21.strings.h Thu Jul 27 15:45:48 2006
@@ -6,22 +6,21 @@
  *
  ***************************************************************************
  *
- * Copyright 2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * 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
  *
- * Copyright 2006 Rogue Wave Software.
- *
- * Licensed 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
+ * 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.
+ * 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.
  * 
  **************************************************************************/
 
@@ -408,7 +407,7 @@
 
         //////////////////////////////////////////////////////////////
         // substr (void) const
-        MEMBER_1 (substr, cstr, void),
+        MEMBER_0 (substr, cstr),
         // substr (size_type) const
         MEMBER_1 (substr, cstr, size),
         // substr (size_type, size_type) const
@@ -541,15 +540,15 @@
         NON_MEMBER_2 (op_greater_equal, cstr, cptr),
 
         //////////////////////////////////////////////////////////////
-        // size ()
+        // size () const
         MEMBER_0 (size, cstr),
 
         //////////////////////////////////////////////////////////////
-        // length ()
+        // length () const
         MEMBER_0 (length, cstr),
 
         //////////////////////////////////////////////////////////////
-        // max_size ()
+        // max_size () const
         MEMBER_0 (max_size, cstr),
 
         //////////////////////////////////////////////////////////////
@@ -559,7 +558,7 @@
         MEMBER_1 (resize, str, size),
 
         //////////////////////////////////////////////////////////////
-        // capacity ()
+        // capacity () const
         MEMBER_0 (capacity, cstr),
 
         //////////////////////////////////////////////////////////////
@@ -573,7 +572,7 @@
         MEMBER_0 (clear, str),
 
         //////////////////////////////////////////////////////////////
-        // empty ()
+        // empty () const
         MEMBER_0 (empty, cstr),
 
         //////////////////////////////////////////////////////////////
@@ -710,6 +709,18 @@
 };
 
 
+// sets the {CLASS}, {FUNC}, {FUNCSIG}, and optionally {FUNCALL}
+// environment variables as follows:
+// CLASS:   the name of basic_string specialization
+// FUNC:    the name of the basic_string function
+// FUNCSIG: the name and signature of a specific overload
+//          of the basic_string function
+// FUNCALL: a string describing the call to the basic_string function
+//          with function with function arguments expanded (as specified
+//          by the TestCase argument)
+_TEST_EXPORT void
+rw_setvars (const StringFunc&, const StringTestCase* = 0);
+
 typedef void StringTestFunc (const StringFunc&, const StringTestCase&);
 
 _TEST_EXPORT int
@@ -818,7 +829,8 @@
     _RWSTD_SIZE_T capacity_;
 
     // invokes rw_assert() to verify that two states are the same
-    void assert_equal (const StringState&, int, int, const char*) const;
+    // returns 1 when the two states compare equal, and 0 otherwise
+    int assert_equal (const StringState&, int, int, const char*) const;
 };
 
 

Modified: incubator/stdcxx/trunk/tests/src/21.strings.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/21.strings.cpp?rev=426298&r1=426297&r2=426298&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/21.strings.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/21.strings.cpp Thu Jul 27 15:45:48 2006
@@ -6,22 +6,21 @@
  *
  ***************************************************************************
  *
- * Copyright 2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * 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
  *
- * Copyright 2006 Rogue Wave Software.
- *
- * Licensed 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
+ * 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.
+ * 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.
  * 
  **************************************************************************/
 
@@ -153,7 +152,7 @@
 
 /**************************************************************************/
 
-void StringState::
+int StringState::
 assert_equal (const StringState &state, int line, int case_line,
               const char *when) const
 {
@@ -169,6 +168,8 @@
                line, data_, size_, capacity_,
                state.data_, state.size_, state.capacity_,
                when);
+
+    return equal;
 }
 
 /**************************************************************************/
@@ -405,18 +406,9 @@
 
 /**************************************************************************/
 
-// sets the {CLASS}, {FUNC}, {FUNCSIG}, and optionally {FUNCALL}
-// environment variables as follows:
-// CLASS:   the name of basic_string specialization
-// FUNC:    the name of the basic_string function
-// FUNCSIG: the name and signature of a specific overload
-//          of the basic_string function
-// FUNCALL: a string describing the call to the basic_string function
-//          with function with function arguments expanded (as specified
-//          by the TestCase argument)
-static void
-_rw_setvars (const StringFunc     &func,
-             const StringTestCase *pcase = 0)
+_TEST_EXPORT void
+rw_setvars (const StringFunc     &func,
+            const StringTestCase *pcase /* = 0 */)
 {
     char*  buf     = 0;
     size_t bufsize = 0;
@@ -1296,7 +1288,7 @@
 
         // set the {FUNCALL} environment variable to describe
         // the function call specified by this test case
-        _rw_setvars (func, &tcase);
+        rw_setvars (func, &tcase);
 
         if (test_callback) {
             // invoke the test callback function
@@ -1329,7 +1321,7 @@
     // set the {CLASS}, {FUNC}, and {FUNCSIG} environment
     // variable to the name of the basic_string specializaton
     // and the string function being exercised
-    _rw_setvars (func);
+    rw_setvars (func);
 
     // determine whether the function is a member function
     const bool is_member = 0 != (StringIds::bit_member & test.which);



Mime
View raw message