Skip to content

Commit

Permalink
add Scala 3
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed May 14, 2021
1 parent 46d4b27 commit 7664c54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
scalaVersion := "2.11.12"

crossScalaVersions := Seq("2.11.12", "2.12.13", "2.13.5")
crossScalaVersions := Seq("2.11.12", "2.12.13", "2.13.5", "3.0.0")

scalacOptions ++= Seq("-feature")

Expand Down
4 changes: 2 additions & 2 deletions src/test/scala/scalaprops/examples/PropertyExample.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import Property.{property, implies, prop}

object PropertyExample extends Scalaprops {

val makeList = property { n: Int =>
val makeList = property { (n: Int) =>
implies(n >= 0 && n < 10000, prop(List.fill(n)("").length == n))
}

val trivial = property { n: Int => Bool.bool(n == 0).implies(n == 0) }
val trivial = property { (n: Int) => Bool.bool(n == 0).implies(n == 0) }
}
6 changes: 3 additions & 3 deletions src/test/scala/scalaprops/quickstart/ListTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import scalaprops._
object ListTest extends Scalaprops {

val revAndRevIsOriginal =
Property.forAll { xs: List[Int] => xs.reverse.reverse == xs }
Property.forAll { (xs: List[Int]) => xs.reverse.reverse == xs }

val revIsOriginal =
Property.forAll { xs: List[Int] => xs.reverse == xs }
Property.forAll { (xs: List[Int]) => xs.reverse == xs }

val empty =
Property.forAll { xs: List[Int] => xs.isEmpty }
Property.forAll { (xs: List[Int]) => xs.isEmpty }
.ignore("ignore a test")
}

0 comments on commit 7664c54

Please sign in to comment.