Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: pkg/analyzer_cli/test/build_mode_test.dart

Issue 2998603002: Make AnalyzerWorkerLoop AsyncWorkerLoop. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer_cli/lib/src/build_mode.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/test/build_mode_test.dart
diff --git a/pkg/analyzer_cli/test/build_mode_test.dart b/pkg/analyzer_cli/test/build_mode_test.dart
index 22f20a94f3745b49146e92e857bd966d278c9da7..a80a072f72f0de09d5a8f871bd0c54729bb97f3e 100644
--- a/pkg/analyzer_cli/test/build_mode_test.dart
+++ b/pkg/analyzer_cli/test/build_mode_test.dart
@@ -26,7 +26,7 @@ typedef void _TestWorkerLoopAnalyze(CommandLineOptions options);
class TestAnalyzerWorkerLoop extends AnalyzerWorkerLoop {
final _TestWorkerLoopAnalyze _analyze;
- TestAnalyzerWorkerLoop(SyncWorkerConnection connection, [this._analyze])
+ TestAnalyzerWorkerLoop(AsyncWorkerConnection connection, [this._analyze])
: super(new MemoryResourceProvider(), connection);
@override
@@ -39,18 +39,18 @@ class TestAnalyzerWorkerLoop extends AnalyzerWorkerLoop {
@reflectiveTest
class WorkerLoopTest {
- final TestStdinSync stdinStream = new TestStdinSync();
+ final TestStdinAsync stdinStream = new TestStdinAsync();
final TestStdoutStream stdoutStream = new TestStdoutStream();
- TestSyncWorkerConnection connection;
+ TestAsyncWorkerConnection connection;
WorkerLoopTest() {
connection =
- new TestSyncWorkerConnection(this.stdinStream, this.stdoutStream);
+ new TestAsyncWorkerConnection(this.stdinStream, this.stdoutStream);
}
void setUp() {}
- test_run() {
+ test_run() async {
var request = new WorkRequest();
request.arguments.addAll([
'--build-summary-input=/tmp/1.sum',
@@ -61,7 +61,7 @@ class WorkerLoopTest {
stdinStream.addInputBytes(_serializeProto(request));
stdinStream.close();
- new TestAnalyzerWorkerLoop(connection, (CommandLineOptions options) {
+ await new TestAnalyzerWorkerLoop(connection, (CommandLineOptions options) {
expect(options.buildSummaryInputs,
unorderedEquals(['/tmp/1.sum', '/tmp/2.sum']));
expect(
@@ -89,12 +89,12 @@ class WorkerLoopTest {
expect(stdoutStream.writes[0], _serializeProto(response));
}
- test_run_invalidOptions() {
+ test_run_invalidOptions() async {
var request = new WorkRequest();
request.arguments.addAll(['--unknown-option', '/foo.dart', '/bar.dart']);
stdinStream.addInputBytes(_serializeProto(request));
stdinStream.close();
- new TestAnalyzerWorkerLoop(connection).run();
+ await new TestAnalyzerWorkerLoop(connection).run();
expect(connection.responses, hasLength(1));
var response = connection.responses[0];
@@ -102,11 +102,11 @@ class WorkerLoopTest {
expect(response.output, anything);
}
- test_run_invalidRequest_noArgumentsInputs() {
+ test_run_invalidRequest_noArgumentsInputs() async {
stdinStream.addInputBytes(_serializeProto(new WorkRequest()));
stdinStream.close();
- new TestAnalyzerWorkerLoop(connection).run();
+ await new TestAnalyzerWorkerLoop(connection).run();
expect(connection.responses, hasLength(1));
var response = connection.responses[0];
@@ -114,10 +114,10 @@ class WorkerLoopTest {
expect(response.output, anything);
}
- test_run_invalidRequest_randomBytes() {
+ test_run_invalidRequest_randomBytes() async {
stdinStream.addInputBytes([1, 2, 3]);
stdinStream.close();
- new TestAnalyzerWorkerLoop(connection).run();
+ await new TestAnalyzerWorkerLoop(connection).run();
expect(connection.responses, hasLength(1));
var response = connection.responses[0];
@@ -125,9 +125,9 @@ class WorkerLoopTest {
expect(response.output, anything);
}
- test_run_stopAtEOF() {
+ test_run_stopAtEOF() async {
stdinStream.close();
- new TestAnalyzerWorkerLoop(connection).run();
+ await new TestAnalyzerWorkerLoop(connection).run();
}
List<int> _serializeProto(GeneratedMessage message) {
« no previous file with comments | « pkg/analyzer_cli/lib/src/build_mode.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698