stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elemi...@apache.org
Subject svn commit: r675316 - in /stdcxx/branches/4.3.x/tests: tr1.c99/ tr1.util/ utilities/20.tuple.cnstr.cpp
Date Wed, 09 Jul 2008 19:18:50 GMT
Author: elemings
Date: Wed Jul  9 12:18:50 2008
New Revision: 675316

URL: http://svn.apache.org/viewvc?rev=675316&view=rev
Log:
2008-07-09  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* tests/utilities/20.tuple.cnstr.cpp (verify_tuple): Fixed
	assertions from float/double conversions.
	* tests/tr1.util, tests/tr1.c99: Removed unused directories.


Removed:
    stdcxx/branches/4.3.x/tests/tr1.c99/
    stdcxx/branches/4.3.x/tests/tr1.util/
Modified:
    stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp

Modified: stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp?rev=675316&r1=675315&r2=675316&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp Wed Jul  9 12:18:50 2008
@@ -35,7 +35,7 @@
 #include <cstring>              // for strcmp
 #include <tuple>
 
-#include <rw_valcmp.h>          // for rw_dblcmp
+#include <rw_valcmp.h>          // for rw_fltcmp
 
 #include "20.tuple.h"
 
@@ -135,7 +135,9 @@
     rw_assert (std::get<2> (bt) == INT_VALUE, __FILE__, __LINE__,
                "std::get<2> (bt), got %d, expected %d",
                std::get<2> (bt), INT_VALUE);
-    int result = rw_dblcmp (std::get<3> (bt), DBL_VALUE);
+    // compare as floats because floats promoted to doubles will not
+    // be equal even if the values are logically equal
+    int result = rw_fltcmp (std::get<3> (bt), DBL_VALUE);
     rw_assert (0 == result, __FILE__, __LINE__,
                "std::get<3> (bt), got %f, expected %f",
                std::get<3> (bt), DBL_VALUE);



Mime
View raw message