Index: tests/language/compile_time_constant_b_test.dart |
diff --git a/tests/language/compile_time_constant_b_test.dart b/tests/language/compile_time_constant_b_test.dart |
index ef4451cb316969604568ba7ff80ea8d8f5001544..7318fad74da12b37df4cfe9a0c4f653166eb3f72 100644 |
--- a/tests/language/compile_time_constant_b_test.dart |
+++ b/tests/language/compile_time_constant_b_test.dart |
@@ -6,7 +6,7 @@ const m1 = const { '__proto__': 400 + 99 }; |
const m2 = const { 'a': 499, 'b': 42 }; |
const m3 = const { '__proto__': 499 }; |
-bool isIllegalAccessException(o) => o is IllegalAccessException; |
+bool isStateError(o) => o is StateError; |
main() { |
Expect.equals(499, m1['__proto__']); |
@@ -27,15 +27,15 @@ main() { |
Expect.listEquals([499], seenValues); |
Expect.isFalse(m1.isEmpty()); |
Expect.equals(1, m1.length); |
- Expect.throws(() => m1.remove('__proto__'), isIllegalAccessException); |
- Expect.throws(() => m1.remove('b'), isIllegalAccessException); |
- Expect.throws(() => m1.clear(), isIllegalAccessException); |
- Expect.throws(() => m1['b'] = 42, isIllegalAccessException); |
- Expect.throws(() => m1['__proto__'] = 499, isIllegalAccessException); |
+ Expect.throws(() => m1.remove('__proto__'), isStateError); |
+ Expect.throws(() => m1.remove('b'), isStateError); |
+ Expect.throws(() => m1.clear(), isStateError); |
+ Expect.throws(() => m1['b'] = 42, isStateError); |
+ Expect.throws(() => m1['__proto__'] = 499, isStateError); |
Expect.throws(() => m1.putIfAbsent('__proto__', () => 499), |
floitsch
2012/10/23 12:50:32
one line, ditto below.
Lasse Reichstein Nielsen
2012/10/24 12:32:15
fixed where possible. Some are still too long.
Co
|
- isIllegalAccessException); |
+ isStateError); |
Expect.throws(() => m1.putIfAbsent('z', () => 499), |
- isIllegalAccessException); |
+ isStateError); |
Expect.equals(499, m2['a']); |
Expect.equals(42, m2['b']); |
@@ -60,18 +60,18 @@ main() { |
Expect.listEquals([499, 42], seenValues); |
Expect.isFalse(m2.isEmpty()); |
Expect.equals(2, m2.length); |
- Expect.throws(() => m2.remove('a'), isIllegalAccessException); |
- Expect.throws(() => m2.remove('b'), isIllegalAccessException); |
- Expect.throws(() => m2.remove('__proto__'), isIllegalAccessException); |
- Expect.throws(() => m2.clear(), isIllegalAccessException); |
- Expect.throws(() => m2['a'] = 499, isIllegalAccessException); |
- Expect.throws(() => m2['b'] = 42, isIllegalAccessException); |
- Expect.throws(() => m2['__proto__'] = 499, isIllegalAccessException); |
+ Expect.throws(() => m2.remove('a'), isStateError); |
+ Expect.throws(() => m2.remove('b'), isStateError); |
+ Expect.throws(() => m2.remove('__proto__'), isStateError); |
+ Expect.throws(() => m2.clear(), isStateError); |
+ Expect.throws(() => m2['a'] = 499, isStateError); |
+ Expect.throws(() => m2['b'] = 42, isStateError); |
+ Expect.throws(() => m2['__proto__'] = 499, isStateError); |
Expect.throws(() => m2.putIfAbsent('a', () => 499), |
- isIllegalAccessException); |
+ isStateError); |
Expect.throws(() => m2.putIfAbsent('__proto__', () => 499), |
- isIllegalAccessException); |
- Expect.throws(() => m2['a'] = 499, isIllegalAccessException); |
+ isStateError); |
+ Expect.throws(() => m2['a'] = 499, isStateError); |
Expect.isTrue(m1 === m3); |
} |