Add test for kotlin.streams function usage in Kotlin code
NB: does not pass in javac mode due to lack of JvmPackageName support
This commit is contained in:
+5
-4
@@ -104,13 +104,14 @@ public abstract class KotlinMultiFileTestWithJava<M, F> extends KtUsefulTestCase
|
||||
result.add(KotlinTestUtils.getAnnotationsJar());
|
||||
result.addAll(getExtraClasspath());
|
||||
|
||||
boolean loadAndroidAnnotations = InTextDirectivesUtils.isDirectiveDefined(
|
||||
FilesKt.readText(file, Charsets.UTF_8), "ANDROID_ANNOTATIONS"
|
||||
);
|
||||
String fileText = FilesKt.readText(file, Charsets.UTF_8);
|
||||
|
||||
if (loadAndroidAnnotations) {
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(fileText, "ANDROID_ANNOTATIONS")) {
|
||||
result.add(ForTestCompileRuntime.androidAnnotationsForTests());
|
||||
}
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(fileText, "STDLIB_JDK8")) {
|
||||
result.add(ForTestCompileRuntime.runtimeJarForTestsWithJdk8());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
+5
@@ -25,6 +25,11 @@ public class ForTestCompileRuntime {
|
||||
return assertExists(new File("dist/kotlinc/lib/kotlin-stdlib.jar"));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static File runtimeJarForTestsWithJdk8() {
|
||||
return assertExists(new File("dist/kotlinc/lib/kotlin-stdlib-jdk8.jar"));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static File minimalRuntimeJarForTests() {
|
||||
return assertExists(new File("dist/kotlin-stdlib-minimal-for-test.jar"));
|
||||
|
||||
Reference in New Issue
Block a user