-
Notifications
You must be signed in to change notification settings - Fork 153
Closed
Description
Hello,
I couldn't find any documentation about how to use refined-scalacheck and I struggle with refinements when they become a bit too specific (looks like they act as a filter discarding all values)
I'm new to scala and I suspect that the implicit resolution is not what it should be but I couldn't figure out how to make it work.
import org.scalacheck.Properties
import org.scalacheck.Prop.forAll
import eu.timepit.refined.auto.autoUnwrap
import eu.timepit.refined.api.Refined
import eu.timepit.refined.predicates.string.StartsWith
import eu.timepit.refined.scalacheck.string.startsWithArbitrary
import eu.timepit.refined.scalacheck.any.arbitraryFromValidate // <- my main suspect
object StringSpecification extends Properties("String") {
property("startsWith") = forAll { (str: String Refined StartsWith["a"]) =>
str.charAt(0).equals("a")
}
}
// result -> String.startsWith: Gave up after only 0 passed tests. 501 tests were discarded.Any hint about how I'm supposed to use it ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels