| Index: tests/language/external_test.dart
|
| ===================================================================
|
| --- tests/language/external_test.dart (revision 35776)
|
| +++ tests/language/external_test.dart (working copy)
|
| @@ -6,6 +6,8 @@
|
| var x;
|
| f() {}
|
|
|
| + Foo() : x = 0;
|
| +
|
| external var x01; /// 01: compile-time error
|
| external int x02; /// 02: compile-time error
|
|
|
| @@ -17,9 +19,10 @@
|
| int external f16(); /// 16: compile-time error
|
|
|
| external Foo.n20(); /// 20: runtime error
|
| - external Foo.n21() : x(1); /// 21: compile-time error
|
| + external Foo.n21() : x = 1; /// 21: compile-time error
|
| external Foo.n22() { x = 1; } /// 22: compile-time error
|
| external factory Foo.n23() => new Foo(); /// 23: compile-time error
|
| + external factory Foo.n24(this.x); /// 24: compile-time error
|
| }
|
|
|
| external int t06(int i) { } /// 30: compile-time error
|
| @@ -27,39 +30,20 @@
|
|
|
| main() {
|
|
|
| - // Try calling an unpatched external function.
|
| + // Ensure Foo class is compiled.
|
| var foo = new Foo();
|
| - try { /// 10: continued
|
| - foo.f05(); /// 10: continued
|
| - } on String catch (exc) { /// 10: continued
|
| - if (exc == "External implementation missing.") { /// 10: continued
|
| - throw exc; /// 10: continued
|
| - } /// 10: continued
|
| - } /// 10: continued
|
|
|
| - new Foo().f11(); /// 11: continued
|
| + // Try calling an unpatched external function.
|
| + new Foo().f10(); /// 10: continued
|
| new Foo().f12(); /// 12: continued
|
| + Foo.f13(); /// 13: continued
|
|
|
| - try { /// 13: continued
|
| - Foo.f13(); /// 13: continued
|
| - } on String catch (exc) { /// 13: continued
|
| - if (exc == "External implementation missing.") { /// 13: continued
|
| - throw exc; /// 13: continued
|
| - } /// 13: continued
|
| - } /// 13: continued
|
| -
|
| // Try calling an unpatched external constructor.
|
| - try { /// 20: continued
|
| - var foo = new Foo.n09(); /// 20: continued
|
| - } on String catch (exc) { /// 20: continued
|
| - if (exc == "External implementation missing.") { /// 20: continued
|
| - throw exc; /// 20: continued
|
| - } /// 20: continued
|
| - } /// 20: continued
|
| -
|
| + new Foo.n20(); /// 20: continued
|
| new Foo.n21(); /// 21: continued
|
| new Foo.n22(); /// 22: continued
|
| new Foo.n23(); /// 23: continued
|
| + new Foo.n24(); /// 24: continued
|
|
|
| t06(1); /// 30: continued
|
| t07(1); /// 31: continued
|
|
|