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

Unified Diff: tests/Test.cpp

Issue 13849013: Unbreak -z. The LocalReporter shim layer was forcing the pathops options back to defaults. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: explicit Created 7 years, 8 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
« no previous file with comments | « no previous file | tests/skia_test.cpp » ('j') | 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 408e14f6917479c2dd07a472fdd6b47751430922..440a2fc366d8061d877d1b49234ceccd762860bb 100644
--- a/tests/Test.cpp
+++ b/tests/Test.cpp
@@ -59,7 +59,7 @@ const char* Test::getName() {
namespace {
class LocalReporter : public Reporter {
public:
- LocalReporter() {}
+ explicit LocalReporter(const Reporter& reporterToMimic) : fReporter(reporterToMimic) {}
int failure_size() const { return fFailures.count(); }
const char* failure(int i) const { return fFailures[i].c_str(); }
@@ -71,7 +71,16 @@ namespace {
}
}
+ virtual bool allowExtendedTest() const SK_OVERRIDE {
+ return fReporter.allowExtendedTest();
+ }
+
+ virtual bool allowThreaded() const SK_OVERRIDE {
+ return fReporter.allowThreaded();
+ }
+
private:
+ const Reporter& fReporter;
SkTArray<SkString> fFailures;
};
} // namespace
@@ -82,7 +91,7 @@ void Test::run() {
// Run the test into a LocalReporter so we know if it's passed or failed without interference
// from other tests that might share fReporter.
- LocalReporter local;
+ LocalReporter local(*fReporter);
this->onRun(&local);
fPassed = local.failure_size() == 0;
« no previous file with comments | « no previous file | tests/skia_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698