Index: tests/corelib_strong/list_insert_test.dart |
diff --git a/tests/corelib_strong/list_insert_test.dart b/tests/corelib_strong/list_insert_test.dart |
index 50d088fc277a660ead3e40937fd96ec8f7bd5341..1efaafb19e97484f4e2e5fb433b237df404143f2 100644 |
--- a/tests/corelib_strong/list_insert_test.dart |
+++ b/tests/corelib_strong/list_insert_test.dart |
@@ -10,7 +10,9 @@ class MyList extends ListBase { |
MyList(this.list); |
get length => list.length; |
- set length(val) { list.length = val; } |
+ set length(val) { |
+ list.length = val; |
+ } |
operator [](index) => list[index]; |
operator []=(index, val) => list[index] = val; |
@@ -24,15 +26,21 @@ void testModifiableList(l1) { |
assert(checkedMode = true); |
// Index must be integer and in range. |
- Expect.throws(() { l1.insert(-1, 5); }, |
- (e) => e is RangeError, |
- "negative"); |
- Expect.throws(() { l1.insert(6, 5); }, |
- (e) => e is RangeError, |
- "too large"); |
- Expect.throws(() { l1.insert(null, 5); }); |
- Expect.throws(() { l1.insert("1", 5); }); |
- Expect.throws(() { l1.insert(1.5, 5); }); |
+ Expect.throws(() { |
+ l1.insert(-1, 5); |
+ }, (e) => e is RangeError, "negative"); |
+ Expect.throws(() { |
+ l1.insert(6, 5); |
+ }, (e) => e is RangeError, "too large"); |
+ Expect.throws(() { |
+ l1.insert(null, 5); |
+ }); |
+ Expect.throws(() { |
+ l1.insert("1", 5); |
+ }); |
+ Expect.throws(() { |
+ l1.insert(1.5, 5); |
+ }); |
l1.insert(5, 5); |
Expect.equals(6, l1.length); |
@@ -53,15 +61,15 @@ void main() { |
// Fixed size list. |
var l2 = new List(5); |
for (var i = 0; i < 5; i++) l2[i] = i; |
- Expect.throws(() { l2.insert(2, 5); }, |
- (e) => e is UnsupportedError, |
- "fixed-length"); |
+ Expect.throws(() { |
+ l2.insert(2, 5); |
+ }, (e) => e is UnsupportedError, "fixed-length"); |
// Unmodifiable list. |
var l3 = const [0, 1, 2, 3, 4]; |
- Expect.throws(() { l3.insert(2, 5); }, |
- (e) => e is UnsupportedError, |
- "unmodifiable"); |
+ Expect.throws(() { |
+ l3.insert(2, 5); |
+ }, (e) => e is UnsupportedError, "unmodifiable"); |
// Empty list is not special. |
var l4 = []; |