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

Side by Side Diff: pkg/analyzer/test/src/summary/in_summary_source_test.dart

Issue 2298913003: Pull in test_reflective_loader 0.0.4 and switch analyzer to it. (Closed)
Patch Set: Fixes for review comments. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.test.src.summary.in_summary_source_test; 5 library analyzer.test.src.summary.in_summary_source_test;
6 6
7 import 'package:analyzer/file_system/physical_file_system.dart'; 7 import 'package:analyzer/file_system/physical_file_system.dart';
8 import 'package:analyzer/src/generated/source_io.dart'; 8 import 'package:analyzer/src/generated/source_io.dart';
9 import 'package:analyzer/src/summary/format.dart'; 9 import 'package:analyzer/src/summary/format.dart';
10 import 'package:analyzer/src/summary/idl.dart'; 10 import 'package:analyzer/src/summary/idl.dart';
11 import 'package:analyzer/src/summary/package_bundle_reader.dart'; 11 import 'package:analyzer/src/summary/package_bundle_reader.dart';
12 import 'package:path/path.dart'; 12 import 'package:path/path.dart';
13 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 import 'package:unittest/unittest.dart'; 14 import 'package:unittest/unittest.dart';
14 15
15 import '../../reflective_tests.dart';
16
17 main() { 16 main() {
18 groupSep = ' | '; 17 groupSep = ' | ';
19 runReflectiveTests(InSummarySourceTest); 18 defineReflectiveTests(InSummarySourceTest);
20 } 19 }
21 20
22 @reflectiveTest 21 @reflectiveTest
23 class InSummarySourceTest extends ReflectiveTest { 22 class InSummarySourceTest extends ReflectiveTest {
24 test_fallbackPath() { 23 test_fallbackPath() {
25 String fooFallbackPath = absolute('path', 'to', 'foo.dart'); 24 String fooFallbackPath = absolute('path', 'to', 'foo.dart');
26 var sourceFactory = new SourceFactory([ 25 var sourceFactory = new SourceFactory([
27 new InSummaryUriResolver( 26 new InSummaryUriResolver(
28 PhysicalResourceProvider.INSTANCE, 27 PhysicalResourceProvider.INSTANCE,
29 new MockSummaryDataStore.fake({ 28 new MockSummaryDataStore.fake({
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // We don't populate the values as it is not needed for the test. 75 // We don't populate the values as it is not needed for the test.
77 var unlinkedMap = new Map<String, UnlinkedUnit>.fromIterable( 76 var unlinkedMap = new Map<String, UnlinkedUnit>.fromIterable(
78 uriToSummary.keys, 77 uriToSummary.keys,
79 value: (uri) => new UnlinkedUnitBuilder( 78 value: (uri) => new UnlinkedUnitBuilder(
80 fallbackModePath: uriToFallbackModePath[uri])); 79 fallbackModePath: uriToFallbackModePath[uri]));
81 return new MockSummaryDataStore(null, unlinkedMap, uriToSummary); 80 return new MockSummaryDataStore(null, unlinkedMap, uriToSummary);
82 } 81 }
83 82
84 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 83 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
85 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698