Skip to content

Commit

Permalink
Add test for nextTransform
Browse files Browse the repository at this point in the history
  • Loading branch information
skoppe committed Aug 21, 2024
1 parent 716c56c commit 8d6b4af
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/ut/concurrency/sequence.d
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ import unit_threaded;
[1,2,3].sequence.flatMap((int i) => just(i*3)).toList().syncWait.value.should == [3,6,9];
}

@("nextTransform")
@safe unittest {
static struct Transformer {
auto setNext(Sender)(Sender s) {
return s;
}
}
just([1,2].sequence).flatten.nextTransform(Transformer()).toList.syncWait.value.should == [1,2];
}

@("scan")
@safe unittest {
[1,1,1,1].sequence.scan((int i, int acc) => acc + i, 0).toList().syncWait.value.should == [1,2,3,4];
Expand Down

0 comments on commit 8d6b4af

Please sign in to comment.