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

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

Issue 2391423003: Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0. (Closed)
Patch Set: Created 4 years, 2 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/test.dart';
13 import 'package:test_reflective_loader/test_reflective_loader.dart'; 14 import 'package:test_reflective_loader/test_reflective_loader.dart';
14 import 'package:unittest/unittest.dart';
15 15
16 main() { 16 main() {
17 groupSep = ' | '; 17 defineReflectiveSuite(() {
18 defineReflectiveTests(InSummarySourceTest); 18 defineReflectiveTests(InSummarySourceTest);
19 });
19 } 20 }
20 21
21 @reflectiveTest 22 @reflectiveTest
22 class InSummarySourceTest extends ReflectiveTest { 23 class InSummarySourceTest extends ReflectiveTest {
23 test_fallbackPath() { 24 test_fallbackPath() {
24 String fooFallbackPath = absolute('path', 'to', 'foo.dart'); 25 String fooFallbackPath = absolute('path', 'to', 'foo.dart');
25 var sourceFactory = new SourceFactory([ 26 var sourceFactory = new SourceFactory([
26 new InSummaryUriResolver( 27 new InSummaryUriResolver(
27 PhysicalResourceProvider.INSTANCE, 28 PhysicalResourceProvider.INSTANCE,
28 new MockSummaryDataStore.fake({ 29 new MockSummaryDataStore.fake({
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // We don't populate the values as it is not needed for the test. 76 // We don't populate the values as it is not needed for the test.
76 var unlinkedMap = new Map<String, UnlinkedUnit>.fromIterable( 77 var unlinkedMap = new Map<String, UnlinkedUnit>.fromIterable(
77 uriToSummary.keys, 78 uriToSummary.keys,
78 value: (uri) => new UnlinkedUnitBuilder( 79 value: (uri) => new UnlinkedUnitBuilder(
79 fallbackModePath: uriToFallbackModePath[uri])); 80 fallbackModePath: uriToFallbackModePath[uri]));
80 return new MockSummaryDataStore(null, unlinkedMap, uriToSummary); 81 return new MockSummaryDataStore(null, unlinkedMap, uriToSummary);
81 } 82 }
82 83
83 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 84 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
84 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698