Package-level declarations

Types

Link copied to clipboard
class KotlinCoreEnvironmentWrapper(environment: KotlinCoreEnvironment?, disposable: Disposable)

Make sure to always call dispose or use a use block when working with KotlinCoreEnvironments.

Link copied to clipboard

The object to use the Kotlin script engine for code compilation.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun compileContentForTest(content: String, path: Path = Path("/").absolute().resolve("Test.kt")): KtFile
fun compileContentForTest(content: String, filename: String): KtFile

Use this method if you define a kt file/class as a plain string in your test.

Link copied to clipboard
fun compileForTest(path: Path): KtFile

Use this method if you test a kt file/class in the test resources.

Link copied to clipboard
fun createEnvironment(additionalRootPaths: List<File> = emptyList(), additionalJavaSourceRootPaths: List<File> = emptyList()): KotlinCoreEnvironmentWrapper

Create a {@link KotlinCoreEnvironmentWrapper} used for test.

Link copied to clipboard

Creates a new directory in the default temporary-file directory, using the given prefix to generate its name. The resulting directory in the returned path is automatically deleted on JVM exit.

Link copied to clipboard
fun createTempFileForTest(prefix: String, suffix: String): Path

Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name. The resulting file in the returned path is automatically deleted on JVM exit.

Link copied to clipboard
Link copied to clipboard
fun resource(name: String): URI
Link copied to clipboard
Link copied to clipboard
fun resourceUrl(name: String): URL