OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 analyzer_cli.test.built_mode; | 5 library analyzer_cli.test.built_mode; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analyzer/file_system/memory_file_system.dart'; | 9 import 'package:analyzer/file_system/memory_file_system.dart'; |
10 import 'package:analyzer_cli/src/build_mode.dart'; | 10 import 'package:analyzer_cli/src/build_mode.dart'; |
(...skipping 14 matching lines...) Expand all Loading... |
25 /** | 25 /** |
26 * [AnalyzerWorkerLoop] for testing. | 26 * [AnalyzerWorkerLoop] for testing. |
27 */ | 27 */ |
28 class TestAnalyzerWorkerLoop extends AnalyzerWorkerLoop { | 28 class TestAnalyzerWorkerLoop extends AnalyzerWorkerLoop { |
29 final _TestWorkerLoopAnalyze _analyze; | 29 final _TestWorkerLoopAnalyze _analyze; |
30 | 30 |
31 TestAnalyzerWorkerLoop(AsyncWorkerConnection connection, [this._analyze]) | 31 TestAnalyzerWorkerLoop(AsyncWorkerConnection connection, [this._analyze]) |
32 : super(new MemoryResourceProvider(), connection); | 32 : super(new MemoryResourceProvider(), connection); |
33 | 33 |
34 @override | 34 @override |
35 Future<Null> analyze(CommandLineOptions options) async { | 35 Future<Null> analyze(CommandLineOptions options, inputs) async { |
36 if (_analyze != null) { | 36 if (_analyze != null) { |
37 _analyze(options); | 37 _analyze(options); |
38 } | 38 } |
39 } | 39 } |
40 } | 40 } |
41 | 41 |
42 @reflectiveTest | 42 @reflectiveTest |
43 class WorkerLoopTest { | 43 class WorkerLoopTest { |
44 final TestStdinAsync stdinStream = new TestStdinAsync(); | 44 final TestStdinAsync stdinStream = new TestStdinAsync(); |
45 final TestStdoutStream stdoutStream = new TestStdoutStream(); | 45 final TestStdoutStream stdoutStream = new TestStdoutStream(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 List<int> _serializeProto(GeneratedMessage message) { | 135 List<int> _serializeProto(GeneratedMessage message) { |
136 var buffer = message.writeToBuffer(); | 136 var buffer = message.writeToBuffer(); |
137 | 137 |
138 var writer = new CodedBufferWriter(); | 138 var writer = new CodedBufferWriter(); |
139 writer.writeInt32NoTag(buffer.length); | 139 writer.writeInt32NoTag(buffer.length); |
140 writer.writeRawBytes(buffer); | 140 writer.writeRawBytes(buffer); |
141 | 141 |
142 return writer.toBuffer(); | 142 return writer.toBuffer(); |
143 } | 143 } |
144 } | 144 } |
OLD | NEW |