update to ScalaCheck 1.11.0

This commit is contained in:
Mark Harrah 2013-11-04 11:27:46 -05:00
parent 57f87fe6c1
commit cfe5f3cebc
2 changed files with 10 additions and 5 deletions

View File

@ -18,7 +18,7 @@ object DagSpecification extends Properties("Dag")
private def dagGen(nodeCount: Int): Gen[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))
nodes += new TestDag(i, nextDeps)

View File

@ -8,7 +8,12 @@ import Process._
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") = forAll( (exitCodes: Array[Byte]) => checkBinary(exitCodes)(_ #&& _)(_ && _))