| Index: pkg/analysis_server/test/edit/format_test.dart
|
| diff --git a/pkg/analysis_server/test/edit/format_test.dart b/pkg/analysis_server/test/edit/format_test.dart
|
| index f45990056ba030fcfd16c71fb76f0ec7df7b1069..6a8e870e099a56719e7252efc45d765546dc2b33 100644
|
| --- a/pkg/analysis_server/test/edit/format_test.dart
|
| +++ b/pkg/analysis_server/test/edit/format_test.dart
|
| @@ -7,7 +7,9 @@ library test.edit.format;
|
| import 'dart:async';
|
|
|
| import 'package:analysis_server/src/edit/edit_domain.dart';
|
| +import 'package:analysis_server/src/plugin/server_plugin.dart';
|
| import 'package:analysis_server/src/protocol.dart';
|
| +import 'package:analyzer/src/plugin/plugin_impl.dart';
|
| import 'package:unittest/unittest.dart' hide ERROR;
|
|
|
| import '../analysis_abstract.dart';
|
| @@ -24,7 +26,24 @@ class FormatTest extends AbstractAnalysisTest {
|
| void setUp() {
|
| super.setUp();
|
| createProject();
|
| - handler = new EditDomainHandler(server);
|
| + ExtensionManager manager = new ExtensionManager();
|
| + ServerPlugin plugin = new ServerPlugin();
|
| + manager.processPlugins([plugin]);
|
| + handler = new EditDomainHandler(server, plugin);
|
| + }
|
| +
|
| + Future test_formatNoOp() {
|
| + // Already formatted source
|
| + addTestFile('''
|
| +main() {
|
| + int x = 3;
|
| +}
|
| +''');
|
| + return waitForTasksFinished().then((_) {
|
| + EditFormatResult formatResult = _formatAt(0, 3);
|
| + expect(formatResult.edits, isNotNull);
|
| + expect(formatResult.edits, hasLength(0));
|
| + });
|
| }
|
|
|
| Future test_formatSimple() {
|
| @@ -48,20 +67,6 @@ main() {
|
| });
|
| }
|
|
|
| - Future test_formatNoOp() {
|
| - // Already formatted source
|
| - addTestFile('''
|
| -main() {
|
| - int x = 3;
|
| -}
|
| -''');
|
| - return waitForTasksFinished().then((_) {
|
| - EditFormatResult formatResult = _formatAt(0, 3);
|
| - expect(formatResult.edits, isNotNull);
|
| - expect(formatResult.edits, hasLength(0));
|
| - });
|
| - }
|
| -
|
| EditFormatResult _formatAt(int selectionOffset, int selectionLength) {
|
| Request request = new EditFormatParams(
|
| testFile, selectionOffset, selectionLength).toRequest('0');
|
|
|