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

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: 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 f4bfecdbb7fe3c021d075006c714e943d19bda55..0017a05b56beff363b0c3d0d87d4e29c709575e5 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -1672,10 +1672,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 +1766,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 +1784,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 +1796,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();

Powered by Google App Engine
This is Rietveld 408576698