stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r648128 - /stdcxx/trunk/tests/src/driver.cpp
Date Tue, 15 Apr 2008 06:44:19 GMT
Author: faridz
Date: Mon Apr 14 23:44:15 2008
New Revision: 648128

URL: http://svn.apache.org/viewvc?rev=648128&view=rev
Log:
2008-04-15 Farid Zaripov <farid_zaripov@epam.com>

	* tests/src/driver.cpp [_MSC_VER] (_rw_opt_verbose): Turn on checking the
	memory at every allocation and deallocation in verbose mode.
	(_rw_opt_compat): Disable MSVC debug popup's in compat mode.

Modified:
    stdcxx/trunk/tests/src/driver.cpp

Modified: stdcxx/trunk/tests/src/driver.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/driver.cpp?rev=648128&r1=648127&r2=648128&view=diff
==============================================================================
--- stdcxx/trunk/tests/src/driver.cpp (original)
+++ stdcxx/trunk/tests/src/driver.cpp Mon Apr 14 23:44:15 2008
@@ -45,6 +45,10 @@
 #include <stdlib.h>    // for free
 #include <string.h>    // for strchr, strcpy
 
+#ifdef _MSC_VER
+#  include <crtdbg.h>  // for _CrtSetReportMode(), _CrtSetDbgFlag()
+#endif
+
 #if !defined (_WIN32) && !defined (_WIN64)
 #  include <unistd.h>         // for isatty()
 #  include <sys/resource.h>   // for setlimit()
@@ -488,6 +492,12 @@
     // set mode: enable the option
     opt_verbose = 1;
 
+#ifdef _MSC_VER
+    _CrtSetDbgFlag (  _CRTDBG_ALLOC_MEM_DF
+                    | _CRTDBG_CHECK_ALWAYS_DF
+                    | _CRTDBG_LEAK_CHECK_DF);
+#endif
+
     return 0;
 }
 
@@ -536,6 +546,12 @@
 
     // set mode: enable the option
     opt_compat = 1;
+
+#ifdef _MSC_VER
+    _CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_DEBUG);
+    _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_DEBUG);
+    _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
+#endif
 
     return 0;
 }



Mime
View raw message