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

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

Issue 763083004: Incremental compilation handles indirectly instantiated classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor issues found during testing. Created 6 years 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 8fc3aa44f55e06d95e4a4adbbec5b9e4dc718893..3a027649e24e0480057b6157365f413d4428217f 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -1290,6 +1290,59 @@ main() {
const <String>['v2', 'lazy']),
],
*/
+
+ // Test that superclasses of directly instantiated classes are also
+ // emitted.
+ const <ProgramResult>[
+ const ProgramResult(
+ r"""
+class A {
+}
+
+class B extends A {
+}
+
+main() {
+ print('v1');
+}
+""",
+ const <String>['v1']),
+ const ProgramResult(
+ r"""
+class A {
+}
+
+class B extends A {
+}
+
+main() {
+ new B();
+ print('v2');
+}
+""",
+ const <String>['v2']),
+ ],
+
+ // Test that interceptor classes are handled correctly.
+ const <ProgramResult>[
+ const ProgramResult(
+ r"""
+main() {
+ // TODO(ahe): Remove next line when new constants are handled correctly.
+ [].map(null);
+ print('v1');
+}
+""",
+ const <String>['v1']),
+ const ProgramResult(
+ r"""
+main() {
+ // TODO(ahe): Use forEach(print) when closures are computed correctly.
+ ['v2'].forEach((e) { print(e); });
+}
+""",
+ const <String>['v2']),
+ ],
];
void main() {
@@ -1372,7 +1425,9 @@ Future compileAndRun(List<ProgramResult> programs) {
}).then((_) {
status.style.color = 'limegreen';
- // Remove the iframe to work around a bug in test.dart.
+ // Remove the iframe and status to work around a bug in test.dart
+ // (https://code.google.com/p/dart/issues/detail?id=21691).
+ status.remove();
iframe.remove();
});
}
« 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