Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions LibTest/async/Stream/Stream.fromFutures_all_t03.dart

This file was deleted.

18 changes: 0 additions & 18 deletions LibTest/async/Stream/Stream.fromIterable_all_t03.dart

This file was deleted.

24 changes: 0 additions & 24 deletions LibTest/async/Stream/Stream.periodic_all_t03.dart

This file was deleted.

2 changes: 2 additions & 0 deletions LibTest/async/Stream/allTests_A01.lib.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import "asyncMap_A01_t04.test.dart" as asyncMap_A01_t04;
import "asyncMap_A02_t01.test.dart" as asyncMap_A02_t01;
import "asyncMap_A03_t02.test.dart" as asyncMap_A03_t02;
import "asyncMap_A03_t03.test.dart" as asyncMap_A03_t03;
import "asyncMap_A04_t01.test.dart" as asyncMap_A04_t01;

import "contains_A01_t01.test.dart" as contains_A01_t01;
import "contains_A02_t01.test.dart" as contains_A02_t01;
Expand Down Expand Up @@ -186,6 +187,7 @@ void test(CreateStreamFunction create) {
asyncMap_A02_t01.test(create);
asyncMap_A03_t02.test(create);
asyncMap_A03_t03.test(create);
asyncMap_A04_t01.test(create);

contains_A01_t01.test(create);
contains_A02_t01.test(create);
Expand Down
23 changes: 0 additions & 23 deletions LibTest/async/Stream/allTests_A03.lib.dart

This file was deleted.

24 changes: 0 additions & 24 deletions LibTest/async/Stream/asBroadcastStream_A05_t03.test.dart

This file was deleted.

18 changes: 9 additions & 9 deletions LibTest/async/Stream/asyncMap_A04_t01.test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @assertion Stream asyncMap(dynamic convert(T event))
/// This acts like [map], ...
///
/// The convert function is called once per data event per listener.
/// If a broadcast stream is listened to more than once, each subscription
/// will individually call convert on each data event.
/// @assertion Stream<E> asyncMap<E>(FutureOr<E> convert(T event))
/// ...
/// This acts like [map], in that [convert] function is called once per
/// data event, but here [convert] may be asynchronous and return a [Future].
/// If that happens, this stream waits for that future to complete before
/// continuing with further events.
///
/// @description Checks that convert function is called once per data event
/// per listener.
///
/// @issue #29615
/// @author [email protected]

Expand Down Expand Up @@ -39,18 +38,19 @@ Future? check<T>(Stream<T> stream, List<T> expected) {
return event;
}

asyncStart();
Stream<T> converted = stream.asyncMap(convert);
Future.wait(
[subscribe(converted), subscribe(converted), subscribe(converted)])
.then((List<List<T>> result) {
result.forEach((received) => Expect.listEquals(expected, received));
expected.forEach((event) => Expect.equals(3, convertLog[event]));
expected.forEach((event) => Expect.equals(1, convertLog[event]));
asyncEnd();
});
return null;
}

void test(CreateStreamFunction create) {
asyncStart(3);
check(create([]).asBroadcastStream(), []);
check(create([1, 2, 3, 4, 5]).asBroadcastStream(), [1, 2, 3, 4, 5]);
check(create(['a', 'b', 'c']).asBroadcastStream(), ['a', 'b', 'c']);
Expand Down

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions LibTest/async/StreamController/stream_all_A01_t03.dart

This file was deleted.

40 changes: 0 additions & 40 deletions LibTest/async/StreamController/stream_all_A02_t03.dart

This file was deleted.