diff --git a/.scalafmt.conf b/.scalafmt.conf new file mode 100644 index 0000000..bda502a --- /dev/null +++ b/.scalafmt.conf @@ -0,0 +1,3 @@ +maxColumn = 180 +style = defaultWithAlign +optIn.breaksInsideChains = true diff --git a/build.sbt b/build.sbt index 42b3bfe..309c60f 100644 --- a/build.sbt +++ b/build.sbt @@ -80,10 +80,10 @@ libraryDependencies ++= Seq( "junit" % "junit" % "4.8.2" % "test", "org.codehaus.plexus" % "plexus-classworlds" % "2.4" % "test", "org.xerial.java" % "xerial-core" % "2.1" % "test", - "org.xerial" % "xerial-core" % "3.2.3" % "test", - "org.scalatest" % "scalatest_2.11" % "2.2.0" % "test", + "org.wvlet.airframe" %% "airframe-log" % "0.25" % "test", + "org.scalatest" %% "scalatest" % "3.0.4" % "test", "org.osgi" % "org.osgi.core" % "4.3.0" % "provided", - "com.novocode" % "junit-interface" % "0.10" % "test" + "com.novocode" % "junit-interface" % "0.11" % "test" ) enablePlugins(SbtOsgi) diff --git a/src/test/scala/org/xerial/snappy/SnappyPerformanceTest.scala b/src/test/scala/org/xerial/snappy/SnappyPerformanceTest.scala index 31110dc..2a1c2a9 100644 --- a/src/test/scala/org/xerial/snappy/SnappyPerformanceTest.scala +++ b/src/test/scala/org/xerial/snappy/SnappyPerformanceTest.scala @@ -2,8 +2,6 @@ package org.xerial.snappy import java.io.{ByteArrayOutputStream, ByteArrayInputStream} -import xerial.core.log.LogLevel - import scala.util.Random /** @@ -26,7 +24,7 @@ class SnappyPerformanceTest extends SnappySpec { val input = data - time("compression", repeat = 100, logLevel = LogLevel.INFO) { + time("compression", repeat = 100) { // 0.037 sec. => 0.026 block("default") { val out = new ByteArrayOutputStream() diff --git a/src/test/scala/org/xerial/snappy/SnappySpec.scala b/src/test/scala/org/xerial/snappy/SnappySpec.scala index 02bbb63..f4c4d72 100644 --- a/src/test/scala/org/xerial/snappy/SnappySpec.scala +++ b/src/test/scala/org/xerial/snappy/SnappySpec.scala @@ -1,14 +1,15 @@ package org.xerial.snappy import org.scalatest._ -import xerial.core.log.Logger -import xerial.core.util.Timer +import wvlet.log.LogFormatter.SourceCodeLogFormatter +import wvlet.log.{LogSupport, Logger} +import wvlet.log.io.Timer /** * */ -trait SnappySpec extends WordSpec with Matchers with GivenWhenThen with OptionValues with BeforeAndAfter with Timer with Logger { +trait SnappySpec extends WordSpec with Matchers with GivenWhenThen with OptionValues with BeforeAndAfter with Timer with LogSupport { + Logger.setDefaultFormatter(SourceCodeLogFormatter) implicit def toTag(s: String): Tag = Tag(s) - }