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
Add Hash and BoundedEnumerable instances for HttpVersion #3902
Conversation
Thanks for volunteering! The problem is that One way around it is to make one instance that has all the Cats instances. Case-insensitive has an example. If you copy and paste from that to get all the methods, this can't be a We would need to remove the Whew, that turned into a lot. If not all of that makes sense, please ask! |
Thanks for the explanation, Ross. Why do we need to add |
Do you mean I need to make this PR to |
c308aea
to
20bc219
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done. One more thing. Whenever we add an instance, we like to check its laws. So in HttpVersionSpec
, we should add:
checkAll("HttpVersion", HashTests[HttpVersion].hash)
checkAll("HttpVersion", BoundedEnumerableTests[HttpVersion].boundedEnumerable)
And with that, you should see a failing test on BoundedEnumerable
. 1.0, 1.1, and 2.0 are the common ones, but there are actually 100 valid ones.
I know this is more than you signed up for, and really appreciate the work on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
CI didn't run due to #3916, but I verified everything locally. |
For #3869
Test had to be adapted in order to fix the following compile error:
Do let me know if there's a better way to fix this.