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 library analyzer.test.generated.package_test; | 5 library analyzer.test.generated.package_test; |
6 | 6 |
7 import 'package:analyzer/file_system/file_system.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
8 import 'package:analyzer/src/generated/engine.dart'; | 8 import 'package:analyzer/src/generated/engine.dart'; |
9 import 'package:analyzer/src/generated/package.dart'; | 9 import 'package:analyzer/src/generated/package.dart'; |
10 import 'package:analyzer/src/generated/sdk.dart'; | 10 import 'package:analyzer/src/generated/sdk.dart'; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 @reflectiveTest | 156 @reflectiveTest |
157 class PackageDescriptionTest extends ResolverTestCase { | 157 class PackageDescriptionTest extends ResolverTestCase { |
158 void test_equal_false_differentOptions() { | 158 void test_equal_false_differentOptions() { |
159 String packageId = 'path1;path2'; | 159 String packageId = 'path1;path2'; |
160 DartSdk sdk = new MockSdk(); | 160 DartSdk sdk = new MockSdk(); |
161 AnalysisOptionsImpl options1 = new AnalysisOptionsImpl(); | 161 AnalysisOptionsImpl options1 = new AnalysisOptionsImpl(); |
162 AnalysisOptionsImpl options2 = new AnalysisOptionsImpl(); | 162 AnalysisOptionsImpl options2 = new AnalysisOptionsImpl(); |
163 options2.enableGenericMethods = !options1.enableGenericMethods; | 163 options2.enableLazyAssignmentOperators = |
| 164 !options1.enableLazyAssignmentOperators; |
164 PackageDescription first = new PackageDescription(packageId, sdk, options1); | 165 PackageDescription first = new PackageDescription(packageId, sdk, options1); |
165 PackageDescription second = | 166 PackageDescription second = |
166 new PackageDescription(packageId, sdk, options2); | 167 new PackageDescription(packageId, sdk, options2); |
167 expect(first == second, isFalse); | 168 expect(first == second, isFalse); |
168 } | 169 } |
169 | 170 |
170 void test_equal_false_differentPaths() { | 171 void test_equal_false_differentPaths() { |
171 String packageId1 = 'path1;path2'; | 172 String packageId1 = 'path1;path2'; |
172 String packageId2 = 'path1;path3'; | 173 String packageId2 = 'path1;path3'; |
173 DartSdk sdk = new MockSdk(); | 174 DartSdk sdk = new MockSdk(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 265 |
265 @override | 266 @override |
266 Map<String, Uri> asMap() => map; | 267 Map<String, Uri> asMap() => map; |
267 | 268 |
268 @override | 269 @override |
269 Uri resolve(Uri packageUri, {Uri notFound(Uri packageUri)}) { | 270 Uri resolve(Uri packageUri, {Uri notFound(Uri packageUri)}) { |
270 fail('Unexpected invocation of resolve'); | 271 fail('Unexpected invocation of resolve'); |
271 return null; | 272 return null; |
272 } | 273 } |
273 } | 274 } |
OLD | NEW |