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

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

Issue 796353003: Incremental compiler detects when library graph changes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42504. 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 282e299f87fc6ab43149b48b092ba284a241bb88..f4bfecdbb7fe3c021d075006c714e943d19bda55 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -40,6 +40,9 @@ import 'package:compiler/src/elements/elements.dart' show
import 'package:compiler/src/dart2jslib.dart' show
Compiler;
+import 'package:dart2js_incremental/dart2js_incremental.dart' show
+ IncrementalCompilationFailed;
+
import 'program_result.dart';
const int TIMEOUT = 100;
@@ -1754,14 +1757,23 @@ Future compileAndRun(EncodedResult encodedResult) {
WebInputProvider inputProvider =
test.incrementalCompiler.inputProvider;
- Uri uri = test.scriptUri.resolve('?v${version++}');
- inputProvider.cachedSources[uri] = new Future.value(program.code);
+ Uri base = test.scriptUri;
+ Map<String, String> code = program.code is String
+ ? { 'main.dart': program.code }
+ : program.code;
+ Map<Uri, Uri> uriMap = <Uri, Uri>{};
+ for (String name in code.keys) {
+ Uri uri = base.resolve('$name?v${version++}');
+ inputProvider.cachedSources[uri] = new Future.value(code[name]);
+ uriMap[base.resolve(name)] = uri;
+ }
Future future = test.incrementalCompiler.compileUpdates(
- {test.scriptUri: uri}, logVerbose: logger, logTime: logger);
+ uriMap, logVerbose: logger, logTime: logger);
future = future.catchError((error, trace) {
String statusMessage;
Future result;
- if (program.compileUpdatesShouldThrow) {
+ if (program.compileUpdatesShouldThrow &&
+ error is IncrementalCompilationFailed) {
statusMessage = "Expected error in compileUpdates.";
result = null;
} else {
« 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