stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r572744 - /incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp
Date Tue, 04 Sep 2007 17:20:02 GMT
Author: faridz
Date: Tue Sep  4 10:20:01 2007
New Revision: 572744

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

	* 22.locale.messages.cpp (test_open_close) [_WIN32]: Don't test file
	descriptor leaking because the catalog functions not uses files on Win32.
	(stress_test) [_WIN32]: Removed appending ".dll" because it will be
	appended by Windows by default.

Modified:
    incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp

Modified: incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp?rev=572744&r1=572743&r2=572744&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp (original)
+++ incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp Tue Sep  4 10:20:01 2007
@@ -527,7 +527,14 @@
     int fdcount [2];
     int next_fd [2];
 
+#ifndef _WIN32
     next_fd [0] = rw_nextfd (fdcount + 0);
+#else
+    // don't test file descriptor leaking on Win32 to avoid
+    // invalid parameter error
+    // catalog functions not uses file descriptors
+    next_fd [0] = fdcount [0] = 0;
+#endif
 
     rw_info (0, 0, __LINE__,
              "std::messages<%s>::open() and close() in locale(#%s)",
@@ -551,7 +558,11 @@
     close_catalog (msgs, cat, true, cname, __LINE__);
 
     // verify that no file descriptor has leaked
+#ifndef _WIN32
     next_fd [1] = rw_nextfd (fdcount + 1);
+#else
+    next_fd [1] = fdcount [1] = 0;
+#endif
 
     rw_assert (next_fd [1] == next_fd [0] && fdcount [0] == fdcount [1],
                0, __LINE__,
@@ -782,10 +793,6 @@
         const char* const dot = std::strrchr (msg_name, '.');
         std::strncpy (catalog_names[i], msg_name, dot - msg_name);
         *(catalog_names[i] + (dot - msg_name)) = '\0';
-
-#ifdef _WIN32
-        std::strcat (catalog_names[i], ".dll");
-#endif   // _WIN32
 
         // open each catalog (expect success)
         cats [i] = open_catalog (msgs, catalog_names [i],



Mime
View raw message