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

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

Issue 818713002: More tests of incremental compilation involving multiple libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | dart/tests/try/web/program_result.dart » ('j') | 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 e9fcafa440f69c75432eb47d4ef29ae3a7c07ecf..63ca651da40b0a7fb2517756319b41507594866d 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -1656,6 +1656,7 @@ main() {
const EncodedResult(
r"""
==> main.dart <==
+// Test that a change in a part is handled.
library test.main;
part 'part.dart';
@@ -1676,6 +1677,143 @@ main() {
'Hello, World!',
'Hello, Brave New World!',
]),
+
+ const EncodedResult(
+ r"""
+==> main.dart.patch <==
+// Test that a change in library name is handled.
+<<<<<<<
+library test.main1;
+=======
+library test.main2;
+>>>>>>>
+
+main() {
+ print('Hello, World!');
+}
+""",
+ const [
+ 'Hello, World!',
+ const ProgramExpectation(
+ const <String>['Hello, World!'],
+ // TODO(ahe): Shouldn't throw.
+ compileUpdatesShouldThrow: true),
+ ]),
+
+ const EncodedResult(
+ r"""
+==> main.dart.patch <==
+// Test that adding an import is handled.
+<<<<<<<
+=======
+import 'dart:core';
+>>>>>>>
+
+main() {
+ print('Hello, World!');
+}
+""",
+ const [
+ 'Hello, World!',
+ const ProgramExpectation(
+ const <String>['Hello, World!'],
+ // TODO(ahe): Shouldn't throw.
+ compileUpdatesShouldThrow: true),
+ ]),
+
+ const EncodedResult(
+ r"""
+==> main.dart.patch <==
+// Test that adding an export is handled.
+<<<<<<<
+=======
+export 'dart:core';
+>>>>>>>
+
+main() {
+ print('Hello, World!');
+}
+""",
+ const [
+ 'Hello, World!',
+ const ProgramExpectation(
+ const <String>['Hello, World!'],
+ // TODO(ahe): Shouldn't throw.
+ compileUpdatesShouldThrow: true),
+ ]),
+
+ const EncodedResult(
+ r"""
+==> main.dart.patch <==
+// Test that adding a part is handled.
+library test.main;
+
+<<<<<<<
+=======
+part 'part.dart';
+>>>>>>>
+
+main() {
+ print('Hello, World!');
+}
+
+
+==> part.dart <==
+part of test.main
+""",
+ const [
+ 'Hello, World!',
+ const ProgramExpectation(
+ const <String>['Hello, World!'],
+ // TODO(ahe): Shouldn't throw.
+ compileUpdatesShouldThrow: true),
+ ]),
+
+ const EncodedResult(
+ r"""
+==> main.dart <==
+// Test that changes in multiple libraries is handled.
+import 'library1.dart' as lib1;
+import 'library2.dart' as lib2;
+
+main() {
+ lib1.method();
+ lib2.method();
+}
+
+
+==> library1.dart.patch <==
+library test.library1;
+
+method() {
+<<<<<<<
+ print('lib1.v1');
+=======
+ print('lib1.v2');
+=======
+ print('lib1.v3');
+>>>>>>>
+}
+
+
+==> library2.dart.patch <==
+library test.library2;
+
+method() {
+<<<<<<<
+ print('lib2.v1');
+=======
+ print('lib2.v2');
+=======
+ print('lib2.v3');
+>>>>>>>
+}
+""",
+ const [
+ const <String>['lib1.v1', 'lib2.v1'],
+ const <String>['lib1.v2', 'lib2.v2'],
+ const <String>['lib1.v3', 'lib2.v3'],
+ ]),
];
void main() {
« no previous file with comments | « no previous file | dart/tests/try/web/program_result.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698