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 #include "Test.h" | 8 #include "Test.h" |
9 | 9 |
10 #include "SkCommandLineFlags.h" | 10 #include "SkCommandLineFlags.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #endif | 21 #endif |
22 | 22 |
23 DEFINE_string2(tmpDir, t, NULL, "tmp directory for tests to use."); | 23 DEFINE_string2(tmpDir, t, NULL, "tmp directory for tests to use."); |
24 | 24 |
25 using namespace skiatest; | 25 using namespace skiatest; |
26 | 26 |
27 Reporter::Reporter() : fTestCount(0) { | 27 Reporter::Reporter() : fTestCount(0) { |
28 } | 28 } |
29 | 29 |
30 void Reporter::startTest(Test* test) { | 30 void Reporter::startTest(Test* test) { |
31 this->bumpTestCount(); | |
32 this->onStart(test); | 31 this->onStart(test); |
33 } | 32 } |
34 | 33 |
35 void Reporter::reportFailed(const SkString& desc) { | 34 void Reporter::reportFailed(const SkString& desc) { |
36 this->onReportFailed(desc); | 35 this->onReportFailed(desc); |
37 } | 36 } |
38 | 37 |
39 void Reporter::endTest(Test* test) { | 38 void Reporter::endTest(Test* test) { |
40 this->onEnd(test); | 39 this->onEnd(test); |
41 } | 40 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 const char* tmpDir = FLAGS_tmpDir.isEmpty() ? NULL : FLAGS_tmpDir[0]; | 120 const char* tmpDir = FLAGS_tmpDir.isEmpty() ? NULL : FLAGS_tmpDir[0]; |
122 return SkString(tmpDir); | 121 return SkString(tmpDir); |
123 } | 122 } |
124 | 123 |
125 static const char* gResourcePath = NULL; | 124 static const char* gResourcePath = NULL; |
126 void Test::SetResourcePath(const char* resourcePath) { gResourcePath = resourceP
ath; } | 125 void Test::SetResourcePath(const char* resourcePath) { gResourcePath = resourceP
ath; } |
127 | 126 |
128 SkString Test::GetResourcePath() { | 127 SkString Test::GetResourcePath() { |
129 return SkString(gResourcePath); | 128 return SkString(gResourcePath); |
130 } | 129 } |
OLD | NEW |