Always pass a function to BooleanSelector.evaluate (#1125)

Prepare for a potential breaking change in `package:boolean_selector`.
Currently the `evaluate` method takes an argument which is either an
`Iterable<String>` or a `bool Function(String)` which matches the
`.toSet()contains` tearoff on that Iterable. We might tighten that to
always take a `bool Function(String)` since the tearoff is easy to
handle at the calling side.
diff --git a/pkgs/test_api/lib/src/backend/metadata.dart b/pkgs/test_api/lib/src/backend/metadata.dart
index 58e4f5a..744e9cc 100644
--- a/pkgs/test_api/lib/src/backend/metadata.dart
+++ b/pkgs/test_api/lib/src/backend/metadata.dart
@@ -172,7 +172,7 @@
     // doing it for every test individually.
     var empty = Metadata._();
     var merged = forTag.keys.toList().fold(empty, (Metadata merged, selector) {
-      if (!selector.evaluate(tags)) return merged;
+      if (!selector.evaluate(tags.contains)) return merged;
       return merged.merge(forTag.remove(selector));
     });
 
diff --git a/pkgs/test_core/lib/src/runner.dart b/pkgs/test_core/lib/src/runner.dart
index 9a9f9f9..037a7cb 100644
--- a/pkgs/test_core/lib/src/runner.dart
+++ b/pkgs/test_core/lib/src/runner.dart
@@ -261,12 +261,12 @@
           }
 
           // If the user provided tags, skip tests that don't match all of them.
-          if (!suite.config.includeTags.evaluate(test.metadata.tags)) {
+          if (!suite.config.includeTags.evaluate(test.metadata.tags.contains)) {
             return false;
           }
 
           // Skip tests that do match any tags the user wants to exclude.
-          if (suite.config.excludeTags.evaluate(test.metadata.tags)) {
+          if (suite.config.excludeTags.evaluate(test.metadata.tags.contains)) {
             return false;
           }
 
diff --git a/pkgs/test_core/lib/src/runner/loader.dart b/pkgs/test_core/lib/src/runner/loader.dart
index d21e26c..cdc64c8 100644
--- a/pkgs/test_core/lib/src/runner/loader.dart
+++ b/pkgs/test_core/lib/src/runner/loader.dart
@@ -179,7 +179,8 @@
       return;
     }
 
-    if (_config.suiteDefaults.excludeTags.evaluate(suiteConfig.metadata.tags)) {
+    if (_config.suiteDefaults.excludeTags
+        .evaluate(suiteConfig.metadata.tags.contains)) {
       return;
     }
 
diff --git a/pkgs/test_core/lib/src/runner/suite.dart b/pkgs/test_core/lib/src/runner/suite.dart
index d88c992..233dc72 100644
--- a/pkgs/test_core/lib/src/runner/suite.dart
+++ b/pkgs/test_core/lib/src/runner/suite.dart
@@ -364,7 +364,7 @@
     // Otherwise, resolve the tag-specific components.
     var newTags = Map<BooleanSelector, SuiteConfiguration>.from(tags);
     var merged = tags.keys.fold(empty, (SuiteConfiguration merged, selector) {
-      if (!selector.evaluate(_metadata.tags)) return merged;
+      if (!selector.evaluate(_metadata.tags.contains)) return merged;
       return merged.merge(newTags.remove(selector));
     });