aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-30 15:52:46 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-30 15:52:46 +0000
commita6f37e77c1c95f0a06ac55ff659cb7b8dfabefcf (patch)
tree6310645cf497f908894d36bf749e47c53ef5233d /tests
parent06f05989570fbf2ced3d2d1690ea1276b7330b5f (diff)
Add ShouldSkip variant that can read a --match flag directly.
Just seemed like we were going through lots of hoops for this common case. BUG= R=scroggo@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/23708009 git-svn-id: http://skia.googlecode.com/svn/trunk@11034 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/skia_test.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index a2f5e9c47b..7d22ff69ac 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();