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

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

Issue 2743423009: Run dartfmt on remaining unformated pkg packages (Closed)
Patch Set: Run dartfmt on remaining unformated pkg packages Created 3 years, 9 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 | « pkg/testing/lib/src/error_handling.dart ('k') | pkg/testing/lib/src/log.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'.";
}
« no previous file with comments | « pkg/testing/lib/src/error_handling.dart ('k') | pkg/testing/lib/src/log.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698