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

Unified Diff: ppapi/tests/test_case.h

Issue 21833005: Fix PPAPI TestCase so individual tests can be run more than once. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Robustify. Created 7 years, 4 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 | ppapi/tests/test_case.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_case.h
diff --git a/ppapi/tests/test_case.h b/ppapi/tests/test_case.h
index 4491c767f985546061a1f9c6bf0f0a4dc7b5207b..9a3c31f98d88617cea55543622805a2adae995e9 100644
--- a/ppapi/tests/test_case.h
+++ b/ppapi/tests/test_case.h
@@ -224,18 +224,21 @@ class TestCase {
// Var ids that should be ignored when checking for leaks on shutdown.
std::set<int64_t> ignored_leaked_vars_;
- // The tests that were found in test_filter but have not yet been run. The
- // bool indicates whether the test should be run (i.e., it will be false if
- // the test name was prefixed in the test_filter string).
+ // The tests that were found in test_filter. The bool indicates whether the
+ // test should be run (i.e., it will be false if the test name was prefixed in
+ // the test_filter string).
//
- // This is initialized lazily the first time that ShouldRunTest is called by
- // RunTests. When RunTests is finished, this should be empty. Any remaining
- // tests are tests that were listed in the test_filter but didn't match
- // any calls to ShouldRunTest, meaning it was probably a typo. TestingInstance
- // should log this and consider it a failure.
+ // This is initialized lazily the first time that ShouldRunTest is called.
+ std::map<std::string, bool> filter_tests_;
+ // Flag indicating whether we have populated filter_tests_ yet.
+ bool have_populated_filter_tests_;
+ // This is initialized with the contents of filter_tests_. As each test is
+ // run, it is removed from remaining_tests_. When RunTests is finished,
+ // remaining_tests_ should be empty. Any remaining tests are tests that were
+ // listed in the test_filter but didn't match any calls to ShouldRunTest,
+ // meaning it was probably a typo. TestingInstance should log this and
+ // consider it a failure.
std::map<std::string, bool> remaining_tests_;
- // Flag indicating whether we have populated remaining_tests_ yet.
- bool have_populated_remaining_tests_;
// If ShouldRunTest is called but the given test name doesn't match anything
// in the test_filter, the test name will be added here. This allows
« no previous file with comments | « no previous file | ppapi/tests/test_case.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698