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

Unified Diff: dart/tests/try/web/incremental_compilation_update_test.dart

Issue 657883002: Handle instance methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41481. Created 6 years, 1 month 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
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/try/web/incremental_compilation_update_test.dart
diff --git a/dart/tests/try/web/incremental_compilation_update_test.dart b/dart/tests/try/web/incremental_compilation_update_test.dart
index 70ff478f030bc503fc9a07f892501315e122a4e5..70c65448e4d2204e2280b4614cedd2c136e1cba7 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -159,8 +159,43 @@ main() {
instance.m();
}
""",
- // TODO(ahe): This test is failing, should print "v2".
+ const <String> ['v2']),
+ ],
+
+ // Test that a stored instance tearoff changes behavior when updated.
+ const <ProgramResult>[
+ const ProgramResult(
+ """
+class C {
+ m() {
+ print('v1');
+ }
+}
+var closure;
+main() {
+ if (closure == null) {
+ closure = new C().m;
+ }
+ closure();
+}
+""",
const <String> ['v1']),
+ const ProgramResult(
+ """
+class C {
+ m() {
+ print('v2');
+ }
+}
+var closure;
+main() {
+ if (closure == null) {
+ closure = new C().m;
+ }
+ closure();
+}
+""",
+ const <String> ['v2']),
],
];
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698