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

Side by Side Diff: tests/GrOrderedSetTest.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/GrContextFactoryTest.cpp ('k') | tests/GrRedBlackTreeTest.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 #include "SkRandom.h" 8 #include "SkRandom.h"
9 #include "Test.h" 9 #include "Test.h"
10 // This is a GPU-backend specific test 10 // This is a GPU-backend specific test
11 #if SK_SUPPORT_GPU 11 #if SK_SUPPORT_GPU
12 #include "GrOrderedSet.h" 12 #include "GrOrderedSet.h"
13 13
14 typedef GrOrderedSet<int> Set; 14 typedef GrOrderedSet<int> Set;
15 typedef GrOrderedSet<const char*, GrStrLess> Set2; 15 typedef GrOrderedSet<const char*, GrStrLess> Set2;
16 16
17 DEF_TEST(GrOrderedSetTest, reporter) { 17 DEF_TEST(GrOrderedSet, reporter) {
18 Set set; 18 Set set;
19 19
20 REPORTER_ASSERT(reporter, set.empty()); 20 REPORTER_ASSERT(reporter, set.empty());
21 21
22 SkRandom r; 22 SkRandom r;
23 23
24 int count[1000] = {0}; 24 int count[1000] = {0};
25 // add 10K ints 25 // add 10K ints
26 for (int i = 0; i < 10000; ++i) { 26 for (int i = 0; i < 10000; ++i) {
27 int x = r.nextU() % 1000; 27 int x = r.nextU() % 1000;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 set2.remove(set2.find("ant")); 141 set2.remove(set2.find("ant"));
142 REPORTER_ASSERT(reporter, set2.find("ant") == set2.end()); 142 REPORTER_ASSERT(reporter, set2.find("ant") == set2.end());
143 REPORTER_ASSERT(reporter, set2.count() == 3); 143 REPORTER_ASSERT(reporter, set2.count() == 3);
144 144
145 set2.reset(); 145 set2.reset();
146 REPORTER_ASSERT(reporter, set2.empty()); 146 REPORTER_ASSERT(reporter, set2.empty());
147 } 147 }
148 148
149 #endif 149 #endif
OLDNEW
« no previous file with comments | « tests/GrContextFactoryTest.cpp ('k') | tests/GrRedBlackTreeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698