-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For 1-15, potentially drop Scala 2.11 support and add Scala 3 (#41)
* for 1-15, drop _2.11 and add _3 * bump scoverage plugin * bump scoverage plugin M3 * Drop ScalaCheck 1.12, drop Scala 2.11 * mima and initial _3 * put 2.11 back, use project matrix
- Loading branch information
1 parent
d0a848b
commit 8d53310
Showing
15 changed files
with
246 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
core/src/test/scala-3/org/scalacheck/ops/ArbitraryAsGenSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.scalacheck.ops | ||
|
||
import org.scalacheck.{Arbitrary, Gen} | ||
import org.scalatest.freespec.AnyFreeSpec | ||
|
||
class ArbitraryAsGenSpec extends AnyFreeSpec { | ||
|
||
private val it = classOf[ArbitraryAsGen].getSimpleName | ||
|
||
s"$it should implicitly convert a Gen to Arbitrary" in { | ||
def f(arb: Arbitrary[Char]): Unit = () | ||
f(Gen.numChar) | ||
} | ||
|
||
private def implicitGen(implicit gen: Gen[Char]): Unit = () | ||
|
||
s"$it should convert an implicit Arbitrary to an implicit Gen" in { | ||
/* | ||
* Note this compiles in Scala 3, not Scala 2 | ||
*/ | ||
assertCompiles("implicitGen") | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
core/src/test/scala-3/org/scalacheck/ops/NewtypeTypeNameSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.scalacheck.ops | ||
|
||
import org.scalatest.freespec.AnyFreeSpec | ||
|
||
class NewtypeTypeNameSpec extends AnyFreeSpec { | ||
/* | ||
* Note differences in type name emitted by Scala 3 vs. Scala 2 | ||
*/ | ||
"Find a TypeName of a newtype" in { | ||
assertResult("org.scalacheck.ops.NewtypeExample$IdType") { | ||
implicitly[TypeName[NewtypeExample.IdType]].typeName | ||
} | ||
} | ||
|
||
"Find a TypeName of a newsubtype" in { | ||
assertResult("org.scalacheck.ops.NewtypeExample$IdSubtype") { | ||
implicitly[TypeName[NewtypeExample.IdSubtype]].typeName | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.