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

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: Merged with r42279 and CL 760383003. 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
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 66c77369fcdd1227b486e1284630cf0f03fba57b..5377f3a24ec56b3b08710b674ea3e5bcbb903d41 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -1292,8 +1292,6 @@ main() {
const ProgramResult(
r"""
main() {
- // TODO(ahe): Remove next line when new constants are handled correctly.
- [].map(null);
print('v1');
}
""",
@@ -1371,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']),
+ ],
];
void main() {

Powered by Google App Engine
This is Rietveld 408576698