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; } |
35 virtual bool verbose() const { return false; } | 36 virtual bool verbose() const { return false; } |
36 virtual void bumpTestCount() { sk_atomic_inc(&fTestCount); } | 37 virtual void bumpTestCount() { sk_atomic_inc(&fTestCount); } |
37 | 38 |
38 protected: | 39 protected: |
39 virtual void onStart(Test*) {} | 40 virtual void onStart(Test*) {} |
40 virtual void onReportFailed(const SkString& desc) {} | 41 virtual void onReportFailed(const SkString& desc) {} |
41 virtual void onEnd(Test*) {} | 42 virtual void onEnd(Test*) {} |
42 | 43 |
43 private: | 44 private: |
44 int32_t fTestCount; | 45 int32_t fTestCount; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 } \ | 166 } \ |
166 virtual void onRun(Reporter* r) SK_OVERRIDE { \ | 167 virtual void onRun(Reporter* r) SK_OVERRIDE { \ |
167 test_##name(r, fGrContextFactory); \ | 168 test_##name(r, fGrContextFactory); \ |
168 } \ | 169 } \ |
169 }; \ | 170 }; \ |
170 static TestRegistry gReg_##name##Class(name##Class::Factory); \ | 171 static TestRegistry gReg_##name##Class(name##Class::Factory); \ |
171 } \ | 172 } \ |
172 static void test_##name(skiatest::Reporter* reporter, GrContextFactory* fact
ory) | 173 static void test_##name(skiatest::Reporter* reporter, GrContextFactory* fact
ory) |
173 | 174 |
174 #endif | 175 #endif |
OLD | NEW |