OLD | NEW |
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 import 'package:analyzer/dart/element/type.dart'; | 5 import 'package:analyzer/dart/element/type.dart'; |
6 import 'package:analyzer/src/dart/element/element.dart'; | 6 import 'package:analyzer/src/dart/element/element.dart'; |
7 import 'package:analyzer/src/summary/format.dart'; | 7 import 'package:analyzer/src/summary/format.dart'; |
8 import 'package:analyzer/src/summary/idl.dart'; | 8 import 'package:analyzer/src/summary/idl.dart'; |
9 import 'package:analyzer/src/summary/link.dart'; | 9 import 'package:analyzer/src/summary/link.dart'; |
| 10 import 'package:test/test.dart'; |
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
11 import 'package:unittest/unittest.dart'; | |
12 | 12 |
13 import 'summarize_ast_test.dart'; | 13 import 'summarize_ast_test.dart'; |
14 | 14 |
15 main() { | 15 main() { |
16 groupSep = ' | '; | 16 defineReflectiveSuite(() { |
17 defineReflectiveTests(LinkerUnitTest); | 17 defineReflectiveTests(LinkerUnitTest); |
| 18 }); |
18 } | 19 } |
19 | 20 |
20 @reflectiveTest | 21 @reflectiveTest |
21 class LinkerUnitTest extends SummaryLinkerTest { | 22 class LinkerUnitTest extends SummaryLinkerTest { |
22 Linker linker; | 23 Linker linker; |
23 | 24 |
24 LinkerInputs linkerInputs; | 25 LinkerInputs linkerInputs; |
25 LibraryElementInBuildUnit _testLibrary; | 26 LibraryElementInBuildUnit _testLibrary; |
26 @override | 27 @override |
27 bool get allowMissingFiles => false; | 28 bool get allowMissingFiles => false; |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
950 */ | 951 */ |
951 EntityRef _lookupInferredType(LinkedUnit unit, int slot) { | 952 EntityRef _lookupInferredType(LinkedUnit unit, int slot) { |
952 for (EntityRef ref in unit.types) { | 953 for (EntityRef ref in unit.types) { |
953 if (ref.slot == slot) { | 954 if (ref.slot == slot) { |
954 return ref; | 955 return ref; |
955 } | 956 } |
956 } | 957 } |
957 return null; | 958 return null; |
958 } | 959 } |
959 } | 960 } |
OLD | NEW |