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

Side by Side Diff: pkg/analysis_server/test/services/completion/completion_test_util.dart

Issue 1117963002: add import file uri suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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 | Annotate | Revision Log
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.services.completion.util; 5 library test.services.completion.util;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/analysis_server.dart'; 9 import 'package:analysis_server/src/analysis_server.dart';
10 import 'package:analysis_server/src/protocol.dart' as protocol 10 import 'package:analysis_server/src/protocol.dart' as protocol
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void addTestSource(String content) { 58 void addTestSource(String content) {
59 expect(completionOffset, isNull, reason: 'Call addTestUnit exactly once'); 59 expect(completionOffset, isNull, reason: 'Call addTestUnit exactly once');
60 completionOffset = content.indexOf('^'); 60 completionOffset = content.indexOf('^');
61 expect(completionOffset, isNot(equals(-1)), reason: 'missing ^'); 61 expect(completionOffset, isNot(equals(-1)), reason: 'missing ^');
62 int nextOffset = content.indexOf('^', completionOffset + 1); 62 int nextOffset = content.indexOf('^', completionOffset + 1);
63 expect(nextOffset, equals(-1), reason: 'too many ^'); 63 expect(nextOffset, equals(-1), reason: 'too many ^');
64 content = content.substring(0, completionOffset) + 64 content = content.substring(0, completionOffset) +
65 content.substring(completionOffset + 1); 65 content.substring(completionOffset + 1);
66 testSource = addSource(testFile, content); 66 testSource = addSource(testFile, content);
67 cache = new DartCompletionCache(context, testSource); 67 cache = new DartCompletionCache(context, testSource);
68 AnalysisServer server = new AnalysisServerMock(searchEngine: searchEngine); 68 AnalysisServer server = new AnalysisServerMock(searchEngine: searchEngine, r esourceProvider: provider);
69 request = new DartCompletionRequest( 69 request = new DartCompletionRequest(
70 server, context, testSource, completionOffset, cache); 70 server, context, testSource, completionOffset, cache);
71 } 71 }
72 72
73 void assertHasNoParameterInfo(CompletionSuggestion suggestion) { 73 void assertHasNoParameterInfo(CompletionSuggestion suggestion) {
74 expect(suggestion.parameterNames, isNull); 74 expect(suggestion.parameterNames, isNull);
75 expect(suggestion.parameterTypes, isNull); 75 expect(suggestion.parameterTypes, isNull);
76 expect(suggestion.requiredParameterCount, isNull); 76 expect(suggestion.requiredParameterCount, isNull);
77 expect(suggestion.hasNamedParameters, isNull); 77 expect(suggestion.hasNamedParameters, isNull);
78 } 78 }
(...skipping 4267 matching lines...) Expand 10 before | Expand all | Expand 10 after
4346 assertNotSuggested('bar2'); 4346 assertNotSuggested('bar2');
4347 assertNotSuggested('_B'); 4347 assertNotSuggested('_B');
4348 assertSuggestLocalClass('Y'); 4348 assertSuggestLocalClass('Y');
4349 assertSuggestLocalClass('C'); 4349 assertSuggestLocalClass('C');
4350 assertSuggestLocalVariable('f', null); 4350 assertSuggestLocalVariable('f', null);
4351 assertNotSuggested('x'); 4351 assertNotSuggested('x');
4352 assertNotSuggested('e'); 4352 assertNotSuggested('e');
4353 }); 4353 });
4354 } 4354 }
4355 } 4355 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698