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

Side by Side Diff: tests/skia_test.cpp

Issue 1394503003: fix some pathops bugs found in 1M skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init to avoid warning Created 5 years, 2 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/PathOpsTestCommon.h ('k') | tools/pathops_sorter.htm » ('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 2011 Google Inc. 2 * Copyright 2011 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 "CrashHandler.h" 8 #include "CrashHandler.h"
9 #include "OverwriteLine.h" 9 #include "OverwriteLine.h"
10 #include "Resources.h" 10 #include "Resources.h"
(...skipping 12 matching lines...) Expand all
23 #include "GrContext.h" 23 #include "GrContext.h"
24 #include "GrContextFactory.h" 24 #include "GrContextFactory.h"
25 #endif 25 #endif
26 26
27 using namespace skiatest; 27 using namespace skiatest;
28 28
29 DEFINE_bool2(extendedTest, x, false, "run extended tests for pathOps."); 29 DEFINE_bool2(extendedTest, x, false, "run extended tests for pathOps.");
30 30
31 // need to explicitly declare this, or we get some weird infinite loop llist 31 // need to explicitly declare this, or we get some weird infinite loop llist
32 template TestRegistry* TestRegistry::gHead; 32 template TestRegistry* TestRegistry::gHead;
33 void (*gVerboseFinalize)() = nullptr;
33 34
34 // The threads report back to this object when they are done. 35 // The threads report back to this object when they are done.
35 class Status { 36 class Status {
36 public: 37 public:
37 explicit Status(int total) 38 explicit Status(int total)
38 : fDone(0), fTestCount(0), fFailCount(0), fTotal(total) {} 39 : fDone(0), fTestCount(0), fFailCount(0), fTotal(total) {}
39 // Threadsafe. 40 // Threadsafe.
40 void endTest(const char* testName, 41 void endTest(const char* testName,
41 bool success, 42 bool success,
42 SkMSec elapsed, 43 SkMSec elapsed,
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 208 }
208 209
209 // Block until threaded tests finish. 210 // Block until threaded tests finish.
210 cpuTests.wait(); 211 cpuTests.wait();
211 212
212 if (FLAGS_verbose) { 213 if (FLAGS_verbose) {
213 SkDebugf( 214 SkDebugf(
214 "\nFinished %d tests, %d failures, %d skipped. " 215 "\nFinished %d tests, %d failures, %d skipped. "
215 "(%d internal tests)", 216 "(%d internal tests)",
216 toRun, status.failCount(), skipCount, status.testCount()); 217 toRun, status.failCount(), skipCount, status.testCount());
218 if (gVerboseFinalize) {
219 (*gVerboseFinalize)();
220 }
217 } 221 }
218 222
219 SkDebugf("\n"); 223 SkDebugf("\n");
220 return (status.failCount() == 0) ? 0 : 1; 224 return (status.failCount() == 0) ? 0 : 1;
221 } 225 }
222 226
223 #if !defined(SK_BUILD_FOR_IOS) 227 #if !defined(SK_BUILD_FOR_IOS)
224 int main(int argc, char** argv) { 228 int main(int argc, char** argv) {
225 SkCommandLineFlags::Parse(argc, argv); 229 SkCommandLineFlags::Parse(argc, argv);
226 return test_main(); 230 return test_main();
227 } 231 }
228 #endif 232 #endif
OLDNEW
« no previous file with comments | « tests/PathOpsTestCommon.h ('k') | tools/pathops_sorter.htm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698