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 "Test.h" | 8 #include "Test.h" |
9 | 9 |
10 #include "SkCommandLineFlags.h" | 10 #include "SkCommandLineFlags.h" |
11 #include "SkError.h" | 11 #include "SkError.h" |
12 #include "SkString.h" | 12 #include "SkString.h" |
13 #include "SkTime.h" | 13 #include "SkTime.h" |
| 14 #if SK_SUPPORT_GPU |
| 15 #include "GrContextFactory.h" |
| 16 #endif |
14 | 17 |
15 DEFINE_string2(tmpDir, t, nullptr, "Temp directory to use."); | 18 DEFINE_string2(tmpDir, t, nullptr, "Temp directory to use."); |
16 | 19 |
17 void skiatest::Reporter::bumpTestCount() {} | 20 void skiatest::Reporter::bumpTestCount() {} |
18 | 21 |
19 bool skiatest::Reporter::allowExtendedTest() const { return false; } | 22 bool skiatest::Reporter::allowExtendedTest() const { return false; } |
20 | 23 |
21 bool skiatest::Reporter::verbose() const { return false; } | 24 bool skiatest::Reporter::verbose() const { return false; } |
22 | 25 |
23 SkString skiatest::Failure::toString() const { | 26 SkString skiatest::Failure::toString() const { |
24 SkString result = SkStringPrintf("%s:%d\t", this->fileName, this->lineNo); | 27 SkString result = SkStringPrintf("%s:%d\t", this->fileName, this->lineNo); |
25 if (!this->message.isEmpty()) { | 28 if (!this->message.isEmpty()) { |
26 result.append(this->message); | 29 result.append(this->message); |
27 if (strlen(this->condition) > 0) { | 30 if (strlen(this->condition) > 0) { |
28 result.append(": "); | 31 result.append(": "); |
29 } | 32 } |
30 } | 33 } |
31 result.append(this->condition); | 34 result.append(this->condition); |
32 return result; | 35 return result; |
33 } | 36 } |
34 | 37 |
35 SkString skiatest::GetTmpDir() { | 38 SkString skiatest::GetTmpDir() { |
36 const char* tmpDir = FLAGS_tmpDir.isEmpty() ? nullptr : FLAGS_tmpDir[0]; | 39 const char* tmpDir = FLAGS_tmpDir.isEmpty() ? nullptr : FLAGS_tmpDir[0]; |
37 return SkString(tmpDir); | 40 return SkString(tmpDir); |
38 } | 41 } |
| 42 |
OLD | NEW |