Skip to content

Commit

Permalink
prepare -Xsource:3-cross
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Aug 25, 2024
1 parent da5769f commit b9aef8b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ object SizeTestsDefinitions {
case class Branch(left: Tree, right: Tree) extends Tree

object Tree {
implicit val recursive = derive.Recursive[Tree](Gen.value(Leaf))
implicit val recursive: derive.Recursive[Tree] =
derive.Recursive[Tree](Gen.value(Leaf))
}
}
29 changes: 14 additions & 15 deletions test/shared/src/test/scala-2/scalaprops/GenTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -690,22 +690,21 @@ object GenTests extends Scalaprops {
case object B extends X
case object C extends X

Property.forAll {
seed: Long =>
val result = Gen[X]
.samples(
listSize = 12000,
seed = seed
)
.groupBy(_.getClass)
.map { case (k, v) => k -> v.size }
result.foreach { x =>
val n = x._2
if (n < 3000 || 5000 < n) {
sys.error(result.toString)
}
Property.forAll { (seed: Long) =>
val result = Gen[X]
.samples(
listSize = 12000,
seed = seed
)
.groupBy(_.getClass)
.map { case (k, v) => k -> v.size }
result.foreach { x =>
val n = x._2
if (n < 3000 || 5000 < n) {
sys.error(result.toString)
}
true
}
true
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/shared/src/test/scala-2/scalaprops/ShrinkTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object ShrinkTests extends Scalaprops {
private[this] implicit val genString: Gen[String] =
Gen.asciiString

private[this] implicit val shrinkString =
private[this] implicit val shrinkString: Shrink[String] =
Shrink[List[Char]].xmap[String](_.mkString, _.toCharArray.toList)

lazy val expectedListIntShrink =
Expand Down
2 changes: 1 addition & 1 deletion test/shared/src/test/scala-2/scalaprops/Util.scala
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object Util {
compareCogenHelper(Rand.standard(System.currentTimeMillis()))(first, second)(50)

def compareShrink[T: Gen](first: Shrink[T], second: Shrink[T]): Property =
Property.forAll { t: T => first(t) == second(t) }
Property.forAll { (t: T) => first(t) == second(t) }

def validateSingletons[T: Singletons](expected: T*): Boolean = {
val found = Singletons[T].apply()
Expand Down

0 comments on commit b9aef8b

Please sign in to comment.