OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |