scalacheck-shapeless_1.13


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

com.github.alexarchambault
ArtifactId

ArtifactId

scalacheck-shapeless_1.13_2.10
Last Version

Last Version

1.1.8
Release Date

Release Date

Type

Type

jar
Description

Description

scalacheck-shapeless_1.13
scalacheck-shapeless_1.13
Project URL

Project URL

https://github.com/alexarchambault/scalacheck-shapeless
Project Organization

Project Organization

com.github.alexarchambault
Source Code Management

Source Code Management

https://github.com/alexarchambault/scalacheck-shapeless.git

Download scalacheck-shapeless_1.13_2.10

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.alexarchambault/scalacheck-shapeless_1.13_2.10/ -->
<dependency>
    <groupId>com.github.alexarchambault</groupId>
    <artifactId>scalacheck-shapeless_1.13_2.10</artifactId>
    <version>1.1.8</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.alexarchambault/scalacheck-shapeless_1.13_2.10/
implementation 'com.github.alexarchambault:scalacheck-shapeless_1.13_2.10:1.1.8'
// https://jarcasting.com/artifacts/com.github.alexarchambault/scalacheck-shapeless_1.13_2.10/
implementation ("com.github.alexarchambault:scalacheck-shapeless_1.13_2.10:1.1.8")
'com.github.alexarchambault:scalacheck-shapeless_1.13_2.10:jar:1.1.8'
<dependency org="com.github.alexarchambault" name="scalacheck-shapeless_1.13_2.10" rev="1.1.8">
  <artifact name="scalacheck-shapeless_1.13_2.10" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.alexarchambault', module='scalacheck-shapeless_1.13_2.10', version='1.1.8')
)
libraryDependencies += "com.github.alexarchambault" % "scalacheck-shapeless_1.13_2.10" % "1.1.8"
[com.github.alexarchambault/scalacheck-shapeless_1.13_2.10 "1.1.8"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.10.7
org.scalacheck : scalacheck_2.10 jar 1.13.5
com.chuusai : shapeless_2.10 jar 2.3.3

Project Modules

There are no modules declared in this project.

scalacheck-shapeless

Generation of arbitrary case classes / ADTs instances with scalacheck and shapeless

Build Status Gitter Maven Central

Usage

Add to your build.sbt

resolvers += Resolver.sonatypeRepo("releases") // only needed if the release hasn't reached maven central yet

libraryDependencies += "com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % "1.2.3"

If you are using scala 2.10.x, also add the macro paradise plugin to your build,

libraryDependencies +=
  compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.patch)

scalacheck-shapeless depends on shapeless 2.3 and scalacheck 1.14. It is built against scala 2.10, 2.11, and 2.12.

If you are using shapeless 2.2 along with scalacheck 1.13, use the 1.0.0 version. If you are using shapeless 2.2 along with scalacheck 1.12, see the 0.3.x branch.

Import the content of org.scalacheck.ScalacheckShapeless close to where you want Arbitrary type classes to be automatically available for case classes / sealed hierarchies,

import org.scalacheck.ScalacheckShapeless._

//  If you defined:

// case class Foo(i: Int, s: String, blah: Boolean)
// case class Bar(foo: Foo, other: String)

// sealed trait Base
// case class BaseIntString(i: Int, s: String) extends Base
// case class BaseDoubleBoolean(d: Double, b: Boolean) extends Base

//  then you can now do

implicitly[Arbitrary[Foo]]
implicitly[Arbitrary[Bar]]
implicitly[Arbitrary[Base]]

and in particular, while writing property-based tests,

property("some property about Foo") {
  forAll { foo: Foo =>
    // Ensure foo has the required property
  }
}

without having to define yourself an Arbitrary for Foo.

See also

License

Released under the Apache 2 license. See LICENSE file for more details.

Code of Conduct

See the Code of Conduct

Versions

Version
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.1.0-RC3
1.1.0-RC2
1.1.0-RC1
1.0.0
1.0.0-RC3
1.0.0-RC2
1.0.0-RC1