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

Side by Side Diff: tests/LListTest.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/InfRectTest.cpp ('k') | tests/MathTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkRandom.h" 9 #include "SkRandom.h"
10 #include "SkTInternalLList.h" 10 #include "SkTInternalLList.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 cur = iter.init(list, Iter::kHead_IterStart); 118 cur = iter.init(list, Iter::kHead_IterStart);
119 for (int i = 0; NULL != cur; ++i, cur = iter.next()) { 119 for (int i = 0; NULL != cur; ++i, cur = iter.next()) {
120 REPORTER_ASSERT(reporter, cur->fID == i); 120 REPORTER_ASSERT(reporter, cur->fID == i);
121 } 121 }
122 } 122 }
123 123
124 static void TestTLList(skiatest::Reporter* reporter) { 124 static void TestTLList(skiatest::Reporter* reporter) {
125 typedef SkTLList<ListElement> ElList; 125 typedef SkTLList<ListElement> ElList;
126 typedef ElList::Iter Iter; 126 typedef ElList::Iter Iter;
127 SkMWCRandom random; 127 SkRandom random;
128 128
129 for (int i = 1; i <= 16; i *= 2) { 129 for (int i = 1; i <= 16; i *= 2) {
130 130
131 ElList list1(i); 131 ElList list1(i);
132 ElList list2(i); 132 ElList list2(i);
133 Iter iter1; 133 Iter iter1;
134 Iter iter2; 134 Iter iter2;
135 Iter iter3; 135 Iter iter3;
136 Iter iter4; 136 Iter iter4;
137 137
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 } 313 }
314 314
315 static void test_llists(skiatest::Reporter* reporter) { 315 static void test_llists(skiatest::Reporter* reporter) {
316 TestTInternalLList(reporter); 316 TestTInternalLList(reporter);
317 TestTLList(reporter); 317 TestTLList(reporter);
318 } 318 }
319 319
320 #include "TestClassDef.h" 320 #include "TestClassDef.h"
321 DEFINE_TESTCLASS("LList", TestLListClass, test_llists) 321 DEFINE_TESTCLASS("LList", TestLListClass, test_llists)
OLDNEW
« no previous file with comments | « tests/InfRectTest.cpp ('k') | tests/MathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698