Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Unified Diff: tests/Test.cpp

Issue 17414003: Refactor: clean up some unused or mostly-unused API I saw here. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« tests/Test.h ('K') | « tests/Test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Test.cpp
diff --git a/tests/Test.cpp b/tests/Test.cpp
index f8f2e62610e57b1807903c051ade7466471a6e16..81b848eda7dbcc5a04c5ec4e9f4fd314c924b224 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->onReport(desc.c_str(), kFailed);
}
void Reporter::endTest(Test* test) {
@@ -64,7 +64,7 @@ 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 {
@@ -110,7 +110,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);
« tests/Test.h ('K') | « tests/Test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698