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

Times.Equals is implemented incorrectly #805

Closed
stakx opened this issue Apr 12, 2019 · 0 comments · Fixed by #806
Closed

Times.Equals is implemented incorrectly #805

stakx opened this issue Apr 12, 2019 · 0 comments · Fixed by #806
Assignees
Labels
Milestone

Comments

@stakx
Copy link
Contributor

stakx commented Apr 12, 2019

Reproduction code:

// see whether the kind of `Times` objects being compared is taken into account:
Assert.Equal(Times.Once(), Times.Exactly(1));

// see whether it is only the effective lower and upper bounds that get compared:
Assert.Equal(Times.Between(2, 3, Range.Inclusive), Times.Between(1, 4, Range.Exclusive));

Actual behavior:

The first assertion passes, but the second one fails.

Expected behavior:

Either both assertions should fail (meaning that the kind of Times being compared matters), or both should pass (meaning that only the effective lower and upper bounds matter).

Times is currently implemented in a way that leans towards the latter.

@stakx stakx added the bug label Apr 12, 2019
@stakx stakx added this to the 4.11.0 milestone Apr 12, 2019
@stakx stakx self-assigned this Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant