Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

another attempt at Cogen for (Finite)Duration #3772

Merged
merged 1 commit into from
Feb 6, 2021
Merged

another attempt at Cogen for (Finite)Duration #3772

merged 1 commit into from
Feb 6, 2021

Conversation

larsrh
Copy link
Contributor

@larsrh larsrh commented Feb 6, 2021

This is #3470 redux, although with another approach.

Contains code by @barambani to test the issue.

I've confirmed that the newly-added tests fail without the Cogen change.

cc @TimWSpence

Co-authored-by: Filippo Mariotti <barambani@users.noreply.github.com>
@larsrh larsrh added this to the 2.4 milestone Feb 6, 2021
@larsrh larsrh merged commit f162172 into master Feb 6, 2021
@larsrh larsrh deleted the issue/3734 branch February 6, 2021 14:41
case NANOSECONDS => 6128745701389500153L
})
}
Cogen[Long].contramap(_.toNanos)
Copy link
Member

Choose a reason for hiding this comment

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

@larsrh this is the same as the one defined in ScalaCheck currently, so maybe we should just delete it?

Copy link
Contributor Author

@larsrh larsrh Feb 7, 2021

Choose a reason for hiding this comment

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

Excellent point. I just checked and ScalaCheck has all combinations of {Arbitrary, Cogen} and {Duration, FiniteDuration}. Should I delete them too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

3 participants