Skip to content

Commit 20b3712

Browse files
iilyakGitHub Enterprise
authored and
GitHub Enterprise
committed
Fix 'make test' (#21)
* Fix 'make test' * Use smart assertions
1 parent f3d9ed3 commit 20b3712

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

build-logic/scala-library/src/main/groovy/com.cloudant.scala-library.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ configurations.all {
2121
extendsFrom = []
2222
}
2323
}
24+
25+
test {
26+
testLogging {
27+
events "passed", "skipped", "failed", "standardOut", "standardError"
28+
}
29+
}

experiments/src/test/scala/com/cloudant/ziose/experiments/HelloSpec.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class HelloSpec extends JUnitRunnableSpec {
1515
for {
1616
result <- Hello.divide(4, 2)
1717
} yield {
18-
assert(result)(equalTo(2))
18+
assertTrue(result == 2)
1919
}
2020
},
2121
test("failed divide") {
22-
assert(Hello.divide(4, 0))(
23-
throws(isSubtype[ArithmeticException](anything))
22+
assertZIO(Hello.divide(4, 0).exit)(
23+
fails(isSubtype[ArithmeticException](anything))
2424
)
2525
}
2626
)

settings.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ dependencyResolutionManagement {
1414
}
1515
versionCatalogs {
1616
libs {
17-
version('zio-vsn', '2.0.0-RC6')
18-
version('zio-nio', '2.0.0-RC1')
17+
version('zio-vsn', '2.0.0')
18+
version('zio-nio', '2.0.0')
1919
version('jinterface', "${System.env.JINTERFACE_VSN}")
2020
version('sbt', '1.3.5')
2121

2222
// Scala compiler
2323
library('scala-compiler', 'org.scala-lang', 'scala-compiler').version(scalaLongVersion)
24-
library('scala-compiler-bridge', 'org.scala-sbt', "compiler-bridge_$scalaLongVersion").versionRef('sbt')
24+
library('scala-compiler-bridge', 'org.scala-sbt', "compiler-bridge_$scalaShortVersion").versionRef('sbt')
2525
library('scala-compiler-interface', 'org.scala-sbt', 'compiler-interface').versionRef('sbt')
2626
library('scala-library', 'org.scala-lang', 'scala-library').version(scalaLongVersion)
2727
library('zinc', 'org.scala-sbt', "zinc_$scalaShortVersion").version(scalaLongVersion)

0 commit comments

Comments
 (0)