stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r398978 - /incubator/stdcxx/trunk/tests/src/21.strings.cpp
Date Tue, 02 May 2006 17:40:32 GMT
Author: sebor
Date: Tue May  2 10:40:31 2006
New Revision: 398978

URL: http://svn.apache.org/viewcvs?rev=398978&view=rev
Log:
2006-05-02  Martin Sebor  <sebor@roguewave.com>

	* 21.strings.cpp (_rw_opt_no_self_ref): New option handler.
	(_rw_run_test, run_test): Used _rw_opt_no_self_ref to disable
	tests of self-referential modifying member functions.

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

Modified: incubator/stdcxx/trunk/tests/src/21.strings.cpp
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/src/21.strings.cpp?rev=398978&r1=398977&r2=398978&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/21.strings.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/21.strings.cpp Tue May  2 10:40:31 2006
@@ -92,6 +92,9 @@
 static int
 _rw_opt_no_exception_safety;
 
+static int
+_rw_opt_no_self_ref;
+
 /**************************************************************************/
 
 // coputes integral base-2 logarithm of its argument
@@ -704,6 +707,18 @@
                             continue;
                         }
 
+                        const bool self_ref = 0 == tcase.arg;
+
+                        // check for tests exercising self-referential
+                        // modifications (e.g., insert(1, *this)
+                        if (self_ref && _rw_opt_no_self_ref) {
+                            // issue only the first note
+                            rw_note (1 < _rw_opt_no_self_ref++,
+                                     __FILE__, __LINE__,
+                                     "selef-referential tests disabled");
+                            continue;
+                        }
+
                         // check to see if the test case is enabled
                         if (rw_enabled (tcase.line)) {
 
@@ -834,10 +849,12 @@
                     _rw_opt_no_alloc_types + 0,
                     _rw_opt_no_alloc_types + 1,
 
-
                     // handlers controlling exceptions
                     &_rw_opt_no_exceptions,
                     &_rw_opt_no_exception_safety,
+
+                    // handler controlling self-referential modifiers
+                    &_rw_opt_no_self_ref,
 
                     // handlers controlling specific overloads of a function
                     _rw_opt_memfun_disabled + sig_void - 1,



Mime
View raw message