initial commit
This commit is contained in:
27
src/test/kotlin/dev/hgh/HarnessSmokeTest.kt
Normal file
27
src/test/kotlin/dev/hgh/HarnessSmokeTest.kt
Normal file
@@ -0,0 +1,27 @@
|
||||
package dev.hgh
|
||||
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
/**
|
||||
* Validates that the headless test harness works end to end:
|
||||
* a JDK is resolved, the IntelliJ Platform boots, and a fixture can be driven
|
||||
* without launching an IDE.
|
||||
*
|
||||
* If this fails, no other test in the project can be trusted.
|
||||
*/
|
||||
class HarnessSmokeTest : BasePlatformTestCase() {
|
||||
|
||||
fun testPlatformBootsHeadlessly() {
|
||||
val file = myFixture.configureByText("smoke.txt", "hello jai")
|
||||
assertNotNull("fixture should create a PsiFile", file)
|
||||
assertEquals("hello jai", file.text)
|
||||
}
|
||||
|
||||
fun testRunningOnJava21OrLater() {
|
||||
val major = Runtime.version().feature()
|
||||
assertTrue(
|
||||
"IntelliJ Platform test-framework is Java 21 bytecode; running on $major",
|
||||
major >= 21,
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user