Chromium Code Reviews| Index: tests/language/static_field_test.dart |
| diff --git a/tests/language/static_field_test.dart b/tests/language/static_field_test.dart |
| index 3b8ce18768da321a47826bed9ea5a13fcf0ee27b..63fed28e7d9420655dbd8a08b49b6f915a094e55 100644 |
| --- a/tests/language/static_field_test.dart |
| +++ b/tests/language/static_field_test.dart |
| @@ -62,7 +62,54 @@ class StaticFieldTest { |
| } |
| +class StaticField1RunNegativeTest { |
| + static /// 01: static type warning, runtime error |
| + var x; |
| + testMain() { |
| + var foo = new StaticField1RunNegativeTest(); |
| + print(x); // to compile 'x' |
|
ahe
2012/06/13 15:26:08
Not a proper sentence: first letter should be uppe
|
| + var result = foo.x; |
| + } |
| +} |
| + |
| +class StaticField1aRunNegativeTest { |
| + static /// 02: static type warning, runtime error |
| + void m() {} |
| + |
| + testMain() { |
| + var foo = new StaticField1aRunNegativeTest(); |
| + print(m); // to compile 'm' |
| + var result = foo.m; |
| + } |
| +} |
| + |
| +class StaticField2RunNegativeTest { |
| + static /// 03: static type warning, runtime error |
| + var x; |
| + |
| + testMain() { |
| + var foo = new StaticField2RunNegativeTest(); |
| + print(x); // to compile 'x' |
| + foo.x = 1; |
| + } |
| +} |
| + |
| +class StaticField2aRunNegativeTest { |
| + static /// 04: static type warning, runtime error |
| + void m() {} |
| + |
| + testMain() { |
| + var foo = new StaticField2aRunNegativeTest(); |
| + print(m); // to compile 'm' |
| + foo.m = 1; /// 04:continued |
| + } |
| +} |
| + |
| main() { |
| StaticFieldTest.testMain(); |
| InitializerTest.testStaticFieldInitialization(); |
| + new StaticField1RunNegativeTest().testMain(); |
| + new StaticField1aRunNegativeTest().testMain(); |
| + new StaticField2RunNegativeTest().testMain(); |
| + new StaticField2aRunNegativeTest().testMain(); |
| } |