| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #ifndef skiatest_Test_DEFINED | 8 #ifndef skiatest_Test_DEFINED |
| 9 #define skiatest_Test_DEFINED | 9 #define skiatest_Test_DEFINED |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 SK_DECLARE_INST_COUNT(Reporter) | 25 SK_DECLARE_INST_COUNT(Reporter) |
| 26 Reporter(); | 26 Reporter(); |
| 27 | 27 |
| 28 int countTests() const { return fTestCount; } | 28 int countTests() const { return fTestCount; } |
| 29 | 29 |
| 30 void startTest(Test*); | 30 void startTest(Test*); |
| 31 void reportFailed(const SkString& desc); | 31 void reportFailed(const SkString& desc); |
| 32 void endTest(Test*); | 32 void endTest(Test*); |
| 33 | 33 |
| 34 virtual bool allowExtendedTest() const { return false; } | 34 virtual bool allowExtendedTest() const { return false; } |
| 35 virtual bool allowThreaded() const { return false; } | |
| 36 virtual bool verbose() const { return false; } | 35 virtual bool verbose() const { return false; } |
| 37 virtual void bumpTestCount() { sk_atomic_inc(&fTestCount); } | 36 virtual void bumpTestCount() { sk_atomic_inc(&fTestCount); } |
| 38 | 37 |
| 39 protected: | 38 protected: |
| 40 virtual void onStart(Test*) {} | 39 virtual void onStart(Test*) {} |
| 41 virtual void onReportFailed(const SkString& desc) {} | 40 virtual void onReportFailed(const SkString& desc) {} |
| 42 virtual void onEnd(Test*) {} | 41 virtual void onEnd(Test*) {} |
| 43 | 42 |
| 44 private: | 43 private: |
| 45 int32_t fTestCount; | 44 int32_t fTestCount; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 } \ | 165 } \ |
| 167 virtual void onRun(Reporter* r) SK_OVERRIDE { \ | 166 virtual void onRun(Reporter* r) SK_OVERRIDE { \ |
| 168 test_##name(r, fGrContextFactory); \ | 167 test_##name(r, fGrContextFactory); \ |
| 169 } \ | 168 } \ |
| 170 }; \ | 169 }; \ |
| 171 static TestRegistry gReg_##name##Class(name##Class::Factory); \ | 170 static TestRegistry gReg_##name##Class(name##Class::Factory); \ |
| 172 } \ | 171 } \ |
| 173 static void test_##name(skiatest::Reporter* reporter, GrContextFactory* fact
ory) | 172 static void test_##name(skiatest::Reporter* reporter, GrContextFactory* fact
ory) |
| 174 | 173 |
| 175 #endif | 174 #endif |
| OLD | NEW |