| OLD | NEW | 
|---|
| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 77 public: | 77 public: | 
| 78     SkTestRunnable(const Test& test, | 78     SkTestRunnable(const Test& test, | 
| 79                    Status* status, | 79                    Status* status, | 
| 80                    GrContextFactory* grContextFactory = NULL) | 80                    GrContextFactory* grContextFactory = NULL) | 
| 81         : fTest(test), fStatus(status), fGrContextFactory(grContextFactory) {} | 81         : fTest(test), fStatus(status), fGrContextFactory(grContextFactory) {} | 
| 82 | 82 | 
| 83   virtual void run() { | 83   virtual void run() { | 
| 84       struct TestReporter : public skiatest::Reporter { | 84       struct TestReporter : public skiatest::Reporter { | 
| 85       public: | 85       public: | 
| 86           TestReporter() : fError(false), fTestCount(0) {} | 86           TestReporter() : fError(false), fTestCount(0) {} | 
| 87           void bumpTestCount() SK_OVERRIDE { ++fTestCount; } | 87           void bumpTestCount() override { ++fTestCount; } | 
| 88           bool allowExtendedTest() const SK_OVERRIDE { | 88           bool allowExtendedTest() const override { | 
| 89               return FLAGS_extendedTest; | 89               return FLAGS_extendedTest; | 
| 90           } | 90           } | 
| 91           bool verbose() const SK_OVERRIDE { return FLAGS_veryVerbose; } | 91           bool verbose() const override { return FLAGS_veryVerbose; } | 
| 92           void reportFailed(const skiatest::Failure& failure) SK_OVERRIDE { | 92           void reportFailed(const skiatest::Failure& failure) override { | 
| 93               SkDebugf("\nFAILED: %s", failure.toString().c_str()); | 93               SkDebugf("\nFAILED: %s", failure.toString().c_str()); | 
| 94               fError = true; | 94               fError = true; | 
| 95           } | 95           } | 
| 96           bool fError; | 96           bool fError; | 
| 97           int fTestCount; | 97           int fTestCount; | 
| 98       } reporter; | 98       } reporter; | 
| 99 | 99 | 
| 100       const SkMSec start = SkTime::GetMSecs(); | 100       const SkMSec start = SkTime::GetMSecs(); | 
| 101       fTest.proc(&reporter, fGrContextFactory); | 101       fTest.proc(&reporter, fGrContextFactory); | 
| 102       SkMSec elapsed = SkTime::GetMSecs() - start; | 102       SkMSec elapsed = SkTime::GetMSecs() - start; | 
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 228     SkDebugf("\n"); | 228     SkDebugf("\n"); | 
| 229     return (status.failCount() == 0) ? 0 : 1; | 229     return (status.failCount() == 0) ? 0 : 1; | 
| 230 } | 230 } | 
| 231 | 231 | 
| 232 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 232 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 
| 233 int main(int argc, char** argv) { | 233 int main(int argc, char** argv) { | 
| 234     SkCommandLineFlags::Parse(argc, argv); | 234     SkCommandLineFlags::Parse(argc, argv); | 
| 235     return test_main(); | 235     return test_main(); | 
| 236 } | 236 } | 
| 237 #endif | 237 #endif | 
| OLD | NEW | 
|---|