typelevel / scalacheck-effect

Effectful property testing built on ScalaCheck
Apache License 2.0
81 stars 24 forks source link

Adding a Boolean test transformer #354

Closed TonioGela closed 4 months ago

TonioGela commented 5 months ago

Solves #25. Thanks to @adrian-salajan for the implementation.

P.S. The implementation could have been more barebone, like

  implicit def effectOfBooleanToPropF[F[_]](
      fu: F[Unit]
  )(implicit F: MonadError[F, Throwable]): PropF[F] =
    Suspend[F, Result[F]](
      fu.map(boolean(_))
        .handleError(t => Result[F](Prop.Exception(t), Nil, Set.empty, Set.empty))
    )

or similar, is this preferrable?

TonioGela commented 4 months ago

@satorg I swear I'll do my best to keep track of this PR, but if we don't merge it I fear I'll forget about it soon :D

satorg commented 4 months ago

@TonioGela , thank you for the ping. Usually I don't merge if I'm the only reviewer – just to let someone else review it. But looks like this repository doesn't have that many active maintainers now to make it working.

Thank you for the contribution again – it can come handy in some cases indeed!

TonioGela commented 4 months ago

Thanks for merging it @satorg

But looks like this repository doesn't have that many active maintainers now to make it working.

That's precisely the reason I nudged this a bit. To avoid forgetting about it, not to be rude or hijack other maintainers' will. Thanks again.