| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 89           TestReporter() : fStats(nullptr), fError(false), fTestCount(0) {} | 89           TestReporter() : fStats(nullptr), fError(false), fTestCount(0) {} | 
| 90           void bumpTestCount() override { ++fTestCount; } | 90           void bumpTestCount() override { ++fTestCount; } | 
| 91           bool allowExtendedTest() const override { | 91           bool allowExtendedTest() const override { | 
| 92               return FLAGS_extendedTest; | 92               return FLAGS_extendedTest; | 
| 93           } | 93           } | 
| 94           bool verbose() const override { return FLAGS_veryVerbose; } | 94           bool verbose() const override { return FLAGS_veryVerbose; } | 
| 95           void reportFailed(const skiatest::Failure& failure) override { | 95           void reportFailed(const skiatest::Failure& failure) override { | 
| 96               SkDebugf("\nFAILED: %s", failure.toString().c_str()); | 96               SkDebugf("\nFAILED: %s", failure.toString().c_str()); | 
| 97               fError = true; | 97               fError = true; | 
| 98           } | 98           } | 
| 99           void* stats() { return fStats; } | 99           void* stats() const override { return fStats; } | 
| 100           void* fStats; | 100           void* fStats; | 
| 101           bool fError; | 101           bool fError; | 
| 102           int fTestCount; | 102           int fTestCount; | 
| 103       } reporter; | 103       } reporter; | 
| 104 | 104 | 
| 105       const Timer timer; | 105       const Timer timer; | 
| 106       fTest.proc(&reporter, fGrContextFactory); | 106       fTest.proc(&reporter, fGrContextFactory); | 
| 107       SkMSec elapsed = timer.elapsedMsInt(); | 107       SkMSec elapsed = timer.elapsedMsInt(); | 
| 108       if (reporter.fError) { | 108       if (reporter.fError) { | 
| 109           fStatus->reportFailure(); | 109           fStatus->reportFailure(); | 
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 233 | 233 | 
| 234     return (status.failCount() == 0) ? 0 : 1; | 234     return (status.failCount() == 0) ? 0 : 1; | 
| 235 } | 235 } | 
| 236 | 236 | 
| 237 #if !defined(SK_BUILD_FOR_IOS) | 237 #if !defined(SK_BUILD_FOR_IOS) | 
| 238 int main(int argc, char** argv) { | 238 int main(int argc, char** argv) { | 
| 239     SkCommandLineFlags::Parse(argc, argv); | 239     SkCommandLineFlags::Parse(argc, argv); | 
| 240     return test_main(); | 240     return test_main(); | 
| 241 } | 241 } | 
| 242 #endif | 242 #endif | 
| OLD | NEW | 
|---|