stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r557661 - /incubator/stdcxx/trunk/tests/self/0.new.cpp
Date Thu, 19 Jul 2007 15:43:09 GMT
Author: faridz
Date: Thu Jul 19 08:43:08 2007
New Revision: 557661

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

	* 0.new.cpp: Removed handling of the SIGSEGV signal.
	Skip all tests if _RWSTD_NO_REPLACEABLE_NEW_DELETE macro #defined.

Modified:
    incubator/stdcxx/trunk/tests/self/0.new.cpp

Modified: incubator/stdcxx/trunk/tests/self/0.new.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/self/0.new.cpp?view=diff&rev=557661&r1=557660&r2=557661
==============================================================================
--- incubator/stdcxx/trunk/tests/self/0.new.cpp (original)
+++ incubator/stdcxx/trunk/tests/self/0.new.cpp Thu Jul 19 08:43:08 2007
@@ -61,7 +61,6 @@
 #define FAIL(code)                                              \
     fail = line = __LINE__;                                     \
     signal (SIGABRT, handle_ABRT);                              \
-    signal (SIGSEGV, handle_ABRT);                              \
     if (0 == setjmp (env)) {                                    \
         code;                                                   \
         exit_status = 1;                                        \
@@ -73,7 +72,6 @@
 #define PASS(code)                                              \
     fail = -1; line = __LINE__;                                 \
     signal (SIGABRT, handle_ABRT);                              \
-    signal (SIGSEGV, handle_ABRT);                              \
     if (0 == setjmp (env)) {                                    \
         code;                                                   \
     }                                                           \
@@ -469,13 +467,14 @@
 
 int run_test (int, char**)
 {
-#define TEST(name)                                              \
+#ifndef _RWSTD_NO_REPLACEABLE_NEW_DELETE
+
+#  define TEST(name)                                            \
     if (rw_opt_no_ ## name)                                     \
         rw_note (0, 0, __LINE__, "%s test disabled", #name);    \
-else                                                            \
+    else                                                        \
         test_ ## name ()
 
-
     TEST (bad_alloc);
     TEST (mismatch);
     TEST (double_delete);
@@ -484,11 +483,22 @@
     TEST (leaks);
     TEST (stress);
 
+#else    // _RWSTD_NO_REPLACEABLE_NEW_DELETE
+
+    rw_note (0, 0, __LINE__, "Test disabled");
+
+#endif   // _RWSTD_NO_REPLACEABLE_NEW_DELETE
+
     return 0;
 }
 
 /**************************************************************************/
-
+/*
+void* operator new (size_t n) throw (std::bad_alloc)
+{
+    return 0;
+}
+*/
 int main (int argc, char** argv)
 {
     return rw_test (argc, argv, __FILE__,



Mime
View raw message