Merge remote-tracking branch 'gk/analysis-generator-fix' into 0.13

This commit is contained in:
Mark Harrah 2013-11-28 11:03:16 -05:00
commit 8160dbda8a
2 changed files with 7 additions and 2 deletions

View File

@ -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.

View File

@ -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"
)