| 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/plugin/protocol/protocol.dart'; | 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 10 import 'package:analysis_server/src/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 import 'mock_sdk.dart'; | 26 import 'mock_sdk.dart'; |
| 27 import 'mocks.dart'; | 27 import 'mocks.dart'; |
| 28 | 28 |
| 29 int findIdentifierLength(String search) { | 29 int findIdentifierLength(String search) { |
| 30 int length = 0; | 30 int length = 0; |
| 31 while (length < search.length) { | 31 while (length < search.length) { |
| 32 int c = search.codeUnitAt(length); | 32 int c = search.codeUnitAt(length); |
| 33 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) || | 33 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) || |
| 34 c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) || | 34 c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) || |
| 35 c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0))) { | 35 c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0) || |
| 36 c == '_'.codeUnitAt(0))) { |
| 36 break; | 37 break; |
| 37 } | 38 } |
| 38 length++; | 39 length++; |
| 39 } | 40 } |
| 40 return length; | 41 return length; |
| 41 } | 42 } |
| 42 | 43 |
| 43 /** | 44 /** |
| 44 * An abstract base for all 'analysis' domain tests. | 45 * An abstract base for all 'analysis' domain tests. |
| 45 */ | 46 */ |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 } | 227 } |
| 227 | 228 |
| 228 /** | 229 /** |
| 229 * Completes with a successful [Response] for the given [request]. | 230 * Completes with a successful [Response] for the given [request]. |
| 230 * Otherwise fails. | 231 * Otherwise fails. |
| 231 */ | 232 */ |
| 232 Future<Response> waitResponse(Request request) async { | 233 Future<Response> waitResponse(Request request) async { |
| 233 return serverChannel.sendRequest(request); | 234 return serverChannel.sendRequest(request); |
| 234 } | 235 } |
| 235 } | 236 } |
| OLD | NEW |