Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: pkg/analysis_server/test/edit/fixes_test.dart

Issue 3001413002: Remove uses of the old plugin model from the analysis server (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analysis_server/protocol/protocol.dart'; 7 import 'package:analysis_server/protocol/protocol.dart';
8 import 'package:analysis_server/protocol/protocol_generated.dart'; 8 import 'package:analysis_server/protocol/protocol_generated.dart';
9 import 'package:analysis_server/src/edit/edit_domain.dart'; 9 import 'package:analysis_server/src/edit/edit_domain.dart';
10 import 'package:analysis_server/src/plugin/plugin_manager.dart'; 10 import 'package:analysis_server/src/plugin/plugin_manager.dart';
11 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin; 11 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
12 import 'package:analyzer_plugin/protocol/protocol_common.dart'; 12 import 'package:analyzer_plugin/protocol/protocol_common.dart';
13 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin; 13 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
14 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart' as plugin; 14 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart' as plugin;
15 import 'package:plugin/manager.dart';
16 import 'package:test/test.dart'; 15 import 'package:test/test.dart';
17 import 'package:test_reflective_loader/test_reflective_loader.dart'; 16 import 'package:test_reflective_loader/test_reflective_loader.dart';
18 17
19 import '../analysis_abstract.dart'; 18 import '../analysis_abstract.dart';
20 19
21 main() { 20 main() {
22 defineReflectiveSuite(() { 21 defineReflectiveSuite(() {
23 defineReflectiveTests(FixesTest); 22 defineReflectiveTests(FixesTest);
24 }); 23 });
25 } 24 }
26 25
27 @reflectiveTest 26 @reflectiveTest
28 class FixesTest extends AbstractAnalysisTest { 27 class FixesTest extends AbstractAnalysisTest {
29 @override 28 @override
30 void setUp() { 29 void setUp() {
31 super.setUp(); 30 super.setUp();
32 ExtensionManager manager = new ExtensionManager();
33 manager.processPlugins([server.serverPlugin]);
34 handler = new EditDomainHandler(server); 31 handler = new EditDomainHandler(server);
35 } 32 }
36 33
37 test_fixUndefinedClass() async { 34 test_fixUndefinedClass() async {
38 createProject(); 35 createProject();
39 addTestFile(''' 36 addTestFile('''
40 main() { 37 main() {
41 Future<String> x = null; 38 Future<String> x = null;
42 } 39 }
43 '''); 40 ''');
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return await _getFixes(offset); 155 return await _getFixes(offset);
159 } 156 }
160 157
161 void _isSyntacticErrorWithSingleFix(AnalysisErrorFixes fixes) { 158 void _isSyntacticErrorWithSingleFix(AnalysisErrorFixes fixes) {
162 AnalysisError error = fixes.error; 159 AnalysisError error = fixes.error;
163 expect(error.severity, AnalysisErrorSeverity.ERROR); 160 expect(error.severity, AnalysisErrorSeverity.ERROR);
164 expect(error.type, AnalysisErrorType.SYNTACTIC_ERROR); 161 expect(error.type, AnalysisErrorType.SYNTACTIC_ERROR);
165 expect(fixes.fixes, hasLength(1)); 162 expect(fixes.fixes, hasLength(1));
166 } 163 }
167 } 164 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/edit/assists_test.dart ('k') | pkg/analysis_server/test/edit/format_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698