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

Unified Diff: tests/language/call_through_null_getter_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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_null_getter_test.dart
diff --git a/tests/language/call_through_null_getter_test.dart b/tests/language/call_through_null_getter_test.dart
index 6ef59eda236b2d6aefcb9e867962c41a889c8f85..803f6855c96b09971e6ec483e01593775c6548ed 100644
--- a/tests/language/call_through_null_getter_test.dart
+++ b/tests/language/call_through_null_getter_test.dart
@@ -11,7 +11,6 @@ const TOP_LEVEL_NULL = null;
var topLevel;
class CallThroughNullGetterTest {
-
static void testMain() {
testTopLevel();
testField();
@@ -21,49 +20,69 @@ class CallThroughNullGetterTest {
static void testTopLevel() {
topLevel = null;
- expectThrowsNoSuchMethodError(() { topLevel(); });
- expectThrowsNoSuchMethodError(() { (topLevel)(); });
- expectThrowsNoSuchMethodError(() { TOP_LEVEL_NULL(); });
- expectThrowsNoSuchMethodError(() { (TOP_LEVEL_NULL)(); });
+ expectThrowsNoSuchMethodError(() {
+ topLevel();
+ });
+ expectThrowsNoSuchMethodError(() {
+ (topLevel)();
+ });
+ expectThrowsNoSuchMethodError(() {
+ TOP_LEVEL_NULL();
+ });
+ expectThrowsNoSuchMethodError(() {
+ (TOP_LEVEL_NULL)();
+ });
}
static void testField() {
A a = new A();
a.field = null;
- expectThrowsNoSuchMethodError(() { a.field(); });
- expectThrowsNoSuchMethodError(() { (a.field)(); });
+ expectThrowsNoSuchMethodError(() {
+ a.field();
+ });
+ expectThrowsNoSuchMethodError(() {
+ (a.field)();
+ });
}
static void testGetter() {
A a = new A();
a.field = null;
- expectThrowsNoSuchMethodError(() { a.getter(); });
- expectThrowsNoSuchMethodError(() { (a.getter)(); });
+ expectThrowsNoSuchMethodError(() {
+ a.getter();
+ });
+ expectThrowsNoSuchMethodError(() {
+ (a.getter)();
+ });
}
static void testMethod() {
A a = new A();
a.field = null;
- expectThrowsNoSuchMethodError(() { a.method()(); });
+ expectThrowsNoSuchMethodError(() {
+ a.method()();
+ });
}
static void expectThrowsNoSuchMethodError(fn) {
- Expect.throws(fn, (e) => e is NoSuchMethodError,
- "Should throw NoSuchMethodError");
+ Expect.throws(
+ fn, (e) => e is NoSuchMethodError, "Should throw NoSuchMethodError");
}
}
-
class A {
-
- A() { }
+ A() {}
var field;
- get getter { return field; }
- method() { return field; }
+ get getter {
+ return field;
+ }
+ method() {
+ return field;
+ }
}
main() {

Powered by Google App Engine
This is Rietveld 408576698