Skip to content

Make advance by TimeInterval in TestScheduler possible - #828

Merged
RuiAAPeres merged 3 commits into
ReactiveCocoa:masterfrom
carsten-wenderdel:advance-by-timeinterval
Jul 23, 2021
Merged

Make advance by TimeInterval in TestScheduler possible#828
RuiAAPeres merged 3 commits into
ReactiveCocoa:masterfrom
carsten-wenderdel:advance-by-timeinterval

Conversation

@carsten-wenderdel

@carsten-wenderdel carsten-wenderdel commented Apr 24, 2021

Copy link
Copy Markdown
Contributor

The currentDate in TestScheduler could already be advanced by
DispatchTimeInterval. In unit tests the developer might want to
reuse an existing constant, which often is a Double/TimeInterval.

This PR adds a second method with exactly the same signature as the
existing one; only the type of the argument is different.

Checklist

  • Updated CHANGELOG.md.

The `currentDate` in `TestScheduler could already be advanced by
`DispatchTimeInterval`. In unit tests the developer might want to
reuse an existing constant, which often is a `Double`/`TimeInterval`.

This commits adds a second method with exactly the same signature as
the existing one; only the type of the argument is different.
@carsten-wenderdel
carsten-wenderdel marked this pull request as ready for review April 24, 2021 20:48

@mluisbrown mluisbrown left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. This would remove some of the frustrations in migrating TCA code to RAS-TCA, involving converting all TimeIntervals to DispatchTimeIntervals.

@RuiAAPeres
RuiAAPeres merged commit 3c448a4 into ReactiveCocoa:master Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants