datastructures/gradle/test/junit5.gradle

37 lines
1.5 KiB
Groovy
Raw Normal View History

2020-09-12 22:42:03 +02:00
dependencies {
2022-06-01 10:09:09 +02:00
testImplementation libs.junit.jupiter.api
testImplementation libs.junit.jupiter.params
testImplementation libs.hamcrest
testRuntimeOnly libs.junit.jupiter.engine
2023-10-17 12:05:27 +02:00
testRuntimeOnly libs.junit.jupiter.platform.launcher
2020-09-12 22:42:03 +02:00
}
test {
useJUnitPlatform()
2021-04-08 22:36:40 +02:00
failFast = false
2020-09-12 22:42:03 +02:00
testLogging {
events 'STARTED', 'PASSED', 'FAILED', 'SKIPPED'
}
2022-08-05 19:15:27 +02:00
jvmArgs '--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED',
'--add-exports=java.base/sun.nio.ch=ALL-UNNAMED',
'--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
2022-08-05 19:15:27 +02:00
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED'
2020-09-12 22:42:03 +02:00
afterSuite { desc, result ->
if (!desc.parent) {
println "\nTest result: ${result.resultType}"
println "Test summary: ${result.testCount} tests, " +
"${result.successfulTestCount} succeeded, " +
"${result.failedTestCount} failed, " +
"${result.skippedTestCount} skipped"
}
}
}