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

Unified Diff: test/codegen_test.dart

Issue 1013223002: coverage: increase coverage of js_codegen (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 months 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 | « test/codegen/map_keys.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen_test.dart
diff --git a/test/codegen_test.dart b/test/codegen_test.dart
index dbe68ca7d783ff8a668fec14e9cc937f26f26ea1..fc5a60ac9c24c32d39ff9b328b8a1ed8c6ad4af8 100644
--- a/test/codegen_test.dart
+++ b/test/codegen_test.dart
@@ -57,13 +57,15 @@ main(arguments) {
.where((p) => p.endsWith('.dart') && filePattern.hasMatch(p));
compile(String entryPoint, String sdkPath,
- {bool checkSdk: false, bool serverMode: false}) {
+ {bool checkSdk: false, bool serverMode: false, bool sourceMaps: false}) {
+ // TODO(jmesserly): add a way to specify flags in the test file, so
+ // they're more self-contained.
var options = new CompilerOptions(
outputDir: serverMode ? path.join(actualDir, 'server_mode') : actualDir,
useColors: false,
outputDart: dartGen,
formatOutput: dartGen,
- emitSourceMaps: false,
+ emitSourceMaps: sourceMaps,
forceCompile: checkSdk,
cheapTestFormat: checkSdk,
checkSdk: checkSdk,
@@ -88,7 +90,10 @@ main(arguments) {
test('devc $filename.dart', () {
compilerMessages.writeln('// Messages from compiling $filename.dart');
- var result = compile(filePath, realSdk);
+ // TODO(jmesserly): this was added to get some coverage of source maps
+ // We need a more comprehensive strategy to test them.
Siggi Cherem (dart-lang) 2015/03/18 16:16:13 how about detecting if there is one .map file in t
Jennifer Messerly 2015/03/18 16:17:53 that's a really good idea. I also thought about ha
+ var sourceMaps = filename == 'map_keys';
+ var result = compile(filePath, realSdk, sourceMaps: sourceMaps);
var success = !result.failure;
// Write compiler messages to disk.
« no previous file with comments | « test/codegen/map_keys.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698