Index: tests/compiler/dart2js/source_mapping_test.dart |
diff --git a/tests/compiler/dart2js/source_mapping_test.dart b/tests/compiler/dart2js/source_mapping_test.dart |
index 8b5fa4e2ca24fe93a4b2e15a5627594ff417ae0e..77ab4d0103d34b38bedcb70b201e64a286e3a563 100644 |
--- a/tests/compiler/dart2js/source_mapping_test.dart |
+++ b/tests/compiler/dart2js/source_mapping_test.dart |
@@ -30,11 +30,12 @@ void testSourceMapLocations(String codeWithMarkers) { |
} |
String code = codeWithMarkers.replaceAll('@', ''); |
- SourceFile sourceFile = new StringSourceFile('<test script>', code); |
+ SourceFile sourceFile = new StringSourceFile.fromName('<test script>', code); |
asyncTest(() => compileAll(sourceFile).then((CodeOutput output) { |
Set<int> locations = new Set<int>(); |
output.forEachSourceLocation((int offset, var sourcePosition) { |
- if (sourcePosition != null && sourcePosition.sourceFile == sourceFile) { |
+ if (sourcePosition != null && |
+ sourcePosition.sourceUri == sourceFile.uri) { |
locations.add(sourcePosition.token.charOffset); |
} |
}); |
@@ -44,7 +45,7 @@ void testSourceMapLocations(String codeWithMarkers) { |
if (!locations.contains(expectedLocation)) { |
int originalLocation = expectedLocation + i; |
SourceFile sourceFileWithMarkers = |
- new StringSourceFile('<test script>', codeWithMarkers); |
+ new StringSourceFile.fromName('<test script>', codeWithMarkers); |
String message = sourceFileWithMarkers.getLocationMessage( |
'Missing location', originalLocation, originalLocation + 1); |
Expect.fail(message); |