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

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

Issue 1152013002: Add support for specifying files needing analysis (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 library test.edit.assists; 5 library test.edit.assists;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
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/server_plugin.dart';
11 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
12 import 'package:plugin/manager.dart'; 11 import 'package:plugin/manager.dart';
13 import 'package:test_reflective_loader/test_reflective_loader.dart'; 12 import 'package:test_reflective_loader/test_reflective_loader.dart';
14 import 'package:unittest/unittest.dart' hide ERROR; 13 import 'package:unittest/unittest.dart' hide ERROR;
15 14
16 import '../analysis_abstract.dart'; 15 import '../analysis_abstract.dart';
17 16
18 main() { 17 main() {
19 groupSep = ' | '; 18 groupSep = ' | ';
20 defineReflectiveTests(AssistsTest); 19 defineReflectiveTests(AssistsTest);
(...skipping 14 matching lines...) Expand all
35 Response response = handleSuccessfulRequest(request); 34 Response response = handleSuccessfulRequest(request);
36 var result = new EditGetAssistsResult.fromResponse(response); 35 var result = new EditGetAssistsResult.fromResponse(response);
37 changes = result.assists; 36 changes = result.assists;
38 } 37 }
39 38
40 @override 39 @override
41 void setUp() { 40 void setUp() {
42 super.setUp(); 41 super.setUp();
43 createProject(); 42 createProject();
44 ExtensionManager manager = new ExtensionManager(); 43 ExtensionManager manager = new ExtensionManager();
45 ServerPlugin plugin = new ServerPlugin(); 44 manager.processPlugins([server.serverPlugin]);
46 manager.processPlugins([plugin]); 45 handler = new EditDomainHandler(server);
47 handler = new EditDomainHandler(server, plugin);
48 } 46 }
49 47
50 Future test_removeTypeAnnotation() async { 48 Future test_removeTypeAnnotation() async {
51 addTestFile(''' 49 addTestFile('''
52 main() { 50 main() {
53 int v = 1; 51 int v = 1;
54 } 52 }
55 '''); 53 ''');
56 await waitForTasksFinished(); 54 await waitForTasksFinished();
57 prepareAssists('v ='); 55 prepareAssists('v =');
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 if (change.message == message) { 102 if (change.message == message) {
105 String resultCode = 103 String resultCode =
106 SourceEdit.applySequence(testCode, change.edits[0].edits); 104 SourceEdit.applySequence(testCode, change.edits[0].edits);
107 expect(resultCode, expectedCode); 105 expect(resultCode, expectedCode);
108 return; 106 return;
109 } 107 }
110 } 108 }
111 fail("Expected to find |$message| in\n" + changes.join('\n')); 109 fail("Expected to find |$message| in\n" + changes.join('\n'));
112 } 110 }
113 } 111 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/domain_server_test.dart ('k') | pkg/analysis_server/test/edit/fixes_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698