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

Unified Diff: tests/MathTest.cpp

Issue 12334131: Change random number generator for tests to SkMWCRandom (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Rebase to latest Created 7 years, 10 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/LListTest.cpp ('k') | tests/MatrixTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MathTest.cpp
===================================================================
--- tests/MathTest.cpp (revision 7902)
+++ tests/MathTest.cpp (working copy)
@@ -173,7 +173,7 @@
REPORTER_ASSERT(reporter, len > 0.999f && len < 1.001f);
}
-static float nextFloat(SkRandom& rand) {
+static float nextFloat(SkMWCRandom& rand) {
SkFloatIntUnion data;
data.fSignBitInt = rand.nextU();
return data.fFloat;
@@ -247,7 +247,7 @@
}
static void unittest_fastfloat(skiatest::Reporter* reporter) {
- SkRandom rand;
+ SkMWCRandom rand;
size_t i;
static const float gFloats[] = {
@@ -368,7 +368,7 @@
REPORTER_ASSERT(reporter, sk_float_copysign(x, y) == expected);
}
- SkRandom rand;
+ SkMWCRandom rand;
for (int j = 0; j < 1000; j++) {
int ix = rand.nextS();
REPORTER_ASSERT(reporter, SkCopySign32(ix, ix) == ix);
@@ -387,7 +387,7 @@
static void TestMath(skiatest::Reporter* reporter) {
int i;
int32_t x;
- SkRandom rand;
+ SkMWCRandom rand;
// these should assert
#if 0
« no previous file with comments | « tests/LListTest.cpp ('k') | tests/MatrixTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698