Actually create .kt files in the file system for Kotlin multifile tests
This commit is contained in:
@@ -99,6 +99,7 @@ public abstract class KotlinMultiFileTestWithWithJava<M, F> extends JetLiteFixtu
|
|||||||
protected void doTest(String filePath) throws Exception {
|
protected void doTest(String filePath) throws Exception {
|
||||||
File file = new File(filePath);
|
File file = new File(filePath);
|
||||||
final File javaFilesDir = createJavaFilesDir();
|
final File javaFilesDir = createJavaFilesDir();
|
||||||
|
final File kotlinFilesDir = getKotlinSourceRoot();
|
||||||
|
|
||||||
String expectedText = JetTestUtils.doLoadFile(file);
|
String expectedText = JetTestUtils.doLoadFile(file);
|
||||||
|
|
||||||
@@ -117,6 +118,10 @@ public abstract class KotlinMultiFileTestWithWithJava<M, F> extends JetLiteFixtu
|
|||||||
writeSourceFile(fileName, text, javaFilesDir);
|
writeSourceFile(fileName, text, javaFilesDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fileName.endsWith(".kt") && kotlinFilesDir != null) {
|
||||||
|
writeSourceFile(fileName, text, kotlinFilesDir);
|
||||||
|
}
|
||||||
|
|
||||||
return createTestFile(module, fileName, text, directives);
|
return createTestFile(module, fileName, text, directives);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user