diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index b71dce1..a5d7005 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -4,6 +4,7 @@ on: [push] jobs: UnitTests: + runs-on: ubuntu-latest steps: @@ -28,6 +29,7 @@ jobs: run: sbt test MutationTests: + runs-on: ubuntu-latest steps: diff --git a/.travis.yml b/.travis.yml index 53b5661..ec962ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: scala scala: + - 2.13.1 - 2.12.8 before_cache: diff --git a/build.sbt b/build.sbt index 5944bc0..fbc6be2 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ name := "mathimatica-parser" -scalaVersion := "2.12.8" +scalaVersion := "2.13.1" libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2" libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2" @@ -10,6 +10,8 @@ libraryDependencies += "org.scalatest" %% "scalatest" % "3.1. libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.2" % Test libraryDependencies += "org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" % Test +scalacOptions ++= Seq("-deprecation") + // POM settings for Sonatype organization := "com.github.tomerghelber" homepage := Some( diff --git a/project/safety.sbt b/project/safety.sbt index f476b72..fff9b42 100644 --- a/project/safety.sbt +++ b/project/safety.sbt @@ -1 +1 @@ -addSbtPlugin("com.leobenkel" % "safety_plugin" % "0.1.4") +addSbtPlugin("com.leobenkel" % "safety_plugin" % "0.1.5") diff --git a/safetyPlugin.json b/safetyPlugin.json index 534b9ea..fe7dbe3 100644 --- a/safetyPlugin.json +++ b/safetyPlugin.json @@ -1,6 +1,8 @@ { "sbtVersion": "1.3.4", "scalaVersions": [ + "2.13.1", + "2.13.0", "2.12.8" ], "modules": { diff --git a/src/main/scala/com/github/tomerghelber/mathematica/normalform/NormalForm.scala b/src/main/scala/com/github/tomerghelber/mathematica/normalform/NormalForm.scala index d8cc4cc..28a5ea9 100644 --- a/src/main/scala/com/github/tomerghelber/mathematica/normalform/NormalForm.scala +++ b/src/main/scala/com/github/tomerghelber/mathematica/normalform/NormalForm.scala @@ -77,7 +77,7 @@ object NormalForm { } private val normalFormFunctionNodeOrdering = { val functionNameOrdering = TerminalNodeOrdering.on[FunctionNode](_.name) - val functionArgumentsOrdering = Ordering.Iterable(ASTNodeOrdering).on[FunctionNode](_.arguments) + val functionArgumentsOrdering = Ordering.Implicits.seqOrdering(ASTNodeOrdering).on[FunctionNode](_.arguments) functionNameOrdering thenComparing functionArgumentsOrdering } } diff --git a/src/test/scala/com/github/tomerghelber/mathematica/package.scala b/src/test/scala/com/github/tomerghelber/mathematica/package.scala index f022b63..c5ac670 100644 --- a/src/test/scala/com/github/tomerghelber/mathematica/package.scala +++ b/src/test/scala/com/github/tomerghelber/mathematica/package.scala @@ -24,11 +24,11 @@ package object mathematica { .map(_.replaceAll("\\\\", "\\\\") .replaceAll("\"", "\\\"")) val stringStringGen: Gen[String] = stringWithoutWrappersGen.map(s => "\"" + s + "\"") - val symbolStringGen: Gen[String] = for (head <- Gen.alphaChar; last <- Gen.alphaNumStr) yield { head + last } + val symbolStringGen: Gen[String] = for (head <- Gen.alphaChar; last <- Gen.alphaNumStr) yield { s"$head$last" } private val integerGen: Gen[Int] = Gen.chooseNum(Int.MinValue, Int.MaxValue) private val longGen: Gen[Long] = Gen.chooseNum(Long.MinValue, Long.MaxValue) val integerStringGen: Gen[String] = longGen.map(_.toString) - val rationalStringGen: Gen[String] = for(q <-longGen; p <-longGen if p != 0) yield { q + "/" + p} + val rationalStringGen: Gen[String] = for(q <-longGen; p <-longGen if p != 0) yield { s"$q/$p" } val floatStringGen: Gen[String] = Gen.chooseNum(Double.MinValue, Double.MaxValue).map(_.toString) val scientificNotationGen: Gen[String] = Gen.chooseNum(Double.MinValue, Double.MaxValue).map(BigDecimal(_).toString) val numberStringGen: Gen[String] = Gen.oneOf(integerStringGen, rationalStringGen, floatStringGen,