diff --git a/.travis.yml b/.travis.yml
index d22d7b3..ab16211 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,7 @@ language: scala
scala:
- 2.12.10
- 2.11.12
+ - 2.13.1
jdk:
- oraclejdk8
cache:
diff --git a/build.sbt b/build.sbt
index 79141ad..fbbdcdd 100644
--- a/build.sbt
+++ b/build.sbt
@@ -7,12 +7,13 @@ organization := "org.scorexfoundation"
lazy val scala212 = "2.12.10"
lazy val scala211 = "2.11.12"
-crossScalaVersions := Seq(scala212, scala211)
+lazy val scala213 = "2.13.1"
+crossScalaVersions := Seq(scala212, scala211, scala213)
scalaVersion := scala212
javacOptions ++=
- "-source" :: "1.7" ::
- "-target" :: "1.7" ::
+ "-source" :: "1.8" ::
+ "-target" :: "1.8" ::
Nil
resolvers ++= Seq("Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/",
@@ -22,10 +23,13 @@ resolvers ++= Seq("Sonatype Releases" at "https://oss.sonatype.org/content/repos
)
libraryDependencies ++= Seq(
- "org.rudogma" %% "supertagged" % "1.4",
+ "org.rudogma" %% "supertagged" % "1.5",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
- "org.scalatest" %% "scalatest" % "3.0.3" % "test",
- "org.scalacheck" %% "scalacheck" % "1.13.+" % "test"
+ "org.scalatest" %% "scalatest" % "3.1.1" % Test,
+ "org.scalacheck" %% "scalacheck" % "1.14.+" % Test,
+ // https://mvnrepository.com/artifact/org.scalatestplus/scalatestplus-scalacheck
+ "org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" % Test
+
)
publishMavenStyle in ThisBuild := true
@@ -44,13 +48,13 @@ pomIncludeRepository in ThisBuild := { _ => false }
licenses := Seq("CC0" -> url("https://creativecommons.org/publicdomain/zero/1.0/legalcode"))
homepage := Some(url("https://github.com/ScorexFoundation/scorex-util"))
pomExtra :=
-
-
- kushti
- Alexander Chepurnoy
- http://chepurnoy.org/
-
-
+
+
+ kushti
+ Alexander Chepurnoy
+ http://chepurnoy.org/
+
+
enablePlugins(GitVersioning)
@@ -89,3 +93,4 @@ pgpPublicRing := file("ci/pubring.asc")
pgpSecretRing := file("ci/secring.asc")
pgpPassphrase := sys.env.get("PGP_PASSPHRASE").map(_.toArray)
usePgpKeyHex("9D73AA38C08FD6AE5A51D3C11E4BF6F443599431")
+
diff --git a/project/plugins.sbt b/project/plugins.sbt
index a86caab..97c5e49 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,4 +1,4 @@
-addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
+addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7")
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
diff --git a/src/main/scala/scorex/util/encode/Base58.scala b/src/main/scala/scorex/util/encode/Base58.scala
index 4057961..66ec18d 100644
--- a/src/main/scala/scorex/util/encode/Base58.scala
+++ b/src/main/scala/scorex/util/encode/Base58.scala
@@ -21,10 +21,10 @@ object Base58 extends BytesEncoder {
if (bi > 0) {
while (bi >= Base) {
val (newBi, mod) = bi /% Base
- s.insert(0, Alphabet.charAt(mod.intValue()))
+ s.insert(0, Alphabet.charAt(mod.intValue))
bi = newBi
}
- s.insert(0, Alphabet.charAt(bi.intValue()))
+ s.insert(0, Alphabet.charAt(bi.intValue))
}
// Convert leading zeros too.
input.takeWhile(_ == 0).foldLeft(s) { case (ss, _) =>
diff --git a/src/test/scala/scorex/ModifierIdSpec.scala b/src/test/scala/scorex/ModifierIdSpec.scala
index 6312129..0d96d5d 100644
--- a/src/test/scala/scorex/ModifierIdSpec.scala
+++ b/src/test/scala/scorex/ModifierIdSpec.scala
@@ -1,9 +1,11 @@
package scorex
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.flatspec.AnyFlatSpec
import scorex.util._
-import org.scalatest.{FlatSpec, Matchers}
-class ModifierIdSpec extends FlatSpec with Matchers {
+
+class ModifierIdSpec extends AnyFlatSpec with Matchers {
"ModifierId" should "convert to/from bytes" in {
val bytes = Array.fill[Byte](32)(1)
diff --git a/src/test/scala/scorex/util/ExtensionsSpecification.scala b/src/test/scala/scorex/util/ExtensionsSpecification.scala
index 80cda6d..84c5804 100644
--- a/src/test/scala/scorex/util/ExtensionsSpecification.scala
+++ b/src/test/scala/scorex/util/ExtensionsSpecification.scala
@@ -1,12 +1,13 @@
package scorex.util
-import org.scalatest.{Matchers, PropSpec}
-import org.scalatest.prop.{GeneratorDrivenPropertyChecks, PropertyChecks}
+import org.scalatest.matchers.should.Matchers
+import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks
import Extensions._
import org.scalacheck.Gen
+import org.scalatest.propspec.AnyPropSpec
-class ExtensionsSpecification extends PropSpec
- with GeneratorDrivenPropertyChecks
+class ExtensionsSpecification extends AnyPropSpec
+ with ScalaCheckDrivenPropertyChecks
with Matchers {
property("ByteOps.toUByte") {
@@ -103,7 +104,7 @@ class ExtensionsSpecification extends PropSpec
property("TraversableOps.cast") {
List(1,2,3,4).cast[Int] shouldBe List(1,2,3,4)
- an[IllegalArgumentException] should be thrownBy List(1,"2",3,4).cast
+ an[IllegalArgumentException] should be thrownBy List(1,"2",3,4).cast[Int]
}
}
diff --git a/src/test/scala/scorex/util/encode/BytesEncoderSpecification.scala b/src/test/scala/scorex/util/encode/BytesEncoderSpecification.scala
index 4c01e72..f00346b 100644
--- a/src/test/scala/scorex/util/encode/BytesEncoderSpecification.scala
+++ b/src/test/scala/scorex/util/encode/BytesEncoderSpecification.scala
@@ -1,11 +1,13 @@
package scorex.util.encode
-import org.scalatest.prop.{GeneratorDrivenPropertyChecks, PropertyChecks}
-import org.scalatest.{Matchers, PropSpec}
+import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks
+import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.propspec.AnyPropSpec
-trait BytesEncoderSpecification extends PropSpec
- with PropertyChecks
- with GeneratorDrivenPropertyChecks
+trait BytesEncoderSpecification extends AnyPropSpec
+ with ScalaCheckPropertyChecks
+ with ScalaCheckDrivenPropertyChecks
with Matchers {
val encoder: BytesEncoder
diff --git a/src/test/scala/scorex/util/encode/ZigZagSpecification.scala b/src/test/scala/scorex/util/encode/ZigZagSpecification.scala
index 75d4edb..30e21d2 100644
--- a/src/test/scala/scorex/util/encode/ZigZagSpecification.scala
+++ b/src/test/scala/scorex/util/encode/ZigZagSpecification.scala
@@ -1,14 +1,15 @@
package scorex.util.encode
import org.scalacheck.Gen
-import org.scalatest.prop.PropertyChecks
-import org.scalatest.{Matchers, PropSpec}
+import org.scalatest.propspec.AnyPropSpec
+import org.scalatest.matchers.should.Matchers
+import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import scorex.util.Generators
import scorex.util.encode.ZigZagEncoder._
-class ZigZagSpecification extends PropSpec
+class ZigZagSpecification extends AnyPropSpec
with Generators
- with PropertyChecks
+ with ScalaCheckPropertyChecks
with Matchers {
property("ZigZag encoding format") {
diff --git a/src/test/scala/scorex/util/serialization/ByteArrayBuilderTests.scala b/src/test/scala/scorex/util/serialization/ByteArrayBuilderTests.scala
index e764651..5cd8b26 100644
--- a/src/test/scala/scorex/util/serialization/ByteArrayBuilderTests.scala
+++ b/src/test/scala/scorex/util/serialization/ByteArrayBuilderTests.scala
@@ -1,10 +1,12 @@
package scorex.util.serialization
-import org.scalatest.prop.PropertyChecks
-import org.scalatest.{Matchers, PropSpec}
+
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.propspec.AnyPropSpec
+import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import scorex.util.ByteArrayBuilder
-class ByteArrayBuilderTests extends PropSpec with PropertyChecks with Matchers {
+class ByteArrayBuilderTests extends AnyPropSpec with ScalaCheckPropertyChecks with Matchers {
property("Append basic types") {
val b = new ByteArrayBuilder(1)
diff --git a/src/test/scala/scorex/util/serialization/VLQReaderWriterSpecification.scala b/src/test/scala/scorex/util/serialization/VLQReaderWriterSpecification.scala
index fef572a..49c0eeb 100644
--- a/src/test/scala/scorex/util/serialization/VLQReaderWriterSpecification.scala
+++ b/src/test/scala/scorex/util/serialization/VLQReaderWriterSpecification.scala
@@ -1,14 +1,16 @@
package scorex.util.serialization
import org.scalacheck.{Arbitrary, Gen}
-import org.scalatest.prop.PropertyChecks
-import org.scalatest.{Assertion, Matchers, PropSpec}
+import org.scalatest.Assertion
+import org.scalatest.propspec.AnyPropSpec
+import org.scalatest.matchers.should.Matchers
+import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import scorex.util.TestHelpers._
import scorex.util.Generators
-trait VLQReaderWriterSpecification extends PropSpec
+trait VLQReaderWriterSpecification extends AnyPropSpec
with Generators
- with PropertyChecks
+ with ScalaCheckPropertyChecks
with Matchers {
def byteBufReader(bytes: Array[Byte]): VLQReader