diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-06-18 20:50:34 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-06-18 20:50:34 +0000 |
commit | 1f7928663f417253f2f75f42625d514dc5f26b9a (patch) | |
tree | efe92adf4f7759e16d3656abc8636475b46f6570 /tests/Test.cpp | |
parent | 7a11591e5e09493f1589c93d53fd1fe10086920a (diff) |
Refactor: clean up some unused or mostly-unused API I saw here.
BUG=
R=bungeman@google.com, reed@google.com
Author: mtklein@google.com
Review URL: https://chromiumcodereview.appspot.com/17414003
git-svn-id: http://skia.googlecode.com/svn/trunk@9668 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/Test.cpp')
-rw-r--r-- | tests/Test.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/Test.cpp b/tests/Test.cpp index f8f2e62610..32c293e40f 100644 --- a/tests/Test.cpp +++ b/tests/Test.cpp @@ -31,8 +31,8 @@ void Reporter::startTest(Test* test) { this->onStart(test); } -void Reporter::report(const char desc[], Result result) { - this->onReport(desc ? desc : "<no description>", result); +void Reporter::reportFailed(const SkString& desc) { + this->onReportFailed(desc); } void Reporter::endTest(Test* test) { @@ -64,13 +64,11 @@ namespace { explicit LocalReporter(Reporter* reporterToMimic) : fReporter(reporterToMimic) {} int failure_size() const { return fFailures.count(); } - const char* failure(int i) const { return fFailures[i].c_str(); } + const SkString& failure(int i) const { return fFailures[i]; } protected: - void onReport(const char desc[], Result result) SK_OVERRIDE { - if (kFailed == result) { - fFailures.push_back().set(desc); - } + void onReportFailed(const SkString& desc) SK_OVERRIDE { + fFailures.push_back(desc); } // Proxy down to fReporter. We assume these calls are threadsafe. @@ -110,7 +108,7 @@ void Test::run() { // Now tell fReporter about any failures and wrap up. for (int i = 0; i < local.failure_size(); i++) { - fReporter->report(local.failure(i), Reporter::kFailed); + fReporter->reportFailed(local.failure(i)); } fReporter->endTest(this); |