You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by vi...@apache.org on 2008/05/07 03:40:16 UTC
svn commit: r653964 - /stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp
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 <vi...@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