| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 String addTestFile(String content) { | 223 String addTestFile(String content) { |
| 224 addFile(testFile, content); | 224 addFile(testFile, content); |
| 225 this.testCode = content; | 225 this.testCode = content; |
| 226 return testFile; | 226 return testFile; |
| 227 } | 227 } |
| 228 | 228 |
| 229 /** | 229 /** |
| 230 * Validates that the given [request] is handled successfully. | 230 * Validates that the given [request] is handled successfully. |
| 231 */ | 231 */ |
| 232 void handleSuccessfulRequest(Request request) { | 232 Response handleSuccessfulRequest(Request request) { |
| 233 Response response = handler.handleRequest(request); | 233 Response response = handler.handleRequest(request); |
| 234 expect(response, isResponseSuccess('0')); | 234 expect(response, isResponseSuccess('0')); |
| 235 return response; |
| 235 } | 236 } |
| 236 | 237 |
| 237 static String _getCodeString(code) { | 238 static String _getCodeString(code) { |
| 238 if (code is List<String>) { | 239 if (code is List<String>) { |
| 239 code = code.join('\n'); | 240 code = code.join('\n'); |
| 240 } | 241 } |
| 241 return code as String; | 242 return code as String; |
| 242 } | 243 } |
| 243 } | 244 } |
| 244 | 245 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 int c = search.codeUnitAt(length); | 280 int c = search.codeUnitAt(length); |
| 280 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) || | 281 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) || |
| 281 c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) || | 282 c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) || |
| 282 c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0))) { | 283 c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0))) { |
| 283 break; | 284 break; |
| 284 } | 285 } |
| 285 length++; | 286 length++; |
| 286 } | 287 } |
| 287 return length; | 288 return length; |
| 288 } | 289 } |
| OLD | NEW |