| 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'; |
| 11 import 'package:analysis_server/src/protocol.dart'; | 11 import 'package:analysis_server/src/protocol.dart'; |
| 12 import 'package:analysis_server/src/services/index/index.dart'; | 12 import 'package:analysis_server/src/services/index/index.dart'; |
| 13 import 'package:analyzer/file_system/file_system.dart'; | 13 import 'package:analyzer/file_system/file_system.dart'; |
| 14 import 'package:analyzer/file_system/memory_file_system.dart'; | 14 import 'package:analyzer/file_system/memory_file_system.dart'; |
| 15 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| 15 import 'package:unittest/unittest.dart'; | 16 import 'package:unittest/unittest.dart'; |
| 16 | 17 |
| 17 import 'mock_sdk.dart'; | 18 import 'mock_sdk.dart'; |
| 18 import 'mocks.dart'; | 19 import 'mocks.dart'; |
| 19 | 20 |
| 20 | 21 |
| 21 int findIdentifierLength(String search) { | 22 int findIdentifierLength(String search) { |
| 22 int length = 0; | 23 int length = 0; |
| 23 while (length < search.length) { | 24 while (length < search.length) { |
| 24 int c = search.codeUnitAt(length); | 25 int c = search.codeUnitAt(length); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 return testFile; | 83 return testFile; |
| 83 } | 84 } |
| 84 | 85 |
| 85 AnalysisServer createAnalysisServer(Index index) { | 86 AnalysisServer createAnalysisServer(Index index) { |
| 86 return new AnalysisServer( | 87 return new AnalysisServer( |
| 87 serverChannel, | 88 serverChannel, |
| 88 resourceProvider, | 89 resourceProvider, |
| 89 packageMapProvider, | 90 packageMapProvider, |
| 90 index, | 91 index, |
| 91 new AnalysisServerOptions(), | 92 new AnalysisServerOptions(), |
| 92 new MockSdk()); | 93 new MockSdk(), |
| 94 const NullInstrumentationServer()); |
| 93 } | 95 } |
| 94 | 96 |
| 95 Index createIndex() { | 97 Index createIndex() { |
| 96 return null; | 98 return null; |
| 97 } | 99 } |
| 98 | 100 |
| 99 /** | 101 /** |
| 100 * Creates a project `/project`. | 102 * Creates a project `/project`. |
| 101 */ | 103 */ |
| 102 void createProject() { | 104 void createProject() { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 260 } |
| 259 | 261 |
| 260 /** | 262 /** |
| 261 * Returns a [Future] that completes when the [AnalysisServer] finishes | 263 * Returns a [Future] that completes when the [AnalysisServer] finishes |
| 262 * all its scheduled tasks. | 264 * all its scheduled tasks. |
| 263 */ | 265 */ |
| 264 Future waitForTasksFinished() { | 266 Future waitForTasksFinished() { |
| 265 return waitForServerOperationsPerformed(server); | 267 return waitForServerOperationsPerformed(server); |
| 266 } | 268 } |
| 267 } | 269 } |
| OLD | NEW |