gm: add --ignoreTests flag
BUG=skia:1600
R=scroggo@google.com
Review URL: https://codereview.chromium.org/23526065
git-svn-id: http://skia.googlecode.com/svn/trunk@11374 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/flags/SkCommandLineFlags.h b/tools/flags/SkCommandLineFlags.h
index c324a1f..370198b 100644
--- a/tools/flags/SkCommandLineFlags.h
+++ b/tools/flags/SkCommandLineFlags.h
@@ -125,6 +125,18 @@
bool isEmpty() const { return this->count() == 0; }
+ /**
+ * Returns true iff string is equal to one of the strings in this array.
+ */
+ bool contains(const char* string) const {
+ for (int i = 0; i < fStrings.count(); i++) {
+ if (fStrings[i].equals(string)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private:
void reset() { fStrings.reset(); }