Author: vitek
Date: Wed Apr 9 15:23:18 2008
New Revision: 646567
URL: http://svn.apache.org/viewvc?rev=646567&view=rev
Log:
2008-04-09 Travis Vitek <[EMAIL PROTECTED]>
STDCXX-783
* tests/algorithms/25.random.shuffle.cpp (test_random_shuffle): Avoid
indexing past the end of arrays when evaluating rw_assert() arguments
by checking for failure first.
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=646567&r1=646566&r2=646567&view=diff
==============================================================================
--- stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp (original)
+++ stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp Wed Apr 9 15:23:18 2008
@@ -314,11 +314,14 @@
break;
}
- rw_assert (success, 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 (!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);
+ }
+
#else
rw_note (0, 0, 0,