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

Unified Diff: tests/corelib/splay_tree_from_iterable_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
Index: tests/corelib/splay_tree_from_iterable_test.dart
diff --git a/tests/corelib/splay_tree_from_iterable_test.dart b/tests/corelib/splay_tree_from_iterable_test.dart
index b4c3b8e8ac3ae793788230be440a57904b32c68f..c60293a1eed5a7bd9a33d3d124b0eec40cc59b92 100644
--- a/tests/corelib/splay_tree_from_iterable_test.dart
+++ b/tests/corelib/splay_tree_from_iterable_test.dart
@@ -109,7 +109,8 @@ void equalElementsTest() {
}
void genericTypeTest() {
- var map = new SplayTreeMap<int, String>.fromIterable([1, 2, 3], value: (x) => '$x');
+ var map =
+ new SplayTreeMap<int, String>.fromIterable([1, 2, 3], value: (x) => '$x');
Expect.isTrue(map is Map<int, String>);
Expect.isTrue(map is SplayTreeMap<int, String>);
@@ -130,38 +131,33 @@ void typedTest() {
Function id = (int i) => i;
Expect.throws(() {
- new SplayTreeMap<String,bool>.fromIterable(<int>[1, 2, 3],
- key: key
- // No "value" map, defaults to identity, which returns int, not bool.
- );
+ new SplayTreeMap<String, bool>.fromIterable(<int>[1, 2, 3], key: key
+ // No "value" map, defaults to identity, which returns int, not bool.
+ );
});
Expect.throws(() {
- new SplayTreeMap<String,bool>.fromIterable(<int>[1, 2, 3],
- // No "key" map, defaults to identity, which returns int, not String.
- value: value
- );
+ new SplayTreeMap<String, bool>.fromIterable(<int>[1, 2, 3],
+ // No "key" map, defaults to identity, which returns int, not String.
+ value: value);
});
Expect.throws(() {
- new SplayTreeMap<String,bool>.fromIterable(<int>[1, 2, 3],
- key: id, // wrong type.
- value: value
- );
+ new SplayTreeMap<String, bool>.fromIterable(<int>[1, 2, 3],
+ key: id, // wrong type.
+ value: value);
});
Expect.throws(() {
- new SplayTreeMap<String,bool>.fromIterable(<int>[1, 2, 3],
- key: key,
- value: id // wrong type.
- );
+ new SplayTreeMap<String, bool>.fromIterable(<int>[1, 2, 3],
+ key: key, value: id // wrong type.
+ );
});
// But it works with explicit types when used correctly.
- SplayTreeMap<String, bool> map =
- new SplayTreeMap<String, bool>.fromIterable(<int>[1, 2, 3],
- key: key,
- value: value);
+ SplayTreeMap<String, bool> map = new SplayTreeMap<String, bool>.fromIterable(
+ <int>[1, 2, 3],
+ key: key, value: value);
Iterable<String> keys = map.keys;
Iterable<bool> values = map.values;
List<String> keyList = keys.toList();

Powered by Google App Engine
This is Rietveld 408576698