diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 6e37a2d4..4f99665c 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v2 - uses: coursier/cache-action@v3 - name: Set up JDK 1.8 - uses: olafurpg/setup-scala@v10 + uses: olafurpg/setup-scala@v12 with: java-version: 1.8 - name: Run tests diff --git a/project/Build.scala b/project/Build.scala index ed957c15..31602797 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -7,11 +7,11 @@ import com.typesafe.sbt.osgi.SbtOsgi import com.typesafe.sbt.osgi.SbtOsgi.autoImport._ object Versions { - val Scala = "3.0.0-RC3" + val Scala = "3.0.1" val ScalaCross = - Seq("2.12.13", "2.13.5", "3.0.0-RC3") + Seq("2.12.13", "2.13.6", Scala) - val ScalaTest = "3.2.8" + val ScalaTest = "3.2.9" val ScalaCheck = "1.15.4" } diff --git a/shared/src/test/scala/squants/QuantitySpec.scala b/shared/src/test/scala/squants/QuantitySpec.scala index 740903fd..27168b6b 100644 --- a/shared/src/test/scala/squants/QuantitySpec.scala +++ b/shared/src/test/scala/squants/QuantitySpec.scala @@ -58,21 +58,21 @@ class QuantitySpec extends AnyFlatSpec with Matchers with CustomMatchers with Tr implicit object ThingeeNumeric extends AbstractQuantityNumeric[Thingee](Thangs) - behavior of "Quantity as implemented in Thingee" + // behavior of "Quantity as implemented in Thingee" - it should "create values using arbitrary numeric types" in { - // define Numeric for each type - abstract class BaseNumeric[T] extends Numeric[T] { - def plus(x: T, y: T) = x + y - def minus(x: T, y: T) = x - y - def times(x: T, y: T) = x * y - def negate(x: T) = -x - def toInt(x: T) = x.toInt - def toLong(x: T) = x.toLong - def toFloat(x: T) = x.toFloat - def compare(x: T, y: T) = if (x == y) 0 else if (x.toDouble > y.toDouble) 1 else -1 - } + // define Numeric for each type + abstract class BaseNumeric[T] extends Numeric[T] { + def plus(x: T, y: T) = x + y + def minus(x: T, y: T) = x - y + def times(x: T, y: T) = x * y + def negate(x: T) = -x + def toInt(x: T) = x.toInt + def toLong(x: T) = x.toLong + def toFloat(x: T) = x.toFloat + def compare(x: T, y: T) = if (x == y) 0 else if (x.toDouble > y.toDouble) 1 else -1 + } + it should "create values using arbitrary numeric types" in { implicit val stringNumeric = new BaseNumeric[String] { def fromInt(x: Int) = x.toString def toDouble(x: String) = augmentString(x).toDouble // augmentString is used to disambiguate implicit conversion