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

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

Issue 815123002: Incremental compilation of libraries with multiple parts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. 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 f4bfecdbb7fe3c021d075006c714e943d19bda55..e9fcafa440f69c75432eb47d4ef29ae3a7c07ecf 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -1659,6 +1659,8 @@ main() {
library test.main;
part 'part.dart';
+
+
==> part.dart.patch <==
part of test.main;
@@ -1672,10 +1674,7 @@ main() {
""",
const [
'Hello, World!',
- const ProgramExpectation(
- const <String>['Hello, Brave New World!'],
- // TODO(ahe): Shouldn't throw.
- compileUpdatesShouldThrow: true),
+ 'Hello, Brave New World!',
]),
];
@@ -1769,9 +1768,11 @@ Future compileAndRun(EncodedResult encodedResult) {
}
Future future = test.incrementalCompiler.compileUpdates(
uriMap, logVerbose: logger, logTime: logger);
+ bool compileUpdatesThrew = false;
future = future.catchError((error, trace) {
String statusMessage;
Future result;
+ compileUpdatesThrew = true;
if (program.compileUpdatesShouldThrow &&
error is IncrementalCompilationFailed) {
statusMessage = "Expected error in compileUpdates.";
@@ -1785,7 +1786,10 @@ Future compileAndRun(EncodedResult encodedResult) {
});
return future.then((String update) {
if (program.compileUpdatesShouldThrow) {
- Expect.isNull(update);
+ Expect.isTrue(
+ compileUpdatesThrew,
+ "Expected an exception in compileUpdates");
+ Expect.isNull( update, "Expected update == null");
return null;
}
print({'update': update});
@@ -1794,6 +1798,9 @@ Future compileAndRun(EncodedResult encodedResult) {
return listener.expect(
program.messagesWith('iframe-dart-updated-main-done'))
.then((_) {
+ // TODO(ahe): Enable SerializeScopeTestCase for multiple
+ // parts.
+ if (program.code is! String) return null;
return new SerializeScopeTestCase(
program.code, test.incrementalCompiler.mainApp,
test.incrementalCompiler.compiler).run();
« 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