Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tPl0ch
Copy link
Contributor

@tPl0ch tPl0ch commented May 19, 2023

This commit provides implicit methods for both ScalaCheck Prop and Properties.

This enables beautiful things like the following:

test("Monoid laws for MyCustomType") {
  import cats.kernel.laws.discipline.MonoidTests

  MonoidTests[MyCustomType].monoid.all.assertZIO()
} @@ TestAspect.debug

The assertions are collecting the property names correctly, and show them when using the debug TestAspect.

This commit provides implicit methods for both ScalaCheck
`Prop` and `Properties`.

This enables beautiful things like the following:

```scala
test("Monoid laws for Predicate") {
  import cats.kernel.laws.discipline.MonoidTests

  MonoidTests[MyCustomType].monoid.all.assertZIO()
} @@ TestAspect.debug
```

The assertions are collecting the property names correctly,
and show them when using the debug TestAspect.
@adamgfraser adamgfraser merged commit d3ad247 into zio:series/2.x May 19, 2023
@tPl0ch tPl0ch deleted the ft/scalacheck-assertions branch May 19, 2023 20:34
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.

2 participants