-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Hook Eq up to scalactic/scalatest's equality #522
Conversation
Fixes typelevel#219 This allows us to use matchers like `should ===`. I changed a few random places to do this, but I didn't want to go through the effort of changing tons of places until this PR was reviewed/merged. I think we could clean a lot of things up now by having CatsSuite extend GeneratorDrivenPropertyChecks, which will allow using matchers like `should ===` inside of `forAll` properties.
Thanks @bvenners for setting up a great example project for this. Bill, if you happen to take a look at this and see that I'm doing anything silly, let me know. |
Current coverage is
|
I'm guessing 👍 |
@adelbertc I think I agree that we should change a lot of |
Yep sounds good, 👍 for me |
@@ -0,0 +1,29 @@ | |||
package cats |
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.
I think this whole file would be useful in tests that use the cats library, and not just cats itself. So, if that is the case, consider moving the file to main
, so it could be exported - i.e. tests/shared/src/main/scala/cats/tests/CatsEquality.scala
@inthenow I like the ideas in your comments. However, we currently aren't publishing the Once this gets through I plan to update a lot of tests to take advantage of this syntax. I know that I've made type errors with |
@ceedubs Absolutely OK! Note I used "consider" to introduce the concept, but more for a future issue/PR, where I shall now continue the conversation 👍 |
Thanks for this. Looks good! 👍 |
I merged in master and resolved a couple merge conflicts due to #507 being merged. Since there are several 👍s, I'll merge once Travis goes green if there are no objections. |
The 2.11 build is failing with the following error:
I don't see any reference to |
@ceedubs in build.sbt, try using `"-Xlint:-missing-interpolator,_",``` |
For some reason we are getting the following error in the `free` project: ``` possible missing interpolator: detected interpolated identifier `$conforms` ``` I think one of our macros/plugins is doing this. It would be nice to figure out where it's coming from, but this should work around it for now.
@inthenow thanks for the suggestion. That makes it work for 2.11, but that isn't supported in 2.10, so now that build fails :( We could hack around the compiler flags based on the cross-version, but it seems like it would be nice to figure out where this is coming from and fix it in a more elegant way. Any idea? |
@ceedubs I'm guessing it's the two calls to If so, you can remove the |
@inthenow ah thanks good catch! I think that solved the issue. We'll see if Travis agrees. |
We've gone green. I'm going to go ahead and merge since there are three +1s. |
Hook Eq up to scalactic/scalatest's equality
Fixes #219
This allows us to use matchers like
should ===
. I changed a fewrandom places to do this, but I didn't want to go through the effort
of changing tons of places until this PR was reviewed/merged.
I think we could clean a lot of things up now by having CatsSuite
extend GeneratorDrivenPropertyChecks, which will allow using matchers
like
should ===
inside offorAll
properties.