Commit Graph
30 Commits
Author SHA1 Message Date
Philippe Hausler 47aa4ccba6 A continuous form of reduce and a throwing variant of that reduction (#35) 2022-02-08 10:16:17 -08:00
Philippe Hausler d905d2a465 Async on both send and iteration subject like behavior (#34)
* Async on both send and iteration subject like behavior

* rename the initial state to idle for subjects
2022-02-01 09:21:06 -08:00
Philippe Hausler 0e37dffc8c Correct generation rename misstep 2022-01-31 15:40:40 -08:00
Philippe Hausler 845d11a3bd Marble diagram based testing (#30)
* First draft at marble diagram based tests

* Correct indefinite marble runs, support grouping, and properly handle any number of inputs (by the result builder construction)

* enhance isolation of diagrams with fileprivate
2022-01-31 15:28:17 -08:00
Philippe Hausler c147131251 Add a testing support item for manual clocks (#27)
* Add a testing support item for manual clocks

* rename `id` to `generation` and add an advance by steps
2022-01-31 15:25:42 -08:00
Philippe Hausler 91aa4a85d4 refine the sample time for throughput measurements so that it does not take so long for the tests (#28) 2022-01-25 14:57:04 -08:00
Philippe Hausler 7e3b1c1164 Add a 2 and 3 arity version of combineLatest (#20) 2022-01-25 13:14:38 -08:00
kperryua 91968fa3e9 AsyncSequence throughput performance tests (#19)
* AsyncSequence throughput performance tests

* Reduce source sequence overhead

* Normalize whitespace

* Added joined() throughput test

* File renaming
2022-01-25 12:07:23 -08:00
Philippe Hausler 18fcfe8e29 [NFC] Fixup attribution dates in comments (#22) 2022-01-25 09:52:32 -08:00
Philippe Hausler 27e6645329 Add a validator testing support mechanism (#24)
* Add a validator testing support mechanism

* Move the remaining support items into the test support directory

* Add rudimentary tests to validate the validator
2022-01-24 17:40:58 -08:00
kperryua 4c93fa2c87 Merge pull request #17 from apple/pr/joined
Add a sequence for joining multiple async sequences with separators
2022-01-24 17:24:23 -08:00
Philippe Hausler 21520e710c Rework Task.first to a better name/behavior of Task.select (#21)
* Rework Task.first to a better name/behavior of Task.select

* Downgrade UnsafeResumption to internal
2022-01-24 13:38:51 -08:00
Philippe Hausler b015c5e49e Clean up some asserts by making helper overloads (#18) 2022-01-24 13:36:22 -08:00
Philippe Hausler 76785b34e4 [NFC] Move testing support files into their own directory (#23) 2022-01-24 13:31:21 -08:00
Kevin Perry 8c93e6ba6c Add a sequence for joining multiple async sequences with separators 2022-01-21 13:14:42 -08:00
kperryua b515cd8458 Merge pull request #14 from apple/pr/intersperse
Add a sequence that intersperses separator values
2022-01-21 12:10:06 -08:00
kperryua f614b51e55 Merge pull request #13 from apple/pr/remove-duplicates
Add a sequence for removing adjacent duplicates
2022-01-21 12:09:59 -08:00
Kevin Perry 431393dc68 Fixed test indentation 2022-01-21 12:09:07 -08:00
Kevin Perry 450f2d6827 Test cleanup 2022-01-21 12:09:07 -08:00
Kevin Perry 8295e01ac8 Add a sequence that intersperses separator values 2022-01-21 12:09:02 -08:00
Philippe Hausler 205414d19d Add a 2 and 3 arity version of merge with tuple backed storage (#8)
* Add a 2 and 3 arity version of merge with tuple backed storage

* Xcode really likes Metal, one could say the weighting for importing for that is heavy...
2022-01-21 11:52:37 -08:00
Philippe Hausler 0316ac34f3 Add a sequence for compacting nils (#6)
* Add a sequence for compacting nils

* Remove Codable, Hashable, and Equatable conditional conformance

* Add test for upstream throwing for compacted
2022-01-21 11:52:27 -08:00
Philippe Hausler 73b29b9cbf Add a 2 and 3 arity version of zip (#10) 2022-01-21 11:37:25 -08:00
Kevin Perry e71fe66e29 Test cleanup 2022-01-19 14:49:40 -08:00
Kevin Perry e7dc87d00c Add a sequence for removing adjacent duplicates 2022-01-19 14:46:08 -08:00
Philippe Hausler 8a1078810c Add a 2 and 3 arity version of chain (#9)
* Add a 2 and 3 arity version of chain

* Tests for cancellation of chain sequences

* Correct typo of missing [] in chain 3 test for cancellation

* Make chain 2/3 inlinable and frozen
2022-01-18 11:50:25 -08:00
Philippe Hausler beb509d829 Fix test build failure with @testable import 2022-01-14 08:26:57 -08:00
Philippe Hausler 1c11d4a7c8 Add an algorithm to obtain the first result of a list of tasks (#5)
* Add an algorithm to obtain the first result of a list of tasks

* A much simpler and less risky implementation of Task.first that supports cancellation propigation

* Slight whitespace fix for Package.swift

* Demote Task.first to internal - revisit for better naming later as public
2022-01-14 08:25:41 -08:00
Philippe HauslerandNate Cook 1c08de7680 Add async rethrowing initializers for RangeReplaceableCollection, SetAlgebra, and Dictionary for use with AsyncSequence types (#3)
* Add async rethrowing initializers for RangeReplaceableCollection, SetAlgebra, and Dictionary for use with AsyncSequence types

* Add some additional tests for throwing coverage and documentation on collection initializers

* Spelling fix of unique

Co-authored-by: Nate Cook <natecook@apple.com>

* Spelling fix for unique (throwing version)

Co-authored-by: Nate Cook <natecook@apple.com>

Co-authored-by: Nate Cook <natecook@apple.com>
2022-01-14 08:23:14 -08:00
Philippe Hausler 361c7926d1 Add a package layout and initial implementation and tests for AsyncLazySequence (#2)
* Add a package layout and initial implementation and tests for AsyncLazySequence; a type for converting non asynchronous sequences into asynchronous ones

* Add a first iteration pass expectation to ensure that tasks spawn for testing cancellation of AsyncLazySequence

* Simplify the iterator for AsyncLazySequence
2022-01-11 10:26:32 -08:00