Index: pkg/scheduled_test/lib/src/descriptor/pattern_descriptor.dart |
diff --git a/pkg/scheduled_test/lib/src/descriptor/pattern_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/pattern_descriptor.dart |
index 32af689fae2d5cb7cc62b9be0f003f5a51a42300..7039639221968f44e789c5e917fb31a1eeb3b65a 100644 |
--- a/pkg/scheduled_test/lib/src/descriptor/pattern_descriptor.dart |
+++ b/pkg/scheduled_test/lib/src/descriptor/pattern_descriptor.dart |
@@ -55,7 +55,7 @@ class PatternDescriptor extends Descriptor { |
matchingEntries.sort(); |
if (matchingEntries.isEmpty) { |
- throw "No entry found in '$parent' matching ${_patternDescription}."; |
+ fail("No entry found in '$parent' matching ${_patternDescription}."); |
} |
return Future.wait(matchingEntries.map((entry) { |
@@ -76,9 +76,9 @@ class PatternDescriptor extends Descriptor { |
return prefixLines(result.last, firstPrefix: '* ', prefix: ' '); |
}).join('\n'); |
- throw "Multiple valid entries found in '$parent' matching " |
- "$_patternDescription:\n" |
- "$resultString"; |
+ fail("Multiple valid entries found in '$parent' matching " |
+ "$_patternDescription:\n" |
+ "$resultString"); |
} |
// If no entries matching [pattern] validated, that's also bad. |
@@ -91,9 +91,9 @@ class PatternDescriptor extends Descriptor { |
firstPrefix: '* ', prefix: ' '); |
}).join('\n'); |
- throw "No valid entries found in '$parent' matching " |
- "$_patternDescription:\n" |
- "$resultString"; |
+ fail("No valid entries found in '$parent' matching " |
+ "$_patternDescription:\n" |
+ "$resultString"); |
}); |
} |