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

Add contains_, foldSmash and mkString_ to FoldableOps #2123

Merged
merged 9 commits into from
Mar 16, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/src/test/scala/cats/tests/FoldableSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ abstract class FoldableSuite[F[_]: Foldable](name: String)(
fa.toList should === (iterator(fa).toList)
}
}

test(s"Foldable[$name] mkString_") {
forAll { (fa: F[Int]) =>
fa.mkString_("L[", ";", "]") should === fa.mkString("L[", ";", "]")
Copy link
Contributor

Choose a reason for hiding this comment

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

now is the right hand side working? don't we need a toList or something?

Copy link
Contributor

Choose a reason for hiding this comment

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

good catch. Since this is not my repo I can only edit files through github and my mental compiler is clearly not good enough.

}
}
}

class FoldableSuiteAdditional extends CatsSuite {
Expand Down