Chromium Code Reviews

Side by Side Diff: tests/LListTest.cpp

Issue 23137022: Replace uses of GR_DEBUG by SK_DEBUG. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: include/gpu/ Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« src/gpu/gl/GrGpuGL.cpp ('K') | « tests/HashCacheTest.cpp ('k') | no next file » | 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 20 matching lines...)
31 SK_DEFINE_INST_COUNT(ListElement); 31 SK_DEFINE_INST_COUNT(ListElement);
32 32
33 static void check_list(const SkTInternalLList<ListElement>& list, 33 static void check_list(const SkTInternalLList<ListElement>& list,
34 skiatest::Reporter* reporter, 34 skiatest::Reporter* reporter,
35 bool empty, 35 bool empty,
36 int numElements, 36 int numElements,
37 bool in0, bool in1, bool in2, bool in3, 37 bool in0, bool in1, bool in2, bool in3,
38 ListElement elements[4]) { 38 ListElement elements[4]) {
39 39
40 REPORTER_ASSERT(reporter, empty == list.isEmpty()); 40 REPORTER_ASSERT(reporter, empty == list.isEmpty());
41 #if SK_DEBUG 41 #ifdef SK_DEBUG
42 list.validate(); 42 list.validate();
43 REPORTER_ASSERT(reporter, numElements == list.countEntries()); 43 REPORTER_ASSERT(reporter, numElements == list.countEntries());
44 REPORTER_ASSERT(reporter, in0 == list.isInList(&elements[0])); 44 REPORTER_ASSERT(reporter, in0 == list.isInList(&elements[0]));
45 REPORTER_ASSERT(reporter, in1 == list.isInList(&elements[1])); 45 REPORTER_ASSERT(reporter, in1 == list.isInList(&elements[1]));
46 REPORTER_ASSERT(reporter, in2 == list.isInList(&elements[2])); 46 REPORTER_ASSERT(reporter, in2 == list.isInList(&elements[2]));
47 REPORTER_ASSERT(reporter, in3 == list.isInList(&elements[3])); 47 REPORTER_ASSERT(reporter, in3 == list.isInList(&elements[3]));
48 #endif 48 #endif
49 } 49 }
50 50
51 static void TestTInternalLList(skiatest::Reporter* reporter) { 51 static void TestTInternalLList(skiatest::Reporter* reporter) {
(...skipping 260 matching lines...)
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
« src/gpu/gl/GrGpuGL.cpp ('K') | « tests/HashCacheTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine