| 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_cli.test.boot_loader_test; | 5 library analyzer_cli.test.boot_loader_test; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/plugin/plugin_configuration.dart'; | 9 import 'package:analyzer/src/plugin/plugin_configuration.dart'; |
| 10 import 'package:analyzer_cli/src/boot_loader.dart'; | 10 import 'package:analyzer_cli/src/boot_loader.dart'; |
| 11 import 'package:analyzer_cli/src/driver.dart'; | 11 import 'package:analyzer_cli/src/driver.dart'; |
| 12 import 'package:analyzer_cli/src/options.dart'; | 12 import 'package:analyzer_cli/src/options.dart'; |
| 13 import 'package:path/path.dart' as path; | 13 import 'package:path/path.dart' as path; |
| 14 import 'package:unittest/unittest.dart'; | 14 import 'package:test/test.dart'; |
| 15 | 15 |
| 16 import 'utils.dart'; | 16 import 'utils.dart'; |
| 17 | 17 |
| 18 main() { | 18 main() { |
| 19 StringSink savedOutSink, savedErrorSink; | 19 StringSink savedOutSink, savedErrorSink; |
| 20 int savedExitCode; | 20 int savedExitCode; |
| 21 ExitHandler savedExitHandler; | 21 ExitHandler savedExitHandler; |
| 22 | 22 |
| 23 /// Base setup. | 23 /// Base setup. |
| 24 _setUp() { | 24 _setUp() { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 36 outSink = savedOutSink; | 36 outSink = savedOutSink; |
| 37 errorSink = savedErrorSink; | 37 errorSink = savedErrorSink; |
| 38 exitCode = savedExitCode; | 38 exitCode = savedExitCode; |
| 39 exitHandler = savedExitHandler; | 39 exitHandler = savedExitHandler; |
| 40 } | 40 } |
| 41 | 41 |
| 42 setUp(() => _setUp()); | 42 setUp(() => _setUp()); |
| 43 | 43 |
| 44 tearDown(() => _tearDown()); | 44 tearDown(() => _tearDown()); |
| 45 | 45 |
| 46 initializeTestEnvironment(); | |
| 47 | |
| 48 group('Bootloader', () { | 46 group('Bootloader', () { |
| 49 group('plugin processing', () { | 47 group('plugin processing', () { |
| 50 test('bad format', () { | 48 test('bad format', () { |
| 51 BootLoader loader = new BootLoader(); | 49 BootLoader loader = new BootLoader(); |
| 52 loader.createImage([ | 50 loader.createImage([ |
| 53 '--options', | 51 '--options', |
| 54 path.join(testDirectory, 'data/bad_plugin_options.yaml'), | 52 path.join(testDirectory, 'data/bad_plugin_options.yaml'), |
| 55 path.join(testDirectory, 'data/test_file.dart') | 53 path.join(testDirectory, 'data/test_file.dart') |
| 56 ]); | 54 ]); |
| 57 expect( | 55 expect( |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 validate(new PluginInfo( | 87 validate(new PluginInfo( |
| 90 name: 'test_plugin', | 88 name: 'test_plugin', |
| 91 className: 'MyPlugin', | 89 className: 'MyPlugin', |
| 92 libraryUri: 'my_package/foo.dart')), | 90 libraryUri: 'my_package/foo.dart')), |
| 93 isNull); | 91 isNull); |
| 94 }); | 92 }); |
| 95 }); | 93 }); |
| 96 }); | 94 }); |
| 97 }); | 95 }); |
| 98 } | 96 } |
| OLD | NEW |