| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 resourceProvider.newFile(path, content); | 77 resourceProvider.newFile(path, content); |
| 78 return path; | 78 return path; |
| 79 } | 79 } |
| 80 | 80 |
| 81 String addTestFile(String content) { | 81 String addTestFile(String content) { |
| 82 addFile(testFile, content); | 82 addFile(testFile, content); |
| 83 this.testCode = content; | 83 this.testCode = content; |
| 84 return testFile; | 84 return testFile; |
| 85 } | 85 } |
| 86 | 86 |
| 87 String modifyTestFile(String content) { |
| 88 addFile(testFile, content); |
| 89 this.testCode = content; |
| 90 return testFile; |
| 91 } |
| 92 |
| 87 Index createIndex() { | 93 Index createIndex() { |
| 88 return null; | 94 return null; |
| 89 } | 95 } |
| 90 | 96 |
| 91 /** | 97 /** |
| 92 * Creates a project `/project`. | 98 * Creates a project `/project`. |
| 93 */ | 99 */ |
| 94 void createProject() { | 100 void createProject() { |
| 95 resourceProvider.newFolder(projectPath); | 101 resourceProvider.newFolder(projectPath); |
| 96 Request request = new AnalysisSetAnalysisRootsParams([projectPath], | 102 Request request = new AnalysisSetAnalysisRootsParams([projectPath], |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 return waitForServerOperationsPerformed(server); | 256 return waitForServerOperationsPerformed(server); |
| 251 } | 257 } |
| 252 | 258 |
| 253 static String _getCodeString(code) { | 259 static String _getCodeString(code) { |
| 254 if (code is List<String>) { | 260 if (code is List<String>) { |
| 255 code = code.join('\n'); | 261 code = code.join('\n'); |
| 256 } | 262 } |
| 257 return code as String; | 263 return code as String; |
| 258 } | 264 } |
| 259 } | 265 } |
| OLD | NEW |