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

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



git-svn-id: https://svn.apache.org/repos/asf/stdcxx/trunk@653964 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/tests/algorithms/25.random.shuffle.cpp b/tests/algorithms/25.random.shuffle.cpp
index 85d15f0..fa9fc3a 100644
--- a/tests/algorithms/25.random.shuffle.cpp
+++ b/tests/algorithms/25.random.shuffle.cpp
@@ -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