Index: pkg/testing/lib/src/expectation.dart |
diff --git a/pkg/testing/lib/src/expectation.dart b/pkg/testing/lib/src/expectation.dart |
index 0900c525a475527ec761fd4015d66dd7b189cbb9..642ca220e214cd0f304180f07779776a21818ab3 100644 |
--- a/pkg/testing/lib/src/expectation.dart |
+++ b/pkg/testing/lib/src/expectation.dart |
@@ -38,26 +38,26 @@ class Expectation { |
} |
class ExpectationSet { |
- static const ExpectationSet Default = const ExpectationSet( |
- const <String, Expectation>{ |
- "pass": Expectation.Pass, |
- "crash": Expectation.Crash, |
- "timeout": Expectation.Timeout, |
- "fail": Expectation.Fail, |
- "skip": Expectation.Skip, |
- "missingcompiletimeerror": |
- const Expectation("MissingCompileTimeError", ExpectationGroup.Fail), |
- "missingruntimeerror": |
- const Expectation("MissingRuntimeError", ExpectationGroup.Fail), |
- }); |
+ static const ExpectationSet Default = |
+ const ExpectationSet(const <String, Expectation>{ |
+ "pass": Expectation.Pass, |
+ "crash": Expectation.Crash, |
+ "timeout": Expectation.Timeout, |
+ "fail": Expectation.Fail, |
+ "skip": Expectation.Skip, |
+ "missingcompiletimeerror": |
+ const Expectation("MissingCompileTimeError", ExpectationGroup.Fail), |
+ "missingruntimeerror": |
+ const Expectation("MissingRuntimeError", ExpectationGroup.Fail), |
+ }); |
final Map<String, Expectation> internalMap; |
const ExpectationSet(this.internalMap); |
- operator[] (String name) { |
- return internalMap[name.toLowerCase()] |
- ?? (throw "No expectation named: '$name'."); |
+ operator [](String name) { |
+ return internalMap[name.toLowerCase()] ?? |
+ (throw "No expectation named: '$name'."); |
} |
factory ExpectationSet.fromJsonList(List data) { |
@@ -108,12 +108,18 @@ enum ExpectationGroup { |
ExpectationGroup groupFromString(String name) { |
switch (name) { |
- case "Crash": return ExpectationGroup.Crash; |
- case "Fail": return ExpectationGroup.Fail; |
- case "Meta": return ExpectationGroup.Meta; |
- case "Pass": return ExpectationGroup.Pass; |
- case "Skip": return ExpectationGroup.Skip; |
- case "Timeout": return ExpectationGroup.Timeout; |
+ case "Crash": |
+ return ExpectationGroup.Crash; |
+ case "Fail": |
+ return ExpectationGroup.Fail; |
+ case "Meta": |
+ return ExpectationGroup.Meta; |
+ case "Pass": |
+ return ExpectationGroup.Pass; |
+ case "Skip": |
+ return ExpectationGroup.Skip; |
+ case "Timeout": |
+ return ExpectationGroup.Timeout; |
default: |
throw "Unrecognized group: '$name'."; |
} |