Add extended annotation to test environment
This commit is contained in:
@@ -226,7 +226,7 @@ public class JetTestUtils {
|
||||
@NotNull TestJdkKind jdkKind
|
||||
) {
|
||||
return new JetCoreEnvironment(disposable, compilerConfigurationForTests(
|
||||
configurationKind, jdkKind, getAnnotationsJar()));
|
||||
configurationKind, jdkKind, getAnnotationsJar(), getAnnotationsExtJar()));
|
||||
}
|
||||
|
||||
public static File findMockJdkRtJar() {
|
||||
@@ -237,6 +237,10 @@ public class JetTestUtils {
|
||||
return new File(JetTestCaseBuilder.getHomeDirectory(), "compiler/testData/mockJDK/jre/lib/annotations.jar");
|
||||
}
|
||||
|
||||
public static File getAnnotationsExtJar() {
|
||||
return new File(JetTestCaseBuilder.getHomeDirectory(), "dist/kotlinc/lib/kotlin-annotations-ext.jar");
|
||||
}
|
||||
|
||||
public static void mkdirs(File file) throws IOException {
|
||||
if (file.isDirectory()) {
|
||||
return;
|
||||
|
||||
@@ -121,7 +121,9 @@ public final class LoadDescriptorUtil {
|
||||
}
|
||||
|
||||
private static void compileJavaWithAnnotationsJar(@NotNull Collection<File> javaFiles, @NotNull File outDir) throws IOException {
|
||||
String classPath = "out/production/runtime" + File.pathSeparator + JetTestUtils.getAnnotationsJar().getPath();
|
||||
String classPath = "out/production/runtime" +
|
||||
File.pathSeparator + JetTestUtils.getAnnotationsJar().getPath() +
|
||||
File.pathSeparator + JetTestUtils.getAnnotationsExtJar().getPath();
|
||||
JetTestUtils.compileJavaFiles(javaFiles, Arrays.asList(
|
||||
"-classpath", classPath,
|
||||
"-sourcepath", "compiler/tests", // for @ExpectLoadError annotation
|
||||
|
||||
Reference in New Issue
Block a user