| 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 library analyzer_cli.test.plugin_manager_test; | 5 library analyzer_cli.test.plugin_manager_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/plugin/plugin_configuration.dart'; | 7 import 'package:analyzer/src/plugin/plugin_configuration.dart'; |
| 8 import 'package:analyzer_cli/src/plugin/plugin_manager.dart'; | 8 import 'package:analyzer_cli/src/plugin/plugin_manager.dart'; |
| 9 import 'package:unittest/unittest.dart'; | 9 import 'package:test/test.dart'; |
| 10 | 10 |
| 11 main() { | 11 main() { |
| 12 group('plugin manager tests', () { | 12 group('plugin manager tests', () { |
| 13 test('combine plugin info', () { | 13 test('combine plugin info', () { |
| 14 PluginInfo localInfo = new PluginInfo(name: 'my_plugin'); | 14 PluginInfo localInfo = new PluginInfo(name: 'my_plugin'); |
| 15 PluginInfo manifestInfo = new PluginInfo( | 15 PluginInfo manifestInfo = new PluginInfo( |
| 16 className: 'MyPlugin', libraryUri: 'my_plugin/my_plugin.dart'); | 16 className: 'MyPlugin', libraryUri: 'my_plugin/my_plugin.dart'); |
| 17 | 17 |
| 18 PluginInfo merged = combine(localInfo, manifestInfo); | 18 PluginInfo merged = combine(localInfo, manifestInfo); |
| 19 expect(merged.name, equals('my_plugin')); | 19 expect(merged.name, equals('my_plugin')); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 expect(plugins[1].status, equals(PluginStatus.Applicable)); | 84 expect(plugins[1].status, equals(PluginStatus.Applicable)); |
| 85 expect(plugins[2].plugin.name, equals('my_plugin3')); | 85 expect(plugins[2].plugin.name, equals('my_plugin3')); |
| 86 expect(plugins[2].status, equals(PluginStatus.NotApplicable)); | 86 expect(plugins[2].status, equals(PluginStatus.NotApplicable)); |
| 87 }); | 87 }); |
| 88 }); | 88 }); |
| 89 } | 89 } |
| 90 | 90 |
| 91 List<PluginDetails> sortByName(Iterable<PluginDetails> details) => | 91 List<PluginDetails> sortByName(Iterable<PluginDetails> details) => |
| 92 details.toList() | 92 details.toList() |
| 93 ..sort((p1, p2) => p1.plugin.name.compareTo(p2.plugin.name)); | 93 ..sort((p1, p2) => p1.plugin.name.compareTo(p2.plugin.name)); |
| OLD | NEW |