Index: tests/language/compile_time_constant_a_test.dart |
diff --git a/tests/language/compile_time_constant_a_test.dart b/tests/language/compile_time_constant_a_test.dart |
index 8f157f39b0a95e1c78b5e423eb6e691dc8a16935..b8fe9c98191a6e4d2dc0ea5574860ea8bca3b499 100644 |
--- a/tests/language/compile_time_constant_a_test.dart |
+++ b/tests/language/compile_time_constant_a_test.dart |
@@ -10,7 +10,7 @@ const m5 = const { '': 499 }; |
const m6 = const { 'a': 499 }; |
const m7 = const {}; |
-bool isIllegalAccessException(o) => o is IllegalAccessException; |
+bool isStateError(o) => o is StateError; |
main() { |
Expect.equals(499, m1['a']); |
@@ -32,15 +32,15 @@ main() { |
Expect.listEquals([499], seenValues); |
Expect.isFalse(m1.isEmpty()); |
Expect.equals(1, m1.length); |
- Expect.throws(() => m1.remove('a'), isIllegalAccessException); |
- Expect.throws(() => m1.remove('b'), isIllegalAccessException); |
- Expect.throws(() => m1.clear(), isIllegalAccessException); |
- Expect.throws(() => m1['b'] = 42, isIllegalAccessException); |
- Expect.throws(() => m1['a'] = 499, isIllegalAccessException); |
+ Expect.throws(() => m1.remove('a'), isStateError); |
+ Expect.throws(() => m1.remove('b'), isStateError); |
+ Expect.throws(() => m1.clear(), isStateError); |
+ Expect.throws(() => m1['b'] = 42, isStateError); |
+ Expect.throws(() => m1['a'] = 499, isStateError); |
Expect.throws(() => m1.putIfAbsent('a', () => 499), |
floitsch
2012/10/23 12:50:32
move into one line. ditto for the remaining ones b
Lasse Reichstein Nielsen
2012/10/24 12:32:15
Done.
|
- isIllegalAccessException); |
+ isStateError); |
Expect.throws(() => m1.putIfAbsent('z', () => 499), |
- isIllegalAccessException); |
+ isStateError); |
Expect.equals(499, m2['a']); |
Expect.equals(42, m2['b']); |
@@ -64,18 +64,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('c'), isIllegalAccessException); |
- Expect.throws(() => m2.clear(), isIllegalAccessException); |
- Expect.throws(() => m2['a'] = 499, isIllegalAccessException); |
- Expect.throws(() => m2['b'] = 42, isIllegalAccessException); |
- Expect.throws(() => m2['c'] = 499, isIllegalAccessException); |
+ Expect.throws(() => m2.remove('a'), isStateError); |
+ Expect.throws(() => m2.remove('b'), isStateError); |
+ Expect.throws(() => m2.remove('c'), isStateError); |
+ Expect.throws(() => m2.clear(), isStateError); |
+ Expect.throws(() => m2['a'] = 499, isStateError); |
+ Expect.throws(() => m2['b'] = 42, isStateError); |
+ Expect.throws(() => m2['c'] = 499, isStateError); |
Expect.throws(() => m2.putIfAbsent('a', () => 499), |
- isIllegalAccessException); |
+ isStateError); |
Expect.throws(() => m2.putIfAbsent('z', () => 499), |
- isIllegalAccessException); |
- Expect.throws(() => m2['a'] = 499, isIllegalAccessException); |
+ isStateError); |
+ Expect.throws(() => m2['a'] = 499, isStateError); |
Expect.isTrue(m3['m1'] === m1); |
Expect.isTrue(m3['m2'] === m2); |
@@ -114,13 +114,13 @@ main() { |
}); |
Expect.listEquals([], seenKeys); |
Expect.listEquals([], seenValues); |
- Expect.throws(() => m7.remove('a'), isIllegalAccessException); |
- Expect.throws(() => m7.remove('b'), isIllegalAccessException); |
- Expect.throws(() => m7.clear(), isIllegalAccessException); |
- Expect.throws(() => m7['b'] = 42, isIllegalAccessException); |
- Expect.throws(() => m7['a'] = 499, isIllegalAccessException); |
+ Expect.throws(() => m7.remove('a'), isStateError); |
+ Expect.throws(() => m7.remove('b'), isStateError); |
+ Expect.throws(() => m7.clear(), isStateError); |
+ Expect.throws(() => m7['b'] = 42, isStateError); |
+ Expect.throws(() => m7['a'] = 499, isStateError); |
Expect.throws(() => m7.putIfAbsent('a', () => 499), |
- isIllegalAccessException); |
+ isStateError); |
Expect.throws(() => m7.putIfAbsent('z', () => 499), |
- isIllegalAccessException); |
+ isStateError); |
} |