Index: pkg/smoke/test/codegen/testing_resolver_utils.dart |
diff --git a/pkg/smoke/test/codegen/testing_resolver_utils.dart b/pkg/smoke/test/codegen/testing_resolver_utils.dart |
index 7a76614f5dc030967df81548152f76d7e5f1434f..5ae808a19eedd881d98dad6361597a469cc51a9f 100644 |
--- a/pkg/smoke/test/codegen/testing_resolver_utils.dart |
+++ b/pkg/smoke/test/codegen/testing_resolver_utils.dart |
@@ -62,11 +62,13 @@ class _SimpleUriResolver implements UriResolver { |
} |
class _SimpleSource extends Source { |
+ final Uri uri; |
final String path; |
final String rawContents; |
final Map<String, Source> allSources; |
- _SimpleSource(this.path, this.rawContents, this.allSources); |
+ _SimpleSource(this.path, this.rawContents, this.allSources) |
+ : uri = Uri.parse('file:///path'); |
operator ==(other) => other is _SimpleSource && |
rawContents == other.rawContents; |
@@ -86,9 +88,11 @@ class _SimpleSource extends Source { |
// Since this is just for simple tests we just restricted this mock |
// to root-relative imports. For more sophisticated stuff, you should be |
// using the test helpers in `package:code_transformers`. |
- Source resolveRelative(Uri uri) { |
- if (uri.path.startsWith('/')) return allSources['${uri.path}']; |
- throw new UnimplementedError('relative URIs not supported: $uri'); |
+ Uri resolveRelative(Uri uri) { |
+ if (!uri.path.startsWith('/')) { |
+ throw new UnimplementedError('relative URIs not supported: $uri'); |
+ } |
+ return uri; |
} |
void getContentsToReceiver(Source_ContentReceiver receiver) { |