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

Unified Diff: pkg/testing/lib/src/run_tests.dart

Issue 2622383003: Add general method for comma separated options. (Closed)
Patch Set: Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/testing/lib/src/run_tests.dart
diff --git a/pkg/testing/lib/src/run_tests.dart b/pkg/testing/lib/src/run_tests.dart
index f351f678d5397008c765ea70e89e545c6a329fab..937e1eafdcf63a79668b0ec7bc63b136bca1d6d7 100644
--- a/pkg/testing/lib/src/run_tests.dart
+++ b/pkg/testing/lib/src/run_tests.dart
@@ -49,9 +49,10 @@ class CommandLine {
bool get verbose => options.contains("--verbose") || options.contains("-v");
- Set<String> get skip {
+ Set<String> get skip => commaSeparated("--skip=");
+
+ Set<String> commaSeparated(String prefix) {
return options.expand((String s) {
- const String prefix = "--skip=";
if (!s.startsWith(prefix)) return const [];
s = s.substring(prefix.length);
return s.split(",");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698