You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2006/05/05 21:41:15 UTC
svn commit: r400153 - /incubator/stdcxx/trunk/tests/src/driver.cpp
Author: sebor
Date: Fri May 5 12:41:13 2006
New Revision: 400153
URL: http://svn.apache.org/viewcvs?rev=400153&view=rev
Log:
2006-05-05 Martin Sebor <se...@roguewave.com>
* driver.cpp (rw_vtest): Set _rw_ftestout to rw_stdout here
instead of relying on static initialization. Checked for 0
before closing.
Modified:
incubator/stdcxx/trunk/tests/src/driver.cpp
Modified: incubator/stdcxx/trunk/tests/src/driver.cpp
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/src/driver.cpp?rev=400153&r1=400152&r2=400153&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/driver.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/driver.cpp Fri May 5 12:41:13 2006
@@ -331,7 +331,7 @@
static int
ndiags [N_DIAG_TYPES][2] /* = { { total, active }, ... }*/;
-static rw_file *_rw_ftestout = rw_stdout;
+static rw_file *_rw_ftestout;
static jmp_buf test_env;
@@ -927,6 +927,12 @@
{
CHECK_INIT (false, "rw_vtest()");
+ // set the default test output to stdout
+ RW_ASSERT (0 == _rw_ftestout);
+ RW_ASSERT (0 != rw_stdout);
+
+ _rw_ftestout = rw_stdout;
+
_rw_driver_init = 1;
if (optstr && 0 > rw_vsetopts (optstr, va)) {
@@ -1106,7 +1112,7 @@
ndiags [diag_assert][1] + ndiags [diag_xassert][1]);
}
- if (_rw_ftestout != rw_stdout) {
+ if (_rw_ftestout && _rw_ftestout != rw_stdout) {
fclose ((FILE*)(void*)_rw_ftestout);
_rw_ftestout = 0;
}