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

Unified Diff: tests/compiler/dart2js/sourcemaps/source_mapping_test_viewer.dart

Issue 1287973002: Check for one-to-many source mappings. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
Index: tests/compiler/dart2js/sourcemaps/source_mapping_test_viewer.dart
diff --git a/tests/compiler/dart2js/sourcemaps/source_mapping_test_viewer.dart b/tests/compiler/dart2js/sourcemaps/source_mapping_test_viewer.dart
index 469156852c15e984a00d7dfc2b835c353b97a023..215092ae91431d78b24973fef2a38f1c94e1adc7 100644
--- a/tests/compiler/dart2js/sourcemaps/source_mapping_test_viewer.dart
+++ b/tests/compiler/dart2js/sourcemaps/source_mapping_test_viewer.dart
@@ -133,19 +133,19 @@ Future<Measurement> runTest(
TestResult result =
await runTests(config, filename, options, verbose: verbose);
if (outputUri != null) {
- if (result.failureMap.isNotEmpty) {
- result.failureMap.forEach((info, missingCodePoints) {
- print("Missing code points for ${info.element} in '$filename' "
- "in config '$config':");
- for (CodePoint codePoint in missingCodePoints) {
- print(" $codePoint");
- }
- });
+ if (result.missingCodePointsMap.isNotEmpty) {
+ result.printMissingCodePoints();
+ }
+ if (result.multipleNodesMap.isNotEmpty) {
+ result.printMultipleNodes();
+ }
+ if (result.multipleOffsetsMap.isNotEmpty) {
+ result.printMultipleOffsets();
}
createTraceSourceMapHtml(outputUri, result.processor, result.userInfoList);
}
return new Measurement(config, filename,
- result.failureMap.values.fold(0, (s, i) => s + i.length),
+ result.missingCodePointsMap.values.fold(0, (s, i) => s + i.length),
result.userInfoList.fold(0, (s, i) => s + i.codePoints.length));
}
« no previous file with comments | « pkg/js_ast/test/printer_callback_test.dart ('k') | tests/compiler/dart2js/sourcemaps/source_mapping_tester.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698