From 9cd76f3fa8d5ccb54d8e74b28ec30716530c84ee Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 10 Jul 2021 20:41:12 -0700 Subject: [PATCH] Dart format with latest SDK --- test/reject_errors_test.dart | 5 ++++- test/stream_completer_test.dart | 6 +++++- test/stream_sink_completer_test.dart | 20 ++++++++++++++++---- test/stream_zip_test.dart | 21 +++++++++++++++++---- 4 files changed, 42 insertions(+), 10 deletions(-) diff --git a/test/reject_errors_test.dart b/test/reject_errors_test.dart index 32bffd1..5b8b3e7 100644 --- a/test/reject_errors_test.dart +++ b/test/reject_errors_test.dart @@ -14,7 +14,10 @@ void main() { }); test('passes through data events', () { - controller.sink.rejectErrors()..add(1)..add(2)..add(3); + controller.sink.rejectErrors() + ..add(1) + ..add(2) + ..add(3); expect(controller.stream, emitsInOrder([1, 2, 3])); }); diff --git a/test/stream_completer_test.dart b/test/stream_completer_test.dart index ecb5621..5ccf44e 100644 --- a/test/stream_completer_test.dart +++ b/test/stream_completer_test.dart @@ -39,7 +39,11 @@ void main() { var done = subscription.asFuture(); subscription.pause(); var sourceController = StreamController(); - sourceController..add(1)..add(2)..add(3)..add(4); + sourceController + ..add(1) + ..add(2) + ..add(3) + ..add(4); controller.setSourceStream(sourceController.stream); await flushMicrotasks(); expect(sourceController.hasListener, isTrue); diff --git a/test/stream_sink_completer_test.dart b/test/stream_sink_completer_test.dart index 591f32f..11592bb 100644 --- a/test/stream_sink_completer_test.dart +++ b/test/stream_sink_completer_test.dart @@ -19,7 +19,11 @@ void main() { test('data events are forwarded', () { var sink = TestSink(); completer.setDestinationSink(sink); - completer.sink..add(1)..add(2)..add(3)..add(4); + completer.sink + ..add(1) + ..add(2) + ..add(3) + ..add(4); expect(sink.results[0].asValue!.value, equals(1)); expect(sink.results[1].asValue!.value, equals(2)); @@ -30,7 +34,9 @@ void main() { test('error events are forwarded', () { var sink = TestSink(); completer.setDestinationSink(sink); - completer.sink..addError('oh no')..addError("that's bad"); + completer.sink + ..addError('oh no') + ..addError("that's bad"); expect(sink.results[0].asError!.error, equals('oh no')); expect(sink.results[1].asError!.error, equals("that's bad")); @@ -114,7 +120,11 @@ void main() { group('when a stream is linked after events are added', () { test('data events are forwarded', () async { - completer.sink..add(1)..add(2)..add(3)..add(4); + completer.sink + ..add(1) + ..add(2) + ..add(3) + ..add(4); await flushMicrotasks(); var sink = TestSink(); @@ -128,7 +138,9 @@ void main() { }); test('error events are forwarded', () async { - completer.sink..addError('oh no')..addError("that's bad"); + completer.sink + ..addError('oh no') + ..addError("that's bad"); await flushMicrotasks(); var sink = TestSink(); diff --git a/test/stream_zip_test.dart b/test/stream_zip_test.dart index 84948bf..71ce2c4 100644 --- a/test/stream_zip_test.dart +++ b/test/stream_zip_test.dart @@ -210,15 +210,26 @@ void main() { expect( StreamZip([ streamError(mks([1, 2, 3, 4]), 4, 'BAD-5'), - (StreamController()..add(4)..add(5)..add(6)).stream, - (StreamController()..add(7)..add(8)..add(9)).stream + (StreamController() + ..add(4) + ..add(5) + ..add(6)) + .stream, + (StreamController() + ..add(7) + ..add(8) + ..add(9)) + .stream ]).toList(), throwsA(equals('BAD-5'))); }); test('Error after first end', () { var controller = StreamController(); - controller..add(7)..add(8)..add(9); + controller + ..add(7) + ..add(8) + ..add(9); // Transformer that puts error into controller when one of the first two // streams have sent a done event. var trans = @@ -298,7 +309,9 @@ void main() { ..add(5) ..add(7) ..close(); - c2..add(2)..add(4); + c2 + ..add(2) + ..add(4); }); test('pause-resume2', () {