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 e7eac4a4ed838ca1e168be6d883bcd87007fccb0..0d4f34be354a57c76b3fa8973748ab4ecc81f6a1 100644 |
--- a/tests/language/call_through_getter_test.dart |
+++ b/tests/language/call_through_getter_test.dart |
@@ -13,6 +13,7 @@ const TOP_LEVEL_NULL = null; |
var topLevel; |
class CallThroughGetterTest { |
+ |
static void testMain() { |
testTopLevel(); |
testField(); |
@@ -48,12 +49,8 @@ class CallThroughGetterTest { |
Expect.equals(87, (a.field)()); |
a.field = 99; |
- expectThrowsNoSuchMethod(() { |
- a.field(); |
- }); |
- expectThrowsNoSuchMethod(() { |
- (a.field)(); |
- }); |
+ expectThrowsNoSuchMethod(() { a.field(); }); |
+ expectThrowsNoSuchMethod(() { (a.field)(); }); |
} |
static void testGetter() { |
@@ -67,12 +64,8 @@ class CallThroughGetterTest { |
Expect.equals(87, (a.getter)()); |
a.field = 99; |
- expectThrowsNoSuchMethod(() { |
- a.getter(); |
- }); |
- expectThrowsNoSuchMethod(() { |
- (a.getter)(); |
- }); |
+ expectThrowsNoSuchMethod(() { a.getter(); }); |
+ expectThrowsNoSuchMethod(() { (a.getter)(); }); |
} |
static void testMethod() { |
@@ -129,7 +122,7 @@ class CallThroughGetterTest { |
var result = null; |
try { |
fn(); |
- Expect.equals(true, false); // Shouldn't reach this. |
+ Expect.equals(true, false); // Shouldn't reach this. |
} catch (e) { |
caught = true; |
result = e; |
@@ -137,72 +130,36 @@ class CallThroughGetterTest { |
Expect.equals(true, caught); |
return result; |
} |
-} |
- |
-class A { |
- A() {} |
- var field; |
- get getter { |
- return field; |
- } |
- method() { |
- return field; |
- } |
} |
-class B { |
- B() : _order = new StringBuffer("") {} |
- get g0 { |
- _mark('g'); |
- return () { |
- return _mark('f'); |
- }; |
- } |
+class A { |
- get g1 { |
- _mark('g'); |
- return (x) { |
- return _mark('f'); |
- }; |
- } |
+ A() { } |
+ var field; |
+ get getter { return field; } |
+ method() { return field; } |
- get g2 { |
- _mark('g'); |
- return (x, y) { |
- return _mark('f'); |
- }; |
- } |
+} |
- get g3 { |
- _mark('g'); |
- return (x, y, z) { |
- return _mark('f'); |
- }; |
- } |
- get x { |
- _mark('x'); |
- return 0; |
- } |
+class B { |
- get y { |
- _mark('y'); |
- return 1; |
- } |
+ B() : _order = new StringBuffer("") { } |
- get z { |
- _mark('z'); |
- return 2; |
- } |
+ get g0 { _mark('g'); return () { return _mark('f'); }; } |
+ get g1 { _mark('g'); return (x) { return _mark('f'); }; } |
+ get g2 { _mark('g'); return (x, y) { return _mark('f'); }; } |
+ get g3 { _mark('g'); return (x, y, z) { return _mark('f'); }; } |
- _mark(m) { |
- _order.write(m); |
- return _order.toString(); |
- } |
+ get x { _mark('x'); return 0; } |
+ get y { _mark('y'); return 1; } |
+ get z { _mark('z'); return 2; } |
+ _mark(m) { _order.write(m); return _order.toString(); } |
StringBuffer _order; |
+ |
} |
main() { |