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

More coverage #1752

Merged
merged 4 commits into from
Jul 17, 2017
Merged

More coverage #1752

merged 4 commits into from
Jul 17, 2017

Conversation

edmundnoble
Copy link
Contributor

Calculated hail mary to increase coverage, to somewhat balance out the MTL removal coverage decrease.

@codecov-io
Copy link

codecov-io commented Jun 30, 2017

Codecov Report

Merging #1752 into master will increase coverage by 1.23%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1752      +/-   ##
==========================================
+ Coverage   94.17%   95.41%   +1.23%     
==========================================
  Files         256      256              
  Lines        4208     4209       +1     
  Branches       93       95       +2     
==========================================
+ Hits         3963     4016      +53     
+ Misses        245      193      -52
Impacted Files Coverage Δ
core/src/main/scala/cats/instances/stream.scala 96.36% <ø> (+1.72%) ⬆️
macros/src/main/scala/cats/macros/Ops.scala 100% <ø> (+8.33%) ⬆️
core/src/main/scala/cats/data/IdT.scala 97.29% <100%> (+0.63%) ⬆️
core/src/main/scala/cats/data/NonEmptyList.scala 100% <100%> (+2.63%) ⬆️
core/src/main/scala/cats/Show.scala 100% <0%> (ø) ⬆️
core/src/main/scala/cats/Eval.scala 98.48% <0%> (+1.51%) ⬆️
core/src/main/scala/cats/instances/future.scala 81.25% <0%> (+6.25%) ⬆️
free/src/main/scala/cats/free/Free.scala 89.36% <0%> (+6.38%) ⬆️
core/src/main/scala/cats/data/Kleisli.scala 100% <0%> (+7.35%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d642013...2989d45. Read the comment docs.

@peterneyens
Copy link
Collaborator

Seems there is a bit of overlap with what I did in #1623.

@edmundnoble edmundnoble force-pushed the more-coverage branch 3 times, most recently from e2da87f to 9aa695d Compare July 5, 2017 05:19
@edmundnoble edmundnoble changed the title More coverage (WIP) More coverage Jul 5, 2017
Monoid[WriterT[Id, Int, Int]]
Semigroup[WriterT[Id, Int, Int]]
Monoid[Writer[Int, Int]]
checkAll("Writer[Int, Int]", kernel.laws.GroupLaws[Writer[Int, Int]].monoid)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we add SerializableTests for the Monoid instance of WriterT?

And for the Semigroup instance below as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

@@ -1,7 +1,8 @@
package cats
package tests

import cats.data.IdT
import cats.{Foldable, Functor, Monad, NonEmptyTraverse, Traverse}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason we add these imports explicitly?

Copy link
Contributor Author

@edmundnoble edmundnoble Jul 6, 2017

Choose a reason for hiding this comment

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

I didn't have the multiple package decls in a previous version of the file, IntelliJ magic. Fixed.

{
import cats.implicits._
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we maybe include a comment specifying that the instances below should be found when all the instances are in scope?
It might not be as obvious what we are doing here, now that we moved to CatsSuite.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure, it seems like all other transformers do not have or need such a comment.

@@ -10,6 +10,7 @@ class EitherTests extends CatsSuite {
implicit val iso = CartesianTests.Isomorphisms.invariant[Either[Int, ?]]

checkAll("Either[String, Int]", GroupLaws[Either[String, Int]].monoid)
checkAll("Semigroup[Either[String, Int]]", SerializableTests.serializable(Semigroup[Either[String, Int]]))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe check Monoid[Either[String, Int]] here?
The instance tested should be the same, but might be clearer given that we are testing GroupLaws.monoid above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@johnynek johnynek left a comment

Choose a reason for hiding this comment

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

lgtm

just a minor comment.

Invariant[PartialOrder]
Contravariant[PartialOrder]
}

{
test("companion object syntax") {
Copy link
Contributor

Choose a reason for hiding this comment

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

seems like this could be a scalacheck.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Excellent point, corrected.

@edmundnoble
Copy link
Contributor Author

Merging with two sign-offs, assuming my latest edit was sufficient for the last comment.

@edmundnoble edmundnoble merged commit 4a4a09a into typelevel:master Jul 17, 2017
@kailuowang kailuowang added this to the 1.0.0-MF milestone Jul 17, 2017
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.

5 participants