tests fixed
This commit is contained in:
@@ -7,4 +7,4 @@ java.lang.IllegalStateException: my error
|
|||||||
at Script.a(Unknown Source)
|
at Script.a(Unknown Source)
|
||||||
at Script.<init>(Unknown Source)
|
at Script.<init>(Unknown Source)
|
||||||
|
|
||||||
Return code: 0
|
Return code: 3
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ abstract class AbstractForeignAnnotationsTest : AbstractDiagnosticsTest() {
|
|||||||
override fun createCompilerConfiguration(javaFilesDir: File?): CompilerConfiguration {
|
override fun createCompilerConfiguration(javaFilesDir: File?): CompilerConfiguration {
|
||||||
val annotationsFile = MockLibraryUtil.compileLibraryToJar(
|
val annotationsFile = MockLibraryUtil.compileLibraryToJar(
|
||||||
"compiler/testData/foreignAnnotations/annotations",
|
"compiler/testData/foreignAnnotations/annotations",
|
||||||
"foreign-annotations", /* addSources = */false)
|
"foreign-annotations", /* addSources = */false, /* allowKotlinPackage =*/ false)
|
||||||
|
|
||||||
return KotlinTestUtils.compilerConfigurationForTests(
|
return KotlinTestUtils.compilerConfigurationForTests(
|
||||||
ConfigurationKind.JDK_ONLY,
|
ConfigurationKind.JDK_ONLY,
|
||||||
|
|||||||
+1
-1
@@ -60,7 +60,7 @@ public abstract class AbstractTopLevelMembersInvocationTest extends AbstractByte
|
|||||||
|
|
||||||
File library = new File(root, LIBRARY);
|
File library = new File(root, LIBRARY);
|
||||||
List<File> classPath = library.exists() ?
|
List<File> classPath = library.exists() ?
|
||||||
Collections.singletonList(MockLibraryUtil.compileLibraryToJar(library.getPath(), LIBRARY, false)) :
|
Collections.singletonList(MockLibraryUtil.compileLibraryToJar(library.getPath(), LIBRARY, false, false)) :
|
||||||
Collections.<File>emptyList();
|
Collections.<File>emptyList();
|
||||||
|
|
||||||
assert !sourceFiles.isEmpty() : getTestName(true) + " should contain at least one .kt file";
|
assert !sourceFiles.isEmpty() : getTestName(true) + " should contain at least one .kt file";
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private File compileLibrary(@NotNull String sourcePath, @NotNull String... extraClassPath) {
|
private File compileLibrary(@NotNull String sourcePath, @NotNull String... extraClassPath) {
|
||||||
return MockLibraryUtil.compileLibraryToJar(
|
return MockLibraryUtil.compileLibraryToJar(
|
||||||
new File(getTestDataDirectory(), sourcePath).getPath(), "customKotlinLib", false, extraClassPath
|
new File(getTestDataDirectory(), sourcePath).getPath(), "customKotlinLib", false, false, extraClassPath
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,13 +53,14 @@ public class MockLibraryUtil {
|
|||||||
@NotNull String jarName,
|
@NotNull String jarName,
|
||||||
boolean addSources,
|
boolean addSources,
|
||||||
boolean isJsLibrary,
|
boolean isJsLibrary,
|
||||||
|
boolean allowKotlinPackage,
|
||||||
@NotNull String... extraClasspath
|
@NotNull String... extraClasspath
|
||||||
) {
|
) {
|
||||||
if (isJsLibrary) {
|
if (isJsLibrary) {
|
||||||
return compileJsLibraryToJar(sourcesPath, jarName, addSources);
|
return compileJsLibraryToJar(sourcesPath, jarName, addSources);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return compileLibraryToJar(sourcesPath, jarName, addSources, extraClasspath);
|
return compileLibraryToJar(sourcesPath, jarName, addSources, allowKotlinPackage, extraClasspath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,6 +69,7 @@ public class MockLibraryUtil {
|
|||||||
@NotNull String sourcesPath,
|
@NotNull String sourcesPath,
|
||||||
@NotNull String jarName,
|
@NotNull String jarName,
|
||||||
boolean addSources,
|
boolean addSources,
|
||||||
|
boolean allowKotlinPackage,
|
||||||
@NotNull String... extraClasspath
|
@NotNull String... extraClasspath
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
@@ -78,7 +80,7 @@ public class MockLibraryUtil {
|
|||||||
File srcFile = new File(sourcesPath);
|
File srcFile = new File(sourcesPath);
|
||||||
List<File> kotlinFiles = FileUtil.findFilesByMask(Pattern.compile(".*\\.kt"), srcFile);
|
List<File> kotlinFiles = FileUtil.findFilesByMask(Pattern.compile(".*\\.kt"), srcFile);
|
||||||
if (srcFile.isFile() || !kotlinFiles.isEmpty()) {
|
if (srcFile.isFile() || !kotlinFiles.isEmpty()) {
|
||||||
compileKotlin(sourcesPath, classesDir, extraClasspath);
|
compileKotlin(sourcesPath, classesDir, allowKotlinPackage, extraClasspath);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<File> javaFiles = FileUtil.findFilesByMask(Pattern.compile(".*\\.java"), srcFile);
|
List<File> javaFiles = FileUtil.findFilesByMask(Pattern.compile(".*\\.java"), srcFile);
|
||||||
@@ -170,6 +172,15 @@ public class MockLibraryUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void compileKotlin(@NotNull String sourcesPath, @NotNull File outDir, @NotNull String... extraClasspath) {
|
public static void compileKotlin(@NotNull String sourcesPath, @NotNull File outDir, @NotNull String... extraClasspath) {
|
||||||
|
compileKotlin(sourcesPath, outDir, false, extraClasspath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void compileKotlin(
|
||||||
|
@NotNull String sourcesPath,
|
||||||
|
@NotNull File outDir,
|
||||||
|
boolean allowKotlinPackage,
|
||||||
|
@NotNull String... extraClasspath
|
||||||
|
) {
|
||||||
List<String> classpath = new ArrayList<String>();
|
List<String> classpath = new ArrayList<String>();
|
||||||
if (new File(sourcesPath).isDirectory()) {
|
if (new File(sourcesPath).isDirectory()) {
|
||||||
classpath.add(sourcesPath);
|
classpath.add(sourcesPath);
|
||||||
@@ -182,6 +193,9 @@ public class MockLibraryUtil {
|
|||||||
args.add(outDir.getAbsolutePath());
|
args.add(outDir.getAbsolutePath());
|
||||||
args.add("-classpath");
|
args.add("-classpath");
|
||||||
args.add(StringUtil.join(classpath, File.pathSeparator));
|
args.add(StringUtil.join(classpath, File.pathSeparator));
|
||||||
|
if (allowKotlinPackage) {
|
||||||
|
args.add("-Xallow-kotlin-package");
|
||||||
|
}
|
||||||
|
|
||||||
runJvmCompiler(args);
|
runJvmCompiler(args);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-3
@@ -35,21 +35,23 @@ public class JdkAndMockLibraryProjectDescriptor extends KotlinLightProjectDescri
|
|||||||
private final boolean withSources;
|
private final boolean withSources;
|
||||||
private final boolean withRuntime;
|
private final boolean withRuntime;
|
||||||
private final boolean isJsLibrary;
|
private final boolean isJsLibrary;
|
||||||
|
private final boolean allowKotlinPackage;
|
||||||
|
|
||||||
public JdkAndMockLibraryProjectDescriptor(String sourcesPath, boolean withSources) {
|
public JdkAndMockLibraryProjectDescriptor(String sourcesPath, boolean withSources) {
|
||||||
this(sourcesPath, withSources, false, false);
|
this(sourcesPath, withSources, false, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JdkAndMockLibraryProjectDescriptor(String sourcesPath, boolean withSources, boolean withRuntime, boolean isJsLibrary) {
|
public JdkAndMockLibraryProjectDescriptor(String sourcesPath, boolean withSources, boolean withRuntime, boolean isJsLibrary, boolean allowKotlinPackage) {
|
||||||
this.sourcesPath = sourcesPath;
|
this.sourcesPath = sourcesPath;
|
||||||
this.withSources = withSources;
|
this.withSources = withSources;
|
||||||
this.withRuntime = withRuntime;
|
this.withRuntime = withRuntime;
|
||||||
this.isJsLibrary = isJsLibrary;
|
this.isJsLibrary = isJsLibrary;
|
||||||
|
this.allowKotlinPackage = allowKotlinPackage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model) {
|
public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model) {
|
||||||
File libraryJar = MockLibraryUtil.compileLibraryToJar(sourcesPath, LIBRARY_NAME, withSources, isJsLibrary);
|
File libraryJar = MockLibraryUtil.compileLibraryToJar(sourcesPath, LIBRARY_NAME, withSources, isJsLibrary, allowKotlinPackage);
|
||||||
String jarUrl = getJarUrl(libraryJar);
|
String jarUrl = getJarUrl(libraryJar);
|
||||||
|
|
||||||
Library.ModifiableModel libraryModel = model.getModuleLibraryTable().getModifiableModel().createLibrary(LIBRARY_NAME).getModifiableModel();
|
Library.ModifiableModel libraryModel = model.getModuleLibraryTable().getModifiableModel().createLibrary(LIBRARY_NAME).getModifiableModel();
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ abstract class AbstractJavaAgainstKotlinBinariesCheckerTest : AbstractJavaAgains
|
|||||||
val libraryName = "libFor" + testName
|
val libraryName = "libFor" + testName
|
||||||
val libraryJar = MockLibraryUtil.compileLibraryToJar(
|
val libraryJar = MockLibraryUtil.compileLibraryToJar(
|
||||||
PluginTestCaseBase.getTestDataPathBase() + "/kotlinAndJavaChecker/javaAgainstKotlin/" + getTestName(false) + ".kt",
|
PluginTestCaseBase.getTestDataPathBase() + "/kotlinAndJavaChecker/javaAgainstKotlin/" + getTestName(false) + ".kt",
|
||||||
libraryName, false, false
|
libraryName, false, false, false
|
||||||
)
|
)
|
||||||
val jarUrl = "jar://" + FileUtilRt.toSystemIndependentName(libraryJar.absolutePath) + "!/"
|
val jarUrl = "jar://" + FileUtilRt.toSystemIndependentName(libraryJar.absolutePath) + "!/"
|
||||||
ModuleRootModificationUtil.addModuleLibrary(module, jarUrl)
|
ModuleRootModificationUtil.addModuleLibrary(module, jarUrl)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ abstract class AbstractIdeCompiledLightClassTest : KotlinDaemonAnalyzerTestCase(
|
|||||||
|
|
||||||
Assert.assertTrue("File doesn't exist $filePath", File(filePath).exists())
|
Assert.assertTrue("File doesn't exist $filePath", File(filePath).exists())
|
||||||
|
|
||||||
val libraryJar = MockLibraryUtil.compileLibraryToJar(filePath, libName(), false, false)
|
val libraryJar = MockLibraryUtil.compileLibraryToJar(filePath, libName(), false, false, false)
|
||||||
val jarUrl = "jar://" + FileUtilRt.toSystemIndependentName(libraryJar.absolutePath) + "!/"
|
val jarUrl = "jar://" + FileUtilRt.toSystemIndependentName(libraryJar.absolutePath) + "!/"
|
||||||
ModuleRootModificationUtil.addModuleLibrary(module, jarUrl)
|
ModuleRootModificationUtil.addModuleLibrary(module, jarUrl)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -34,8 +34,8 @@ class HighlightingWithDependentLibrariesTest : KotlinLightCodeInsightFixtureTest
|
|||||||
|
|
||||||
override fun getProjectDescriptor() = object : KotlinLightProjectDescriptor() {
|
override fun getProjectDescriptor() = object : KotlinLightProjectDescriptor() {
|
||||||
override fun configureModule(module: Module, model: ModifiableRootModel) {
|
override fun configureModule(module: Module, model: ModifiableRootModel) {
|
||||||
val compiledJar1 = MockLibraryUtil.compileLibraryToJar("$TEST_DATA_PATH/lib1", "lib1", false)
|
val compiledJar1 = MockLibraryUtil.compileLibraryToJar("$TEST_DATA_PATH/lib1", "lib1", false, false)
|
||||||
val compiledJar2 = MockLibraryUtil.compileLibraryToJar("$TEST_DATA_PATH/lib2", "lib2", false, compiledJar1.canonicalPath)
|
val compiledJar2 = MockLibraryUtil.compileLibraryToJar("$TEST_DATA_PATH/lib2", "lib2", false, false, compiledJar1.canonicalPath)
|
||||||
|
|
||||||
model.addLibraryEntry(createLibrary(compiledJar1, "baseLibrary"))
|
model.addLibraryEntry(createLibrary(compiledJar1, "baseLibrary"))
|
||||||
model.addLibraryEntry(createLibrary(compiledJar2, "dependentLibrary"))
|
model.addLibraryEntry(createLibrary(compiledJar2, "dependentLibrary"))
|
||||||
|
|||||||
@@ -118,7 +118,8 @@ public abstract class KotlinDebuggerTestCase extends DescriptorTestCase {
|
|||||||
if (!IS_TINY_APP_COMPILED) {
|
if (!IS_TINY_APP_COMPILED) {
|
||||||
String modulePath = getTestAppPath();
|
String modulePath = getTestAppPath();
|
||||||
|
|
||||||
CUSTOM_LIBRARY_JAR = MockLibraryUtil.compileLibraryToJar(CUSTOM_LIBRARY_SOURCES.getPath(), "debuggerCustomLibrary", false);
|
CUSTOM_LIBRARY_JAR = MockLibraryUtil.compileLibraryToJar(CUSTOM_LIBRARY_SOURCES.getPath(), "debuggerCustomLibrary", false,
|
||||||
|
false);
|
||||||
|
|
||||||
String outputDir = getAppOutputPath();
|
String outputDir = getAppOutputPath();
|
||||||
String sourcesDir = modulePath + File.separator + "src";
|
String sourcesDir = modulePath + File.separator + "src";
|
||||||
|
|||||||
+1
-3
@@ -31,9 +31,7 @@ import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
|||||||
import org.jetbrains.kotlin.psi.KtClass
|
import org.jetbrains.kotlin.psi.KtClass
|
||||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||||
import org.jetbrains.kotlin.utils.sure
|
import org.jetbrains.kotlin.utils.sure
|
||||||
import kotlin.test.assertEquals
|
|
||||||
import kotlin.test.assertTrue
|
import kotlin.test.assertTrue
|
||||||
import kotlin.test.fail
|
|
||||||
|
|
||||||
class NavigateFromLibrarySourcesTest: LightCodeInsightFixtureTestCase() {
|
class NavigateFromLibrarySourcesTest: LightCodeInsightFixtureTestCase() {
|
||||||
fun testJdkClass() {
|
fun testJdkClass() {
|
||||||
@@ -73,7 +71,7 @@ class NavigateFromLibrarySourcesTest: LightCodeInsightFixtureTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun getProjectDescriptor(): LightProjectDescriptor {
|
override fun getProjectDescriptor(): LightProjectDescriptor {
|
||||||
return JdkAndMockLibraryProjectDescriptor(PluginTestCaseBase.getTestDataPathBase() + "/decompiler/navigation/fromLibSource", true, true, false)
|
return JdkAndMockLibraryProjectDescriptor(PluginTestCaseBase.getTestDataPathBase() + "/decompiler/navigation/fromLibSource", true, true, false, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkNavigationElement(element: PsiElement, expectedFqName: String) {
|
private fun checkNavigationElement(element: PsiElement, expectedFqName: String) {
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ abstract class AbstractClsStubBuilderTest : LightCodeInsightFixtureTestCase() {
|
|||||||
|
|
||||||
private fun getClassFileToDecompile(sourcePath: String): VirtualFile {
|
private fun getClassFileToDecompile(sourcePath: String): VirtualFile {
|
||||||
val outDir = KotlinTestUtils.tmpDir("libForStubTest-" + sourcePath)
|
val outDir = KotlinTestUtils.tmpDir("libForStubTest-" + sourcePath)
|
||||||
MockLibraryUtil.compileKotlin(sourcePath, outDir)
|
MockLibraryUtil.compileKotlin(sourcePath, outDir, true)
|
||||||
val root = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(outDir)!!
|
val root = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(outDir)!!
|
||||||
return root.findClassFileByName(lastSegment(sourcePath))
|
return root.findClassFileByName(lastSegment(sourcePath))
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -32,7 +32,8 @@ import java.io.File
|
|||||||
|
|
||||||
abstract class AbstractDecompiledTextBaseTest(
|
abstract class AbstractDecompiledTextBaseTest(
|
||||||
baseDirectory: String,
|
baseDirectory: String,
|
||||||
private val isJsLibrary: Boolean = false
|
private val isJsLibrary: Boolean = false,
|
||||||
|
private val allowKotlinPackage: Boolean = false
|
||||||
) : KotlinLightCodeInsightFixtureTestCase() {
|
) : KotlinLightCodeInsightFixtureTestCase() {
|
||||||
protected val TEST_DATA_PATH: String = PluginTestCaseBase.getTestDataPathBase() + baseDirectory
|
protected val TEST_DATA_PATH: String = PluginTestCaseBase.getTestDataPathBase() + baseDirectory
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ abstract class AbstractDecompiledTextBaseTest(
|
|||||||
if (isAllFilesPresentInTest()) {
|
if (isAllFilesPresentInTest()) {
|
||||||
return KotlinLightProjectDescriptor.INSTANCE
|
return KotlinLightProjectDescriptor.INSTANCE
|
||||||
}
|
}
|
||||||
return JdkAndMockLibraryProjectDescriptor(TEST_DATA_PATH + "/" + getTestName(false), false, false, isJsLibrary)
|
return JdkAndMockLibraryProjectDescriptor(TEST_DATA_PATH + "/" + getTestName(false), false, false, isJsLibrary, allowKotlinPackage)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkThatFileWasParsedCorrectly(clsFile: PsiFile) {
|
private fun checkThatFileWasParsedCorrectly(clsFile: PsiFile) {
|
||||||
|
|||||||
+4
-3
@@ -22,7 +22,8 @@ import org.jetbrains.kotlin.idea.decompiler.classFile.KtClsFile
|
|||||||
import org.jetbrains.kotlin.idea.decompiler.navigation.NavigateToDecompiledLibraryTest
|
import org.jetbrains.kotlin.idea.decompiler.navigation.NavigateToDecompiledLibraryTest
|
||||||
import kotlin.test.assertTrue
|
import kotlin.test.assertTrue
|
||||||
|
|
||||||
abstract class AbstractDecompiledTextTest(baseDirectory: String) : AbstractDecompiledTextBaseTest(baseDirectory) {
|
abstract class AbstractDecompiledTextTest(baseDirectory: String, allowKotlinPackage: Boolean)
|
||||||
|
: AbstractDecompiledTextBaseTest(baseDirectory, allowKotlinPackage = allowKotlinPackage) {
|
||||||
override fun getFileToDecompile(): VirtualFile =
|
override fun getFileToDecompile(): VirtualFile =
|
||||||
NavigateToDecompiledLibraryTest.getClassFile(TEST_PACKAGE, getTestName(false), myModule!!)
|
NavigateToDecompiledLibraryTest.getClassFile(TEST_PACKAGE, getTestName(false), myModule!!)
|
||||||
|
|
||||||
@@ -30,6 +31,6 @@ abstract class AbstractDecompiledTextTest(baseDirectory: String) : AbstractDecom
|
|||||||
assertTrue(psiFile is KtClsFile, "Expecting decompiled kotlin file, was: " + psiFile.javaClass)
|
assertTrue(psiFile is KtClsFile, "Expecting decompiled kotlin file, was: " + psiFile.javaClass)
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AbstractCommonDecompiledTextTest : AbstractDecompiledTextTest("/decompiler/decompiledText")
|
abstract class AbstractCommonDecompiledTextTest : AbstractDecompiledTextTest("/decompiler/decompiledText", true)
|
||||||
|
|
||||||
abstract class AbstractJvmDecompiledTextTest : AbstractDecompiledTextTest("/decompiler/decompiledTextJvm")
|
abstract class AbstractJvmDecompiledTextTest : AbstractDecompiledTextTest("/decompiler/decompiledTextJvm", false)
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ abstract class AbstractKotlinExceptionFilterTest: KotlinCodeInsightTestCase() {
|
|||||||
val classLoader: URLClassLoader
|
val classLoader: URLClassLoader
|
||||||
if (InTextDirectivesUtils.getPrefixedBoolean(fileText, "// WITH_MOCK_LIBRARY: ") ?: false) {
|
if (InTextDirectivesUtils.getPrefixedBoolean(fileText, "// WITH_MOCK_LIBRARY: ") ?: false) {
|
||||||
if (MOCK_LIBRARY_JAR == null) {
|
if (MOCK_LIBRARY_JAR == null) {
|
||||||
MOCK_LIBRARY_JAR = MockLibraryUtil.compileLibraryToJar(MOCK_LIBRARY_SOURCES, "mockLibrary", true)
|
MOCK_LIBRARY_JAR = MockLibraryUtil.compileLibraryToJar(MOCK_LIBRARY_SOURCES, "mockLibrary", true, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
val mockLibraryJar = MOCK_LIBRARY_JAR ?: throw AssertionError("Mock library JAR is null")
|
val mockLibraryJar = MOCK_LIBRARY_JAR ?: throw AssertionError("Mock library JAR is null")
|
||||||
|
|||||||
+1
-1
@@ -28,6 +28,6 @@ public abstract class AbstractReferenceResolveWithLibTest extends AbstractRefere
|
|||||||
if (PluginTestCaseBase.isAllFilesPresentTest(getTestName(true))) {
|
if (PluginTestCaseBase.isAllFilesPresentTest(getTestName(true))) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new JdkAndMockLibraryProjectDescriptor(TEST_DATA_PATH + "/" + getTestName(true) + "Src", false, true, false);
|
return new JdkAndMockLibraryProjectDescriptor(TEST_DATA_PATH + "/" + getTestName(true) + "Src", false, true, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
|
|||||||
fun testCircularDependencyWithReferenceToOldVersionLib() {
|
fun testCircularDependencyWithReferenceToOldVersionLib() {
|
||||||
initProject()
|
initProject()
|
||||||
|
|
||||||
val libraryJar = MockLibraryUtil.compileLibraryToJar(workDir.absolutePath + File.separator + "oldModuleLib/src", "module-lib", false)
|
val libraryJar = MockLibraryUtil.compileLibraryToJar(workDir.absolutePath + File.separator + "oldModuleLib/src", "module-lib", false, false)
|
||||||
|
|
||||||
AbstractKotlinJpsBuildTestCase.addDependency(JpsJavaDependencyScope.COMPILE, Lists.newArrayList(findModule("module1"), findModule("module2")), false, "module-lib", libraryJar)
|
AbstractKotlinJpsBuildTestCase.addDependency(JpsJavaDependencyScope.COMPILE, Lists.newArrayList(findModule("module1"), findModule("module2")), false, "module-lib", libraryJar)
|
||||||
|
|
||||||
@@ -562,7 +562,7 @@ class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
|
|||||||
fun testDependencyToOldKotlinLib() {
|
fun testDependencyToOldKotlinLib() {
|
||||||
initProject()
|
initProject()
|
||||||
|
|
||||||
val libraryJar = MockLibraryUtil.compileLibraryToJar(workDir.absolutePath + File.separator + "oldModuleLib/src", "module-lib", false)
|
val libraryJar = MockLibraryUtil.compileLibraryToJar(workDir.absolutePath + File.separator + "oldModuleLib/src", "module-lib", false, false)
|
||||||
|
|
||||||
AbstractKotlinJpsBuildTestCase.addDependency(JpsJavaDependencyScope.COMPILE, Lists.newArrayList(findModule("module")), false, "module-lib", libraryJar)
|
AbstractKotlinJpsBuildTestCase.addDependency(JpsJavaDependencyScope.COMPILE, Lists.newArrayList(findModule("module")), false, "module-lib", libraryJar)
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package java;
|
|||||||
|
|
||||||
public class JFirst {
|
public class JFirst {
|
||||||
public void foo() {
|
public void foo() {
|
||||||
new kotlin.KFirst().foo();
|
new myproject.kotlin.KFirst().foo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package kotlin
|
package myproject.kotlin
|
||||||
|
|
||||||
class KFirst() {
|
class KFirst() {
|
||||||
fun foo() {
|
fun foo() {
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package java;
|
|||||||
|
|
||||||
public class JFirst {
|
public class JFirst {
|
||||||
public void foo() {
|
public void foo() {
|
||||||
new kotlin.KFirst().foo();
|
new myproject.kotlin.KFirst().foo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void bar() {
|
public void bar() {
|
||||||
new kotlin.KFirst().bar();
|
new myproject.kotlin.KFirst().bar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package kotlin
|
package myproject.kotlin
|
||||||
|
|
||||||
class KFirst() {
|
class KFirst() {
|
||||||
fun foo() {
|
fun foo() {
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package java;
|
|||||||
|
|
||||||
public class JFirst {
|
public class JFirst {
|
||||||
public void foo() {
|
public void foo() {
|
||||||
new kotlin.KSecond().foo();
|
new myproject.kotlin.KSecond().foo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package kotlin
|
package myproject.kotlin
|
||||||
|
|
||||||
class KFirst() {
|
class KFirst() {
|
||||||
fun foo() {
|
fun foo() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package kotlin
|
package myproject.kotlin
|
||||||
|
|
||||||
class KSecond() {
|
class KSecond() {
|
||||||
fun foo() {
|
fun foo() {
|
||||||
|
|||||||
Reference in New Issue
Block a user