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

Unified Diff: tests/skia_test.cpp

Issue 23708009: Add ShouldSkip variant that can read a --match flag directly. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: reupload 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 | « gm/gmmain.cpp ('k') | tools/flags/SkCommandLineFlags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/skia_test.cpp
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index a2f5e9c47b03df09b04862d6da8dc11b186f1a40..7d22ff69acbb541956e8815fae1b977351283816 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -208,15 +208,10 @@ int tool_main(int argc, char** argv) {
int toRun = 0;
Test* test;
- SkTDArray<const char*> matchStrs;
- for(int i = 0; i < FLAGS_match.count(); ++i) {
- matchStrs.push(FLAGS_match[i]);
- }
-
while ((test = iter.next()) != NULL) {
SkAutoTDelete<Test> owned(test);
- if(!SkCommandLineFlags::ShouldSkip(matchStrs, test->getName())) {
+ if(!SkCommandLineFlags::ShouldSkip(FLAGS_match, test->getName())) {
toRun++;
}
total++;
@@ -232,7 +227,7 @@ int tool_main(int argc, char** argv) {
SkTArray<Test*> unsafeTests; // Always passes ownership to an SkTestRunnable
for (int i = 0; i < total; i++) {
SkAutoTDelete<Test> test(iter.next());
- if (SkCommandLineFlags::ShouldSkip(matchStrs, test->getName())) {
+ if (SkCommandLineFlags::ShouldSkip(FLAGS_match, test->getName())) {
++skipCount;
} else if (!test->isThreadsafe()) {
unsafeTests.push_back() = test.detach();
« no previous file with comments | « gm/gmmain.cpp ('k') | tools/flags/SkCommandLineFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698