File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
src/test/kotlin/com/tschuchort/compiletesting Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -741,7 +741,41 @@ class KotlinCompilationTests {
741741 assertThat(result.generatedFiles.map { it.name }).contains(" JSource.class" )
742742 }
743743
744+ @Test
745+ fun `Output directory contains compiled class files` () {
746+ val jSource = SourceFile .java(
747+ " JSource.java" , """
748+ package com.tschuchort.compiletesting;
749+
750+ @ProcessElem
751+ class JSource {
752+ void foo() {
753+ }
754+ }
755+ """
756+ )
744757
758+ val kSource = SourceFile .kotlin(
759+ " KSource.kt" , """
760+ package com.tschuchort.compiletesting
761+
762+ @ProcessElem
763+ class KSource {
764+ fun foo() {}
765+ }
766+ """
767+ )
768+
769+ val result = defaultCompilerConfig().apply {
770+ sources = listOf (jSource, kSource)
771+ annotationProcessors = emptyList()
772+ inheritClassPath = true
773+ }.compile()
774+
775+ assertThat(result.exitCode).isEqualTo(ExitCode .OK )
776+ assertThat(result.outputDirectory.listFilesRecursively().map { it.name })
777+ .contains(" JSource.class" , " KSource.class" )
778+ }
745779
746780 private fun defaultCompilerConfig (): KotlinCompilation {
747781 return KotlinCompilation ().apply {
You can’t perform that action at this time.
0 commit comments