diff --git a/compile/inc/src/test/scala/sbt/inc/TestCaseGenerators.scala b/compile/inc/src/test/scala/sbt/inc/TestCaseGenerators.scala index 04447eaa8..f00ff8303 100644 --- a/compile/inc/src/test/scala/sbt/inc/TestCaseGenerators.scala +++ b/compile/inc/src/test/scala/sbt/inc/TestCaseGenerators.scala @@ -27,7 +27,12 @@ object TestCaseGenerators { // Ensure that we generate unique class names and file paths every time. // Using repeated strings may lead to all sorts of undesirable interactions. val used = scala.collection.mutable.Set.empty[String] - def unique[T](g: Gen[T]) = g suchThat { o: T => used.add(o.toString) } + + def unique[T](g: Gen[T]) = g retryUntil { o: T => used.add(o.toString) } + + def identifier: Gen[String] = sized { size => + resize(Math.max(size, 3), Gen.identifier) + } def genFilePathSegment: Gen[String] = for { n <- choose(3, maxPathSegmentLen) // Segments have at least 3 characters. diff --git a/project/Util.scala b/project/Util.scala index cedfe1e40..9b7595a3c 100644 --- a/project/Util.scala +++ b/project/Util.scala @@ -50,7 +50,7 @@ object Util def testDependencies = libraryDependencies <++= includeTestDependencies { incl => if(incl) Seq( - "org.scalacheck" %% "scalacheck" % "1.11.0" % "test", + "org.scalacheck" %% "scalacheck" % "1.11.1" % "test", "org.specs2" %% "specs2" % "1.12.3" % "test", "junit" % "junit" % "4.11" % "test" )