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

Side by Side Diff: tests/skia_test.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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/Test.cpp ('k') | tools/CopyTilesRenderer.h » ('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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 private: 49 private:
50 const TestRegistry* fReg; 50 const TestRegistry* fReg;
51 }; 51 };
52 52
53 class DebugfReporter : public Reporter { 53 class DebugfReporter : public Reporter {
54 public: 54 public:
55 explicit DebugfReporter(int total) : fDone(0), fTotal(total) {} 55 explicit DebugfReporter(int total) : fDone(0), fTotal(total) {}
56 56
57 virtual bool allowExtendedTest() const SK_OVERRIDE { return FLAGS_extendedTe st; } 57 bool allowExtendedTest() const SK_OVERRIDE { return FLAGS_extendedTest; }
58 virtual bool verbose() const SK_OVERRIDE { return FLAGS_veryVerbos e; } 58 bool verbose() const SK_OVERRIDE { return FLAGS_veryVerbose; }
59 59
60 protected: 60 protected:
61 virtual void onReportFailed(const skiatest::Failure& failure) SK_OVERRIDE { 61 void onReportFailed(const skiatest::Failure& failure) SK_OVERRIDE {
62 SkString desc; 62 SkString desc;
63 failure.getFailureString(&desc); 63 failure.getFailureString(&desc);
64 SkDebugf("\nFAILED: %s", desc.c_str()); 64 SkDebugf("\nFAILED: %s", desc.c_str());
65 } 65 }
66 66
67 virtual void onEnd(Test* test) SK_OVERRIDE { 67 void onEnd(Test* test) SK_OVERRIDE {
68 const int done = 1 + sk_atomic_inc(&fDone); 68 const int done = 1 + sk_atomic_inc(&fDone);
69 69
70 if (!test->passed()) { 70 if (!test->passed()) {
71 SkDebugf("\n---- %s FAILED", test->getName()); 71 SkDebugf("\n---- %s FAILED", test->getName());
72 } 72 }
73 73
74 SkString prefix(kSkOverwriteLine); 74 SkString prefix(kSkOverwriteLine);
75 SkString time; 75 SkString time;
76 if (FLAGS_verbose) { 76 if (FLAGS_verbose) {
77 prefix.printf("\n"); 77 prefix.printf("\n");
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 SkDebugf("\n"); 217 SkDebugf("\n");
218 return (failCount == 0) ? 0 : 1; 218 return (failCount == 0) ? 0 : 1;
219 } 219 }
220 220
221 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 221 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
222 int main(int argc, char** argv) { 222 int main(int argc, char** argv) {
223 SkCommandLineFlags::Parse(argc, argv); 223 SkCommandLineFlags::Parse(argc, argv);
224 return test_main(); 224 return test_main();
225 } 225 }
226 #endif 226 #endif
OLDNEW
« no previous file with comments | « tests/Test.cpp ('k') | tools/CopyTilesRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698