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

Unified Diff: tests/language/call_through_getter_test.dart

Issue 11231069: Remove reference to ObjectNotClosureException in dart2js. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/language/call_through_getter_test.dart
diff --git a/tests/language/call_through_getter_test.dart b/tests/language/call_through_getter_test.dart
index cfacf27b2c41f64c4e2f6be6d77a853098c384d6..b5a115d64a09c41f1428a1d13a1d2072d4ebd30c 100644
--- a/tests/language/call_through_getter_test.dart
+++ b/tests/language/call_through_getter_test.dart
@@ -28,10 +28,10 @@ class CallThroughGetterTest {
Expect.equals(1, TOP_LEVEL_CONST_REF);
Expect.equals(2, topLevel());
- expectThrowsNotClosure(() {
+ expectThrowsNoSuchMethod(() {
TOP_LEVEL_CONST(); /// static type warning
});
- expectThrowsNotClosure(() {
+ expectThrowsNoSuchMethod(() {
(TOP_LEVEL_CONST)(); /// static type warning
});
}
@@ -47,8 +47,8 @@ class CallThroughGetterTest {
Expect.equals(87, (a.field)());
a.field = 99;
- expectThrowsNotClosure(() { a.field(); });
- expectThrowsNotClosure(() { (a.field)(); });
+ expectThrowsNoSuchMethod(() { a.field(); });
+ expectThrowsNoSuchMethod(() { (a.field)(); });
}
static void testGetter() {
@@ -62,8 +62,8 @@ class CallThroughGetterTest {
Expect.equals(87, (a.getter)());
a.field = 99;
- expectThrowsNotClosure(() { a.getter(); });
- expectThrowsNotClosure(() { (a.getter)(); });
+ expectThrowsNoSuchMethod(() { a.getter(); });
+ expectThrowsNoSuchMethod(() { (a.getter)(); });
}
static void testMethod() {
@@ -107,10 +107,10 @@ class CallThroughGetterTest {
Expect.equals("gyzxf", (b.g3)(b.y, b.z, b.x));
}
- static void expectThrowsNotClosure(fn) {
+ static expectThrowsNoSuchMethod(fn) {
var exception = catchException(fn);
- if (!(exception is ObjectNotClosureException)) {
- Expect.fail("Wrong exception. Expected: ObjectNotClosureException"
+ if (exception is! NoSuchMethodError) {
+ Expect.fail("Wrong exception. Expected: NoSuchMethodError"
" got: ${exception}");
}
}

Powered by Google App Engine
This is Rietveld 408576698