diff options
author | tfarina <tfarina@chromium.org> | 2014-06-09 12:05:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-06-09 12:05:34 -0700 |
commit | 880914c35c8f7fc2e9c57134134c883baf66e538 (patch) | |
tree | 5170dfdcc9002502d25fa5b45723e7a04cd96c3d /tests | |
parent | 4d517fdbb145cb95e5e935470df331e1b6667cfc (diff) |
Reland "Clean up Test's resourcePath code."
This relands commit 91359bed48bc006a4319da86eb26db3b2e6d4afb (Clean up
Test's resourcePath code."
BUG=None
TEST=make dm && out/Debug/dm
R=mtklein@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/321723002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Test.cpp | 9 | ||||
-rw-r--r-- | tests/Test.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/Test.cpp b/tests/Test.cpp index e57427a354..b904d5a76d 100644 --- a/tests/Test.cpp +++ b/tests/Test.cpp @@ -1,10 +1,10 @@ - /* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + #include "Test.h" #include "SkCommandLineFlags.h" @@ -41,6 +41,8 @@ void Reporter::endTest(Test* test) { /////////////////////////////////////////////////////////////////////////////// +const char* Test::gResourcePath; + Test::Test() : fReporter(NULL), fPassed(true) {} Test::~Test() { @@ -121,8 +123,9 @@ SkString Test::GetTmpDir() { return SkString(tmpDir); } -static const char* gResourcePath = NULL; -void Test::SetResourcePath(const char* resourcePath) { gResourcePath = resourcePath; } +void Test::SetResourcePath(const char* resourcePath) { + gResourcePath = resourcePath; +} SkString Test::GetResourcePath() { return SkString(gResourcePath); diff --git a/tests/Test.h b/tests/Test.h index 4d2cf2b639..90d072ef66 100644 --- a/tests/Test.h +++ b/tests/Test.h @@ -73,6 +73,8 @@ namespace skiatest { virtual void onRun(Reporter*) = 0; private: + static const char* gResourcePath; + Reporter* fReporter; SkString fName; bool fPassed; |