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

Unified Diff: tests/language/external_test.dart

Issue 269253007: - Fix the external_test.dart as it was relying on outdated (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698