aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Test.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-22 17:35:55 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-22 17:35:55 +0000
commite1c5429027f95cc0b99d1fb28e93deae31f11b78 (patch)
treed83274aa87b6f90d62f4db762517349d0f93b66e /tests/Test.cpp
parent0506b9d7d531fdfc9536895481d789a48626a86b (diff)
Unbreak -z. The LocalReporter shim layer was forcing the pathops options back to defaults.
BUG= R=caryclark@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/13849013 git-svn-id: http://skia.googlecode.com/svn/trunk@8804 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/Test.cpp')
-rw-r--r--tests/Test.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/Test.cpp b/tests/Test.cpp
index 81c4ef9807..07db96953e 100644
--- a/tests/Test.cpp
+++ b/tests/Test.cpp
@@ -60,7 +60,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(); }
@@ -72,7 +72,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
@@ -84,7 +93,7 @@ void Test::run() {
const SkMSec start = SkTime::GetMSecs();
// 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;
fElapsed = SkTime::GetMSecs() - start;