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

Unified Diff: pkg/analyzer/test/src/summary/in_summary_source_test.dart

Issue 2257483002: Remove more references to FileBasedSource (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « pkg/analyzer/lib/src/summary/summary_sdk.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/in_summary_source_test.dart
diff --git a/pkg/analyzer/test/src/summary/in_summary_source_test.dart b/pkg/analyzer/test/src/summary/in_summary_source_test.dart
index f45602c49b6d8f3242fb0401d44f41f7f4ae25cc..f83d30ab9ef91cc68b73b2f53f1cfb539faca525 100644
--- a/pkg/analyzer/test/src/summary/in_summary_source_test.dart
+++ b/pkg/analyzer/test/src/summary/in_summary_source_test.dart
@@ -4,6 +4,7 @@
library analyzer.test.src.summary.in_summary_source_test;
+import 'package:analyzer/file_system/physical_file_system.dart';
import 'package:analyzer/src/generated/source_io.dart';
import 'package:analyzer/src/summary/format.dart';
import 'package:analyzer/src/summary/idl.dart';
@@ -23,35 +24,41 @@ class InSummarySourceTest extends ReflectiveTest {
test_fallbackPath() {
String fooFallbackPath = absolute('path', 'to', 'foo.dart');
var sourceFactory = new SourceFactory([
- new InSummaryPackageUriResolver(new MockSummaryDataStore.fake(
- {'package:foo/foo.dart': 'foo.sum',},
- uriToFallbackModePath: {'package:foo/foo.dart': fooFallbackPath}))
+ new InSummaryUriResolver(
+ PhysicalResourceProvider.INSTANCE,
+ new MockSummaryDataStore.fake({
+ 'package:foo/foo.dart': 'foo.sum',
+ }, uriToFallbackModePath: {
+ 'package:foo/foo.dart': fooFallbackPath
+ }))
]);
InSummarySource source = sourceFactory.forUri('package:foo/foo.dart');
- expect(source, new isInstanceOf<FileBasedSource>());
+ expect(source, isNotNull);
Brian Wilkerson 2016/08/17 15:11:52 Is there a reason why we were testing the class of
scheglov 2016/08/17 15:42:24 You are right that clients should not care, as lon
expect(source.fullName, fooFallbackPath);
}
test_InSummarySource() {
var sourceFactory = new SourceFactory([
- new InSummaryPackageUriResolver(new MockSummaryDataStore.fake({
- 'package:foo/foo.dart': 'foo.sum',
- 'package:foo/src/foo_impl.dart': 'foo.sum',
- 'package:bar/baz.dart': 'bar.sum',
- }))
+ new InSummaryUriResolver(
+ PhysicalResourceProvider.INSTANCE,
+ new MockSummaryDataStore.fake({
+ 'package:foo/foo.dart': 'foo.sum',
+ 'package:foo/src/foo_impl.dart': 'foo.sum',
+ 'package:bar/baz.dart': 'bar.sum',
+ }))
]);
InSummarySource source = sourceFactory.forUri('package:foo/foo.dart');
- expect(source, isNot(new isInstanceOf<FileBasedSource>()));
+ expect(source, isNotNull);
expect(source.summaryPath, 'foo.sum');
source = sourceFactory.forUri('package:foo/src/foo_impl.dart');
- expect(source, isNot(new isInstanceOf<FileBasedSource>()));
+ expect(source, isNotNull);
expect(source.summaryPath, 'foo.sum');
source = sourceFactory.forUri('package:bar/baz.dart');
- expect(source, isNot(new isInstanceOf<FileBasedSource>()));
+ expect(source, isNotNull);
expect(source.summaryPath, 'bar.sum');
}
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/summary_sdk.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698