Skip to content

Commit

Permalink
#630 newer scalar library for java 17 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
svennissel committed May 9, 2022
1 parent ac12eef commit ceff2ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/olv.java-conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies {
implementation 'ch.qos.logback:logback-core:1.1.3'
implementation 'ch.qos.logback:logback-classic:1.1.3'
implementation 'org.unix4j:unix4j-command:0.3'
implementation 'org.scala-lang:scala-library:2.12.4'
implementation 'org.scala-lang:scala-library:2.12.15'
implementation 'org.scala-lang.modules:scala-parser-combinators_2.12:1.1.0'
implementation 'io.dropwizard.metrics:metrics-core:3.2.2'
implementation 'com.alibaba:fastjson:1.2.76'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package pl.otros.logview.scala

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.{Matchers, WordSpecLike}
import org.scalatest.{Assertion, Matchers, WordSpecLike}

@RunWith(classOf[JUnitRunner])
class SimpleTreePrinterTest extends WordSpecLike with Matchers {

"SimpleTreePrinter" should {
"print empty list" in {
val tree: Tree = ListValue(List.empty[Tree])
val expected =""" *── List: <EMPTY>"""
val expected = """ *── List: <EMPTY>"""
test(tree, expected)
}

Expand All @@ -35,7 +35,7 @@ class SimpleTreePrinterTest extends WordSpecLike with Matchers {

"print empty set" in {
val tree: Tree = SetValue(List.empty[Tree])
val expected =""" *── Set: <EMPTY>"""
val expected = """ *── Set: <EMPTY>"""
test(tree, expected)
}

Expand All @@ -60,7 +60,7 @@ class SimpleTreePrinterTest extends WordSpecLike with Matchers {

"print empty Map" in {
val tree: Tree = MapValue(Map.empty)
val expected =""" *── Map: <EMPTY>"""
val expected = """ *── Map: <EMPTY>"""
test(tree, expected)
}

Expand Down Expand Up @@ -179,9 +179,9 @@ class SimpleTreePrinterTest extends WordSpecLike with Matchers {
test(tree, expected)
}

def test(tree: Tree, expected: String) = {
def test(tree: Tree, expected: String): Assertion = {
val printed: String = new SimpleTreePrinter().printTree(tree)
val expectedWithoutEmptyLines = expected.lines.filter(_.trim.nonEmpty).mkString("\n")
val expectedWithoutEmptyLines = expected.linesIterator.filter(_.trim.nonEmpty).mkString("\n")
printed shouldBe expectedWithoutEmptyLines
}

Expand Down

0 comments on commit ceff2ce

Please sign in to comment.