mirror of https://github.com/sbt/sbt.git
update to ScalaCheck 1.11.0
This commit is contained in:
parent
57f87fe6c1
commit
cfe5f3cebc
|
|
@ -18,7 +18,7 @@ object DagSpecification extends Properties("Dag")
|
||||||
private def dagGen(nodeCount: Int): Gen[TestDag] =
|
private def dagGen(nodeCount: Int): Gen[TestDag] =
|
||||||
{
|
{
|
||||||
val nodes = new HashSet[TestDag]
|
val nodes = new HashSet[TestDag]
|
||||||
def nonterminalGen(p: Gen.Params): Gen[TestDag] =
|
def nonterminalGen(p: Gen.Parameters): Gen[TestDag] =
|
||||||
{
|
{
|
||||||
for(i <- 0 until nodeCount; nextDeps <- Gen.someOf(nodes).apply(p))
|
for(i <- 0 until nodeCount; nextDeps <- Gen.someOf(nodes).apply(p))
|
||||||
nodes += new TestDag(i, nextDeps)
|
nodes += new TestDag(i, nextDeps)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,12 @@ import Process._
|
||||||
|
|
||||||
object ProcessSpecification extends Properties("Process I/O")
|
object ProcessSpecification extends Properties("Process I/O")
|
||||||
{
|
{
|
||||||
implicit val exitCodeArb: Arbitrary[Array[Byte]] = Arbitrary(Gen.choose(0, 10) flatMap { size => Gen.resize(size, Arbitrary.arbArray[Byte].arbitrary) })
|
implicit val exitCodeArb: Arbitrary[Array[Byte]] = Arbitrary(
|
||||||
|
for(size <- Gen.choose(0, 10);
|
||||||
|
l <- Gen.listOfN[Byte](size, Arbitrary.arbByte.arbitrary))
|
||||||
|
yield
|
||||||
|
l.toArray
|
||||||
|
)
|
||||||
|
|
||||||
/*property("Correct exit code") = forAll( (exitCode: Byte) => checkExit(exitCode))
|
/*property("Correct exit code") = forAll( (exitCode: Byte) => checkExit(exitCode))
|
||||||
property("#&& correct") = forAll( (exitCodes: Array[Byte]) => checkBinary(exitCodes)(_ #&& _)(_ && _))
|
property("#&& correct") = forAll( (exitCodes: Array[Byte]) => checkBinary(exitCodes)(_ #&& _)(_ && _))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue