Remove javaFilesDir parameter of CodegenTestCase.doMultiFileTest

Create TestFile instances for .java sources similarly to .kt sources,
and write them to a temporary directory via writeJavaFiles in each test
where this is needed
This commit is contained in:
Alexander Udalov
2019-04-03 16:34:25 +02:00
parent 7fdb9c990e
commit b602c08773
23 changed files with 89 additions and 115 deletions
@@ -120,8 +120,8 @@ abstract class AbstractParcelBoxTest : CodegenTestCase() {
return listOf(kotlinRuntimeJar) + layoutLibJars + robolectricJars + junitJar + androidExtensionsRuntimeJars
}
override fun doMultiFileTest(wholeFile: File, files: List<TestFile>, javaFilesDir: File?) {
compile(files + TestFile(LIBRARY_KT.name, LIBRARY_KT.readText()), javaFilesDir)
override fun doMultiFileTest(wholeFile: File, files: List<TestFile>) {
compile(files + TestFile(LIBRARY_KT.name, LIBRARY_KT.readText()))
val javaBin = File(System.getProperty("java.home").takeIf { it.isNotEmpty() } ?: error("JAVA_HOME is not set"), "bin")
val javaExe = File(javaBin, "java.exe").takeIf { it.exists() } ?: File(javaBin, "java")