| Index: pkg/analysis_server/test/plugin/plugin_impl_test.dart
|
| diff --git a/pkg/analysis_server/test/plugin/plugin_impl_test.dart b/pkg/analysis_server/test/plugin/plugin_impl_test.dart
|
| index 779c2ca54e76eabd27d96c5c8cf7587a3a3d0c86..3d55dc54bed87a53a55c23f4e8bc1e0d4c6aaebd 100644
|
| --- a/pkg/analysis_server/test/plugin/plugin_impl_test.dart
|
| +++ b/pkg/analysis_server/test/plugin/plugin_impl_test.dart
|
| @@ -39,8 +39,7 @@ main() {
|
|
|
| test('registerExtension - non existent', () {
|
| ExtensionManager manager = new ExtensionManager();
|
| - expect(
|
| - () => manager.registerExtension('does not exist', 'extension'),
|
| + expect(() => manager.registerExtension('does not exist', 'extension'),
|
| throwsA(new isInstanceOf<ExtensionError>()));
|
| ;
|
| });
|
| @@ -50,27 +49,21 @@ main() {
|
| Plugin plugin2 = new TestPlugin('plugin2');
|
| ExtensionManager manager = new ExtensionManager();
|
| expect(
|
| - manager.registerExtensionPoint(plugin1, 'point1', null),
|
| - isNotNull);
|
| + manager.registerExtensionPoint(plugin1, 'point1', null), isNotNull);
|
| expect(
|
| - manager.registerExtensionPoint(plugin1, 'point2', null),
|
| - isNotNull);
|
| + manager.registerExtensionPoint(plugin1, 'point2', null), isNotNull);
|
| expect(
|
| - manager.registerExtensionPoint(plugin2, 'point1', null),
|
| - isNotNull);
|
| + manager.registerExtensionPoint(plugin2, 'point1', null), isNotNull);
|
| expect(
|
| - manager.registerExtensionPoint(plugin2, 'point2', null),
|
| - isNotNull);
|
| + manager.registerExtensionPoint(plugin2, 'point2', null), isNotNull);
|
| });
|
|
|
| test('registerExtensionPoint - conflicting - same plugin', () {
|
| Plugin plugin1 = new TestPlugin('plugin1');
|
| ExtensionManager manager = new ExtensionManager();
|
| expect(
|
| - manager.registerExtensionPoint(plugin1, 'point1', null),
|
| - isNotNull);
|
| - expect(
|
| - () => manager.registerExtensionPoint(plugin1, 'point1', null),
|
| + manager.registerExtensionPoint(plugin1, 'point1', null), isNotNull);
|
| + expect(() => manager.registerExtensionPoint(plugin1, 'point1', null),
|
| throwsA(new isInstanceOf<ExtensionError>()));
|
| });
|
|
|
| @@ -79,10 +72,8 @@ main() {
|
| Plugin plugin2 = new TestPlugin('plugin1');
|
| ExtensionManager manager = new ExtensionManager();
|
| expect(
|
| - manager.registerExtensionPoint(plugin1, 'point1', null),
|
| - isNotNull);
|
| - expect(
|
| - () => manager.registerExtensionPoint(plugin2, 'point1', null),
|
| + manager.registerExtensionPoint(plugin1, 'point1', null), isNotNull);
|
| + expect(() => manager.registerExtensionPoint(plugin2, 'point1', null),
|
| throwsA(new isInstanceOf<ExtensionError>()));
|
| });
|
| });
|
| @@ -126,8 +117,8 @@ main() {
|
|
|
| test('add - with validator - valid', () {
|
| Plugin plugin = new TestPlugin('plugin');
|
| - ExtensionPointImpl point =
|
| - new ExtensionPointImpl(plugin, 'point', (Object extension) {
|
| + ExtensionPointImpl point = new ExtensionPointImpl(plugin, 'point',
|
| + (Object extension) {
|
| if (extension is! String) {
|
| throw new ExtensionError('');
|
| }
|
| @@ -137,8 +128,8 @@ main() {
|
|
|
| test('add - with validator - invalid', () {
|
| Plugin plugin = new TestPlugin('plugin');
|
| - ExtensionPointImpl point =
|
| - new ExtensionPointImpl(plugin, 'point', (Object extension) {
|
| + ExtensionPointImpl point = new ExtensionPointImpl(plugin, 'point',
|
| + (Object extension) {
|
| if (extension is! String) {
|
| throw new ExtensionError('');
|
| }
|
|
|