stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r568583 - /incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp
Date Wed, 22 Aug 2007 12:23:21 GMT
Author: faridz
Date: Wed Aug 22 05:23:21 2007
New Revision: 568583

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

	* 21.cwchar.cpp (test_functions) [_MSC_VER]: Prevent invalid parameter
	validation error by setting size to 1.

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

Modified: incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp?rev=568583&r1=568582&r2=568583&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp (original)
+++ incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp Wed Aug 22 05:23:21 2007
@@ -87,10 +87,6 @@
 
 /**************************************************************************/
 
-#ifdef _MSC_VER
-#include <crtdbg.h>   // for _CrtSetReportMode()
-#endif
-
 #include <cwchar>
 #include <any.h>      // for rw_any_t
 #include <driver.h>   // for rw_test(), ...
@@ -931,16 +927,16 @@
     const test_tm* tmb = (const test_tm*)&tm_buf;
 
 #ifdef _MSC_VER
-    // disable GUI window with error:
-    // Assertion failed: ("Zero length output buffer passed to strftime",0)
-    int oldmode = _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
+    // prevent MSVC parameter validation error:
+    // "Zero length output buffer passed to strftime"
+    size = 1;
 #endif
 
     TEST (test_size_t, wcsftime, (wstr, size, L"", tmb), WCSFTIME, -1);
 
 #ifdef _MSC_VER
-    // restore error report mode
-    _CrtSetReportMode (_CRT_ASSERT, oldmode);
+    // restore size
+    size = 0;
 #endif
 
     TEST (test_wint_t, btowc, (i), BTOWC, -1);



Mime
View raw message