OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// Test that sdk extensions are properly detected in various scenarios. | 5 /// Test that sdk extensions are properly detected in various scenarios. |
6 library analyzer_cli.test.sdk_ext; | 6 library analyzer_cli.test.sdk_ext; |
7 | 7 |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:analyzer/src/dart/sdk/sdk.dart'; | 10 import 'package:analyzer/src/dart/sdk/sdk.dart'; |
11 import 'package:analyzer/src/generated/sdk.dart'; | 11 import 'package:analyzer/src/generated/sdk.dart'; |
12 import 'package:analyzer_cli/src/driver.dart' show Driver, errorSink, outSink; | 12 import 'package:analyzer_cli/src/analyzer_driver.dart' |
13 import 'package:analyzer_cli/src/options.dart'; | 13 show Driver, errorSink, outSink; |
| 14 import 'package:analyzer_cli/src/analyzer_options.dart'; |
14 import 'package:path/path.dart' as path; | 15 import 'package:path/path.dart' as path; |
15 import 'package:test/test.dart'; | 16 import 'package:test/test.dart'; |
16 | 17 |
17 import 'utils.dart'; | 18 import 'utils.dart'; |
18 | 19 |
19 main() { | 20 main() { |
20 group('Sdk extensions', () { | 21 group('Sdk extensions', () { |
21 StringSink savedOutSink, savedErrorSink; | 22 StringSink savedOutSink, savedErrorSink; |
22 int savedExitCode; | 23 int savedExitCode; |
23 ExitHandler savedExitHandler; | 24 ExitHandler savedExitHandler; |
(...skipping 24 matching lines...) Expand all Loading... |
48 ]); | 49 ]); |
49 | 50 |
50 DartSdk sdk = driver.sdk; | 51 DartSdk sdk = driver.sdk; |
51 expect(sdk, new isInstanceOf<FolderBasedDartSdk>()); | 52 expect(sdk, new isInstanceOf<FolderBasedDartSdk>()); |
52 expect((sdk as FolderBasedDartSdk).useSummary, isFalse); | 53 expect((sdk as FolderBasedDartSdk).useSummary, isFalse); |
53 | 54 |
54 expect(exitCode, 0); | 55 expect(exitCode, 0); |
55 }); | 56 }); |
56 }); | 57 }); |
57 } | 58 } |
OLD | NEW |