Fix dart2js/sourcemaps/minified_names_test
TBR=sigmund@google.com
Change-Id: Ie48333f2bfa9352c7ff787acc00dc12aa5c97cd5
Reviewed-on: https://dart-review.googlesource.com/68846
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
diff --git a/tests/compiler/dart2js/sourcemaps/minified_names_test.dart b/tests/compiler/dart2js/sourcemaps/minified_names_test.dart
index 642296d..6b12c54 100644
--- a/tests/compiler/dart2js/sourcemaps/minified_names_test.dart
+++ b/tests/compiler/dart2js/sourcemaps/minified_names_test.dart
@@ -108,6 +108,10 @@
print(' obfuscated-name: $name');
Expect.isNotNull(name, 'Error didn\'t contain a name\nerror: $error');
+ if (name.startsWith('minified:')) {
+ name = name.substring(9);
+ }
+
var sourceMap = '${result.outputPath}.map';
var json = jsonDecode(await new File(sourceMap).readAsString());
@@ -119,7 +123,7 @@
var actualName;
if (test.isGlobal) {
var index = minifiedNames['global'][name];
- Expect.isNotNull(index);
+ Expect.isNotNull(index, "'$name' not in global name map");
actualName = json['names'][index];
} else if (test.isInstance) {
var index = minifiedNames['instance'][name];