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

Side by Side Diff: tests/GrRedBlackTreeTest.cpp

Issue 345753007: Preprend Test to test function name generated by DEF_TEST() macro. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: test_ Created 6 years, 6 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
« no previous file with comments | « tests/GrOrderedSetTest.cpp ('k') | tests/GrSurfaceTest.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 2014 Google Inc. 2 * Copyright 2014 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 // This is a GPU-backend specific test 8 // This is a GPU-backend specific test
9 #if SK_SUPPORT_GPU 9 #if SK_SUPPORT_GPU
10 10
11 #include "GrRedBlackTree.h" 11 #include "GrRedBlackTree.h"
12 #include "SkRandom.h" 12 #include "SkRandom.h"
13 #include "Test.h" 13 #include "Test.h"
14 14
15 typedef GrRedBlackTree<int> Tree; 15 typedef GrRedBlackTree<int> Tree;
16 16
17 DEF_TEST(GrRedBlackTreeTest, reporter) { 17 DEF_TEST(GrRedBlackTree, reporter) {
18 Tree tree; 18 Tree tree;
19 19
20 SkRandom r; 20 SkRandom r;
21 21
22 int count[100] = {0}; 22 int count[100] = {0};
23 // add 10K ints 23 // add 10K ints
24 for (int i = 0; i < 10000; ++i) { 24 for (int i = 0; i < 10000; ++i) {
25 int x = r.nextU() % 100; 25 int x = r.nextU() % 100;
26 Tree::Iter xi = tree.insert(x); 26 Tree::Iter xi = tree.insert(x);
27 REPORTER_ASSERT(reporter, *xi == x); 27 REPORTER_ASSERT(reporter, *xi == x);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // remove all entries 176 // remove all entries
177 while (!tree.empty()) { 177 while (!tree.empty()) {
178 tree.remove(tree.begin()); 178 tree.remove(tree.begin());
179 } 179 }
180 180
181 // test reset on empty tree. 181 // test reset on empty tree.
182 tree.reset(); 182 tree.reset();
183 } 183 }
184 184
185 #endif 185 #endif
OLDNEW
« no previous file with comments | « tests/GrOrderedSetTest.cpp ('k') | tests/GrSurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698