/scalacheck-magnolia

replace scalacheck-shapeless with scalacheck-magnolia for insane compilation speed up

Primary LanguageScalaApache License 2.0Apache-2.0

Scalacheck Magnolia

Generation of arbitrary case classes / ADTs instances with Scalacheck and Magnolia!

Why?

Because scalacheck-shapeless is good but too slow. Also this is much smaller and understandable, thanks to Magnolia!

Install

Just copy the files in src/main/scala to your project. It's 2 files, less than 60 lines in total! And you don't have to care about updating Scalacheck or Magnolia

How to use it?

import scalacheckmagnolia.MagnoliaArbitrary._
import org.scalacheck._

case class Example(a: String, b: Long)

val arbitraryExample = implicitly[Arbitrary[Example]]

println(arbitraryExample.arbitrary.sample.get)

Links