Delete three diagnostic tests which rendered parts of JRE

- PackageLocalClassNotImportedWithDefaultImport.kt goes to codegen multi-file
  tests. File in java.lang moved to kotlin.jvm, which seems irrelevant to the
  test, because java.lang is prohibited by the VM
- MergePackagesWithJava.kt (KT-689, Java and Kotlin in the same package) and
  kt955.kt (Unable to import from default package) are considered too obsolete
  to even test and are thus deleted

Also check that there's no more than 1000 lines in the .txt file in diagnostic
tests.
This commit is contained in:
Alexander Udalov
2015-04-10 19:16:27 +03:00
parent 94df191f86
commit 92fa107471
12 changed files with 29 additions and 48238 deletions
@@ -20,6 +20,7 @@ import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Sets;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.PsiElement;
import kotlin.Function1;
import kotlin.KotlinPackage;
@@ -261,6 +262,12 @@ public abstract class AbstractJetDiagnosticsTest extends BaseDiagnosticsTest {
}
}
int lineCount = StringUtil.getLineBreakCount(rootPackageText);
assert lineCount < 1000 :
"Rendered descriptors of this test take up " + lineCount + " lines. " +
"Please ensure you don't render JRE contents to the .txt file. " +
"Such tests are hard to maintain, take long time to execute and are subject to sudden unreviewed changes anyway.";
JetTestUtils.assertEqualsToFile(expectedFile, rootPackageText.toString());
}
@@ -295,12 +295,6 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("MergePackagesWithJava.kt")
public void testMergePackagesWithJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/MergePackagesWithJava.kt");
doTest(fileName);
}
@TestMetadata("MultilineStringTemplates.kt")
public void testMultilineStringTemplates() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/MultilineStringTemplates.kt");
@@ -5280,12 +5274,6 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("PackageLocalClassNotImportedWithDefaultImport.kt")
public void testPackageLocalClassNotImportedWithDefaultImport() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PackageLocalClassNotImportedWithDefaultImport.kt");
doTest(fileName);
}
@TestMetadata("PackageLocalClassReferencedError.kt")
public void testPackageLocalClassReferencedError() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PackageLocalClassReferencedError.kt");
@@ -10380,12 +10368,6 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("kt955.kt")
public void testKt955() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt955.kt");
doTest(fileName);
}
@TestMetadata("NoAmbiguityBetweenRootAndPackage.kt")
public void testNoAmbiguityBetweenRootAndPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/NoAmbiguityBetweenRootAndPackage.kt");
@@ -83,6 +83,12 @@ public class BlackBoxMultiFileCodegenTestGenerated extends AbstractBlackBoxCodeg
doTestMultiFile(fileName);
}
@TestMetadata("packageLocalClassNotImportedWithDefaultImport")
public void testPackageLocalClassNotImportedWithDefaultImport() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/packageLocalClassNotImportedWithDefaultImport/");
doTestMultiFile(fileName);
}
@TestMetadata("samWrappersDifferentFiles")
public void testSamWrappersDifferentFiles() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/samWrappersDifferentFiles/");