Skip to content

Commit

Permalink
chore(release): add test for all warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zoobestik committed Apr 30, 2024
1 parent ea04f68 commit 8970b7c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/kotlin/com/compiler/server/JvmRunnerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package com.compiler.server
import com.compiler.server.base.BaseExecutorTest
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertTrue

class JvmRunnerTest : BaseExecutorTest() {

Expand Down Expand Up @@ -50,6 +52,22 @@ class JvmRunnerTest : BaseExecutorTest() {
)
}

@Test
fun `warnings after exception`() {
// language=kotlin
val result = run(
"""
fun main() {
println("")g
var someVar = 1
}
""".trimIndent(), "")

assertTrue(result.compilerDiagnostics.any {
it.message.contains("Variable 'kotlin' is never used") == true
})
}

@Test
fun `base execute test JVM multi`() {
run(
Expand Down

0 comments on commit 8970b7c

Please sign in to comment.