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

Side by Side Diff: pkg/analysis_server/test/analysis_abstract.dart

Issue 334543002: Use a mock SDK for most analysis server tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/domain_analysis_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.domain.analysis.abstract; 5 library test.domain.analysis.abstract;
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/domain_analysis.dart'; 10 import 'package:analysis_server/src/domain_analysis.dart';
(...skipping 26 matching lines...) Expand all
37 // Map<String, List<Map<String, Object>>> filesNavigation = {}; 37 // Map<String, List<Map<String, Object>>> filesNavigation = {};
38 38
39 39
40 AbstractAnalysisTest() { 40 AbstractAnalysisTest() {
41 } 41 }
42 42
43 void setUp() { 43 void setUp() {
44 serverChannel = new MockServerChannel(); 44 serverChannel = new MockServerChannel();
45 resourceProvider = new MemoryResourceProvider(); 45 resourceProvider = new MemoryResourceProvider();
46 server = new AnalysisServer(serverChannel, resourceProvider); 46 server = new AnalysisServer(serverChannel, resourceProvider);
47 server.defaultSdk = new MockSdk();
47 handler = new AnalysisDomainHandler(server); 48 handler = new AnalysisDomainHandler(server);
48 // listen for notifications 49 // listen for notifications
49 Stream<Notification> notificationStream = serverChannel.notificationControll er.stream; 50 Stream<Notification> notificationStream = serverChannel.notificationControll er.stream;
50 notificationStream.listen((Notification notification) { 51 notificationStream.listen((Notification notification) {
51 processNotification(notification); 52 processNotification(notification);
52 }); 53 });
53 // create an empty project 54 // create an empty project
54 _createEmptyProject(); 55 _createEmptyProject();
55 } 56 }
56 57
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 int c = search.codeUnitAt(length); 272 int c = search.codeUnitAt(length);
272 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) || 273 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) ||
273 c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) || 274 c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) ||
274 c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0))) { 275 c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0))) {
275 break; 276 break;
276 } 277 }
277 length++; 278 length++;
278 } 279 }
279 return length; 280 return length;
280 } 281 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/domain_analysis_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698