Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: tests/SortTest.cpp

Issue 23576015: Change old PRG to be SkLCGRandom; change new one to SkRandom (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix some spurious SkMWCRandoms Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/Sk64Test.cpp ('k') | tests/UtilsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SortTest.cpp
diff --git a/tests/SortTest.cpp b/tests/SortTest.cpp
index 6bfb300a723c9bb846157beadd1180cde0cf571e..28c6e682deb24e9988563da887cf139109a7e8d7 100644
--- a/tests/SortTest.cpp
+++ b/tests/SortTest.cpp
@@ -15,7 +15,7 @@ extern "C" {
}
}
-static void rand_array(SkMWCRandom& rand, int array[], int n) {
+static void rand_array(SkRandom& rand, int array[], int n) {
for (int j = 0; j < n; j++) {
array[j] = rand.nextS() & 0xFF;
}
@@ -40,7 +40,7 @@ static void TestSort(skiatest::Reporter* reporter) {
/** The random numbers are copied into this array, sorted by an SkSort,
then this array is compared against the reference sort. */
int workingArray[SK_ARRAY_COUNT(randomArray)];
- SkMWCRandom rand;
+ SkRandom rand;
for (int i = 0; i < 10000; i++) {
int count = rand.nextRangeU(1, SK_ARRAY_COUNT(randomArray));
« no previous file with comments | « tests/Sk64Test.cpp ('k') | tests/UtilsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698