stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r653964 - /stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp
Date Wed, 07 May 2008 01:40:16 GMT
Author: vitek
Date: Tue May  6 18:40:15 2008
New Revision: 653964

URL: http://svn.apache.org/viewvc?rev=653964&view=rev
Log:

2008-05-06  Travis Vitek  <vitek@roguewave.com>

	* tests/algorithms/25.random.shuffle.cpp (test_random_shuffle): Break
	from loop on first assertion failure.


Modified:
    stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp

Modified: stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp?rev=653964&r1=653963&r2=653964&view=diff
==============================================================================
--- stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp (original)
+++ stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp Tue May  6 18:40:15 2008
@@ -307,14 +307,12 @@
     };
 
     for (std::size_t i = 0; i != sizeof array / sizeof *array; ++i) {
-        const bool success = array [i] == result [i];
-        if (!success) {
-            rw_assert (0, 0, line, 
-                       "randomly shuffled sequence failed to match "
-                       "the expected result (data portability failure) "
-                       "%d != %d at %zu",
-                       array [i], result [i], i + 1);
-        }
+        if (!rw_assert (array [i] == result [i], 0, line, 
+                        "randomly shuffled sequence failed to match "
+                        "the expected result (data portability failure) "
+                        "%d != %d at %zu",
+                        array [i], result [i], i + 1))
+            break;
     }
 
 #else



Mime
View raw message