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

Unified Diff: tests/language_2/call_through_null_getter_test.dart

Issue 2998493002: Migrate language block 45 - call_argument ... call_with. (Closed)
Patch Set: Merge branch 'master' into migrate-45 Created 3 years, 4 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
« no previous file with comments | « tests/language_2/call_through_getter_test.dart ('k') | tests/language_2/call_type_literal_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language_2/call_through_null_getter_test.dart
diff --git a/tests/language/call_through_null_getter_test.dart b/tests/language_2/call_through_null_getter_test.dart
similarity index 68%
rename from tests/language/call_through_null_getter_test.dart
rename to tests/language_2/call_through_null_getter_test.dart
index 803f6855c96b09971e6ec483e01593775c6548ed..27f1e4314c32340b328637446b79782ca8248320 100644
--- a/tests/language/call_through_null_getter_test.dart
+++ b/tests/language_2/call_through_null_getter_test.dart
@@ -6,7 +6,7 @@ import "package:expect/expect.dart";
// Tests that we can call functions through getters which return null.
-const TOP_LEVEL_NULL = null;
+const dynamic TOP_LEVEL_NULL = null;
var topLevel;
@@ -20,16 +20,16 @@ class CallThroughNullGetterTest {
static void testTopLevel() {
topLevel = null;
- expectThrowsNoSuchMethodError(() {
+ Expect.throwsNoSuchMethodError(() {
topLevel();
});
- expectThrowsNoSuchMethodError(() {
+ Expect.throwsNoSuchMethodError(() {
(topLevel)();
});
- expectThrowsNoSuchMethodError(() {
+ Expect.throwsNoSuchMethodError(() {
TOP_LEVEL_NULL();
});
- expectThrowsNoSuchMethodError(() {
+ Expect.throwsNoSuchMethodError(() {
(TOP_LEVEL_NULL)();
});
}
@@ -38,10 +38,10 @@ class CallThroughNullGetterTest {
A a = new A();
a.field = null;
- expectThrowsNoSuchMethodError(() {
+ Expect.throwsNoSuchMethodError(() {
a.field();
});
- expectThrowsNoSuchMethodError(() {
+ Expect.throwsNoSuchMethodError(() {
(a.field)();
});
}
@@ -50,10 +50,10 @@ class CallThroughNullGetterTest {
A a = new A();
a.field = null;
- expectThrowsNoSuchMethodError(() {
+ Expect.throwsNoSuchMethodError(() {
a.getter();
});
- expectThrowsNoSuchMethodError(() {
+ Expect.throwsNoSuchMethodError(() {
(a.getter)();
});
}
@@ -62,15 +62,10 @@ class CallThroughNullGetterTest {
A a = new A();
a.field = null;
- expectThrowsNoSuchMethodError(() {
+ Expect.throwsNoSuchMethodError(() {
a.method()();
});
}
-
- static void expectThrowsNoSuchMethodError(fn) {
- Expect.throws(
- fn, (e) => e is NoSuchMethodError, "Should throw NoSuchMethodError");
- }
}
class A {
« no previous file with comments | « tests/language_2/call_through_getter_test.dart ('k') | tests/language_2/call_type_literal_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698