IC: take into account added and removed classes when calculate affected names

This commit is contained in:
Zalim Bashorov
2016-03-24 20:59:30 +03:00
parent 1b2deb8a8a
commit 51c6abdbed
142 changed files with 1692 additions and 30 deletions
@@ -65,12 +65,12 @@ abstract class AbstractIncrementalJpsTest(
private val allowNoBuildLogFileInTestData: Boolean = false
) : JpsBuildTestCase() {
companion object {
val COMPILATION_FAILED = "COMPILATION FAILED"
private val COMPILATION_FAILED = "COMPILATION FAILED"
// change to "/tmp" or anything when default is too long (for easier debugging)
val TEMP_DIRECTORY_TO_USE = File(FileUtilRt.getTempDirectory())
private val TEMP_DIRECTORY_TO_USE = File(FileUtilRt.getTempDirectory())
val DEBUG_LOGGING_ENABLED = System.getProperty("debug.logging.enabled") == "true"
private val DEBUG_LOGGING_ENABLED = System.getProperty("debug.logging.enabled") == "true"
}
protected open val enableExperimentalIncrementalCompilation = false
@@ -61,12 +61,30 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
doTest(fileName);
}
@TestMetadata("classAdded")
public void testClassAdded() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/classAdded/");
doTest(fileName);
}
@TestMetadata("classRemoved")
public void testClassRemoved() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/classRemoved/");
doTest(fileName);
}
@TestMetadata("constantValueChanged")
public void testConstantValueChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/constantValueChanged/");
doTest(fileName);
}
@TestMetadata("copyFileToAnotherModule")
public void testCopyFileToAnotherModule() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/copyFileToAnotherModule/");
doTest(fileName);
}
@TestMetadata("defaultParameterAdded")
public void testDefaultParameterAdded() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/defaultParameterAdded/");
@@ -175,6 +193,18 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
doTest(fileName);
}
@TestMetadata("addClass")
public void testAddClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addClass/");
doTest(fileName);
}
@TestMetadata("addFileWithFunctionOverload")
public void testAddFileWithFunctionOverload() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addFileWithFunctionOverload/");
doTest(fileName);
}
@TestMetadata("allConstants")
public void testAllConstants() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/allConstants/");
@@ -743,6 +773,48 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
doTest(fileName);
}
@TestMetadata("removeAndRestoreCompanion")
public void testRemoveAndRestoreCompanion() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanion/");
doTest(fileName);
}
@TestMetadata("removeAndRestoreCompanionWithImplicitUsages")
public void testRemoveAndRestoreCompanionWithImplicitUsages() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanionWithImplicitUsages/");
doTest(fileName);
}
@TestMetadata("removeClass")
public void testRemoveClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeClass/");
doTest(fileName);
}
@TestMetadata("removeClassInDefaultPackage")
public void testRemoveClassInDefaultPackage() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeClassInDefaultPackage/");
doTest(fileName);
}
@TestMetadata("removeFileWithFunctionOverload")
public void testRemoveFileWithFunctionOverload() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeFileWithFunctionOverload/");
doTest(fileName);
}
@TestMetadata("renameClass")
public void testRenameClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/renameClass/");
doTest(fileName);
}
@TestMetadata("renameFileWithFunctionOverload")
public void testRenameFileWithFunctionOverload() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/renameFileWithFunctionOverload/");
doTest(fileName);
}
@TestMetadata("returnTypeChanged")
public void testReturnTypeChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/returnTypeChanged/");
@@ -1164,6 +1236,18 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
doTest(fileName);
}
@TestMetadata("classRemoved")
public void testClassRemoved() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classRemoved/");
doTest(fileName);
}
@TestMetadata("classRemovedAndRestored")
public void testClassRemovedAndRestored() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classRemovedAndRestored/");
doTest(fileName);
}
@TestMetadata("classToPackageFacade")
public void testClassToPackageFacade() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classToPackageFacade/");
@@ -61,12 +61,30 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
doTest(fileName);
}
@TestMetadata("classAdded")
public void testClassAdded() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/classAdded/");
doTest(fileName);
}
@TestMetadata("classRemoved")
public void testClassRemoved() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/classRemoved/");
doTest(fileName);
}
@TestMetadata("constantValueChanged")
public void testConstantValueChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/constantValueChanged/");
doTest(fileName);
}
@TestMetadata("copyFileToAnotherModule")
public void testCopyFileToAnotherModule() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/copyFileToAnotherModule/");
doTest(fileName);
}
@TestMetadata("defaultParameterAdded")
public void testDefaultParameterAdded() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/defaultParameterAdded/");
@@ -175,6 +193,18 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
doTest(fileName);
}
@TestMetadata("addClass")
public void testAddClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addClass/");
doTest(fileName);
}
@TestMetadata("addFileWithFunctionOverload")
public void testAddFileWithFunctionOverload() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addFileWithFunctionOverload/");
doTest(fileName);
}
@TestMetadata("allConstants")
public void testAllConstants() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/allConstants/");
@@ -743,6 +773,48 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
doTest(fileName);
}
@TestMetadata("removeAndRestoreCompanion")
public void testRemoveAndRestoreCompanion() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanion/");
doTest(fileName);
}
@TestMetadata("removeAndRestoreCompanionWithImplicitUsages")
public void testRemoveAndRestoreCompanionWithImplicitUsages() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanionWithImplicitUsages/");
doTest(fileName);
}
@TestMetadata("removeClass")
public void testRemoveClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeClass/");
doTest(fileName);
}
@TestMetadata("removeClassInDefaultPackage")
public void testRemoveClassInDefaultPackage() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeClassInDefaultPackage/");
doTest(fileName);
}
@TestMetadata("removeFileWithFunctionOverload")
public void testRemoveFileWithFunctionOverload() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeFileWithFunctionOverload/");
doTest(fileName);
}
@TestMetadata("renameClass")
public void testRenameClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/renameClass/");
doTest(fileName);
}
@TestMetadata("renameFileWithFunctionOverload")
public void testRenameFileWithFunctionOverload() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/renameFileWithFunctionOverload/");
doTest(fileName);
}
@TestMetadata("returnTypeChanged")
public void testReturnTypeChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/returnTypeChanged/");