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