nyaya travis-ci

Random Data Generation and/or Property Testing in Scala & Scala.JS.

Nyaya

Nyaya is a Scala/Scala.JS library to:

  • Test properties using random data.
  • Prove properties with (reasonably-sized) finite domains.
  • Assert properties in real data.
  • Generate random data.
  • Ensure uniqueness in random data.

It is:

  • Fast. Probably the fastest Scala random data gen / prop tester. (Benchmarks coming soon…)
  • Has a nice, fluent API for generating random data. (examples)
    
    scala> import nyaya.gen._
    import nyaya.gen._

scala> val g = Gen.int mapTo Gen.boolean.option g: nyaya.gen.Gen[Map[Int,Option[Boolean]]] = Gen()

scala> g.samples().take(1).foreach(println) Map(609117252 -> None, -339 -> Some(true), 1684851879 -> Some(false), 78379 -> None)


<br>
#### SBT setup
```scala
// Property expression, evaluation, assertion.
libraryDependencies += "com.github.japgolly.nyaya" %%% "nyaya-prop" % "0.8.1"

// Random data generation.
libraryDependencies += "com.github.japgolly.nyaya" %%% "nyaya-gen" % "0.8.1"

// Property testing with random data.
// Property proving.
libraryDependencies += "com.github.japgolly.nyaya" %%% "nyaya-test" % "0.8.1" % "test"


Doc


Requires:

  • Scala 2.11+
  • Scala.JS 0.6.13+ (optional)


What does Nyaya mean?

See:


Licence

Copyright (C) 2014-2016 David Barri

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

Related Repositories

test-state

test-state

Scala Test-State. ...


Top Contributors

japgolly noelwelsh ExNexu

Releases

-   v0.8.1 zip tar
-   v0.8.0 zip tar
-   v0.7.3 zip tar
-   v0.7.2 zip tar
-   v0.7.1 zip tar
-   v0.7.0 zip tar
-   v0.6.1 zip tar
-   v0.6.0 zip tar
-   v0.5.11 zip tar
-   v0.5.10 zip tar
-   v0.5.9 zip tar
-   v0.5.8 zip tar
-   v0.5.7 zip tar
-   v0.5.6 zip tar
-   v0.5.5 zip tar
-   v0.5.4 zip tar
-   v0.5.3 zip tar
-   v0.5.2 zip tar
-   v0.5.1 zip tar
-   v0.5.0 zip tar