File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
compiler/ir/ir.validation
test/org/jetbrains/kotlin/ir/validation Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ plugins {
22 kotlin(" jvm" )
33 id(" jps-compatible" )
44 id(" test-inputs-check" )
5+ id(" project-tests-convention" )
56}
67
7- tasks.test {
8- useJUnitPlatform( )
8+ projectTests {
9+ testTask(jUnitMode = JUnitMode . JUnit5 )
910}
1011
1112dependencies {
@@ -19,7 +20,8 @@ dependencies {
1920
2021 compileOnly(intellijCore())
2122
22- testImplementation(project.kotlinTest(" junit5" ))
23+ testImplementation(libs.junit.jupiter.api)
24+ testRuntimeOnly(libs.junit.jupiter.engine)
2325 testRuntimeOnly(testFixtures(project(" :compiler:tests-common-new" )))
2426 testImplementation(project(" :compiler:ir.backend.common" ))
2527}
Original file line number Diff line number Diff line change @@ -44,8 +44,12 @@ import org.jetbrains.kotlin.name.Name
4444import org.jetbrains.kotlin.name.SpecialNames
4545import org.jetbrains.kotlin.storage.LockBasedStorageManager
4646import org.jetbrains.kotlin.types.Variance
47+ import org.junit.jupiter.api.Assertions.assertEquals
48+ import org.junit.jupiter.api.Assertions.fail
49+ import org.junit.jupiter.api.BeforeEach
50+ import org.junit.jupiter.api.Test
51+ import org.junit.jupiter.api.assertThrows
4752import kotlin.reflect.KProperty
48- import kotlin.test.*
4953
5054class IrValidatorTest {
5155
@@ -55,7 +59,7 @@ class IrValidatorTest {
5559 .withAllChecks()
5660 .withInlineFunctionCallsiteCheck { it.symbol.owner.name.toString() != " inlineFunctionUseSiteNotPermitted" }
5761
58- @BeforeTest
62+ @BeforeEach
5963 fun setUp () {
6064 messageCollector = MessageCollectorImpl ()
6165
@@ -147,7 +151,7 @@ class IrValidatorTest {
147151
148152 private inline fun runValidationAndAssert (mode : IrVerificationMode , block : () -> Unit ) {
149153 if (mode == IrVerificationMode .ERROR ) {
150- assertFailsWith <IrValidationException >(block = block)
154+ assertThrows <IrValidationException >(executable = block)
151155 } else {
152156 block()
153157 }
You can’t perform that action at this time.
0 commit comments