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

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

Issue 760383003: Incremental compilation of constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 6ebd5737f29403d8d92a02f0bcf9dbfc972d6ff4..87e1c735ceaedc9ee4cd40a7ef307f7f9a957fe2 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -1209,7 +1209,6 @@ main() {
],
// Test that a lazy static is supported.
- // TODO(ahe): This test doesn't pass yet.
const <ProgramResult>[
const ProgramResult(
r"""
@@ -1293,8 +1292,6 @@ main() {
const ProgramResult(
r"""
main() {
- // TODO(ahe): Remove next line when new constants are handled correctly.
- [].map(null);
print('v1');
}
""",
@@ -1372,6 +1369,34 @@ main() {
""",
const <String>['Called bar']),
],
+
+ // Test that constants are handled correctly.
+ const <ProgramResult>[
+ const ProgramResult(
+ r"""
+class C {
+ final String value;
+ const C(this.value);
+}
+
+main() {
+ print(const C('v1').value);
+}
+""",
+ const <String>['v1']),
+ const ProgramResult(
+ r"""
+class C {
+ final String value;
+ const C(this.value);
+}
+
+main() {
+ print(const C('v2').value);
+}
+""",
+ const <String>['v2']),
+ ],
Johnni Winther 2014/12/09 12:07:16 Add tests with dependent constants like const C(co
ahe 2014/12/11 10:09:00 Will do in follow up CL.
];
void main() {
« 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