Remove KotlinSignature from tests, spec, delete tests with errors

This commit is contained in:
Alexander Udalov
2015-11-13 18:36:48 +03:00
parent 9cdeac7839
commit d472154ea7
153 changed files with 30 additions and 1876 deletions
@@ -746,27 +746,6 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/kotlinSignature")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class KotlinSignature extends AbstractDiagnosticsTestWithStdLib {
public void testAllFilesPresentInKotlinSignature() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/kotlinSignature"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("constructorNamedArguments.kt")
public void testConstructorNamedArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/kotlinSignature/constructorNamedArguments.kt");
doTest(fileName);
}
@TestMetadata("parameterNames.kt")
public void testParameterNames() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/kotlinSignature/parameterNames.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/kt7585")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -253,12 +253,6 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
doJvmTest(fileName);
}
@TestMetadata("wrongKotlinSignature.args")
public void testWrongKotlinSignature() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongKotlinSignature.args");
doJvmTest(fileName);
}
@TestMetadata("wrongScriptWithNoSource.args")
public void testWrongScriptWithNoSource() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongScriptWithNoSource.args");
@@ -16,8 +16,6 @@
package org.jetbrains.kotlin.cli.jvm;
import org.jetbrains.kotlin.load.kotlin.PackageClassUtils;
import org.jetbrains.kotlin.name.FqName;
import org.jetbrains.kotlin.cli.CliBaseTest;
import org.junit.Assert;
import org.junit.Test;
@@ -25,11 +23,6 @@ import org.junit.Test;
import java.io.File;
public class K2JvmCliTest extends CliBaseTest {
@Test
public void wrongKotlinSignature() throws Exception {
executeCompilerCompareOutputJVM();
}
@Test
public void wrongAbiVersion() throws Exception {
executeCompilerCompareOutputJVM();
@@ -1,165 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.jvm.compiler;
import com.google.common.collect.Maps;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.util.Disposer;
import com.intellij.testFramework.UsefulTestCase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.cli.jvm.compiler.CliLightClassGenerationSupport;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.descriptors.*;
import org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorVisitorEmptyBodies;
import org.jetbrains.kotlin.incremental.components.NoLookupLocation;
import org.jetbrains.kotlin.load.java.JavaBindingContext;
import org.jetbrains.kotlin.name.FqName;
import org.jetbrains.kotlin.platform.JavaToKotlinClassMap;
import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.renderer.DescriptorRenderer;
import org.jetbrains.kotlin.resolve.BindingContext;
import org.jetbrains.kotlin.resolve.BindingTrace;
import org.jetbrains.kotlin.resolve.DescriptorUtils;
import org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt;
import org.jetbrains.kotlin.resolve.jvm.kotlinSignature.TypeTransformingVisitor;
import org.jetbrains.kotlin.resolve.lazy.LazyResolveTestUtil;
import org.jetbrains.kotlin.resolve.scopes.MemberScope;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Map;
public abstract class AbstractSdkAnnotationsValidityTest extends UsefulTestCase {
private static final int CLASSES_IN_CHUNK = 100;
protected abstract KotlinCoreEnvironment createEnvironment(Disposable parentDisposable);
protected abstract List<FqName> getClassesToValidate() throws IOException;
@Override
protected void setUp() throws Exception {
super.setUp();
TypeTransformingVisitor.setStrictMode(true);
}
@Override
protected void tearDown() throws Exception {
TypeTransformingVisitor.setStrictMode(false);
super.tearDown();
}
public void testNoErrorsInAlternativeSignatures() throws IOException {
List<FqName> affectedClasses = getClassesToValidate();
Map<String, List<String>> errors = Maps.newLinkedHashMap();
for (int chunkIndex = 0; chunkIndex < affectedClasses.size() / CLASSES_IN_CHUNK + 1; chunkIndex++) {
Disposable parentDisposable = Disposer.newDisposable();
try {
KotlinCoreEnvironment commonEnvironment = createEnvironment(parentDisposable);
BindingTrace trace = new CliLightClassGenerationSupport.NoScopeRecordCliBindingTrace();
ModuleDescriptor module = LazyResolveTestUtil.resolve(
commonEnvironment.getProject(), trace, Collections.<KtFile>emptyList(), commonEnvironment
);
AlternativeSignatureErrorFindingVisitor visitor =
new AlternativeSignatureErrorFindingVisitor(trace.getBindingContext(), errors);
int chunkStart = chunkIndex * CLASSES_IN_CHUNK;
for (FqName javaClass : affectedClasses.subList(chunkStart, Math.min(chunkStart + CLASSES_IN_CHUNK, affectedClasses.size()))) {
ClassDescriptor topLevelClass = DescriptorUtilsKt.resolveTopLevelClass(module, javaClass, NoLookupLocation.FROM_TEST);
PackageViewDescriptor topLevelPackage = module.getPackage(javaClass);
if (topLevelClass == null) {
continue;
}
topLevelClass.acceptVoid(visitor);
if (!topLevelPackage.isEmpty()) {
topLevelPackage.acceptVoid(visitor);
}
}
}
finally {
Disposer.dispose(parentDisposable);
}
}
if (!errors.isEmpty()) {
StringBuilder sb = new StringBuilder("Error(s) in SDK alternative signatures: \n");
for (Map.Entry<String, List<String>> entry : errors.entrySet()) {
sb.append(entry.getKey()).append(" : ").append(entry.getValue()).append("\n");
}
fail(sb.toString());
}
}
private static class AlternativeSignatureErrorFindingVisitor extends DeclarationDescriptorVisitorEmptyBodies<Void, Void> {
private final BindingContext bindingContext;
private final Map<String, List<String>> errors;
public AlternativeSignatureErrorFindingVisitor(BindingContext bindingContext, Map<String, List<String>> errors) {
this.bindingContext = bindingContext;
this.errors = errors;
}
@Override
public Void visitPackageViewDescriptor(PackageViewDescriptor descriptor, Void data) {
return visitDeclarationRecursively(descriptor, descriptor.getMemberScope());
}
@Override
public Void visitClassDescriptor(ClassDescriptor descriptor, Void data) {
// skip java.util.Collection, etc.
if (!JavaToKotlinClassMap.INSTANCE.mapPlatformClass(DescriptorUtils.getFqNameSafe(descriptor)).isEmpty()) {
return null;
}
return visitDeclarationRecursively(descriptor, descriptor.getDefaultType().getMemberScope());
}
@Override
public Void visitFunctionDescriptor(FunctionDescriptor descriptor, Void data) {
return visitDeclaration(descriptor);
}
@Override
public Void visitPropertyDescriptor(PropertyDescriptor descriptor, Void data) {
return visitDeclaration(descriptor);
}
private Void visitDeclaration(@NotNull DeclarationDescriptor descriptor) {
List<String> errors = bindingContext.get(JavaBindingContext.LOAD_FROM_JAVA_SIGNATURE_ERRORS, descriptor);
if (errors != null) {
this.errors.put(DescriptorRenderer.FQ_NAMES_IN_TYPES.render(descriptor), errors);
}
return null;
}
private Void visitDeclarationRecursively(@NotNull DeclarationDescriptor descriptor, @NotNull MemberScope memberScope) {
for (DeclarationDescriptor member : DescriptorUtils.getAllDescriptors(memberScope)) {
member.acceptVoid(this);
}
return visitDeclaration(descriptor);
}
}
}
@@ -1,67 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.jvm.compiler;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.intellij.openapi.Disposable;
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.name.FqName;
import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind;
import java.io.IOException;
import java.util.Enumeration;
import java.util.List;
import java.util.Set;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
public class AndroidSdkAnnotationsValidityTest extends AbstractSdkAnnotationsValidityTest {
@Override
protected KotlinCoreEnvironment createEnvironment(Disposable parentDisposable) {
CompilerConfiguration configuration = KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.JDK_ONLY, TestJdkKind.ANDROID_API, KotlinTestUtils.getAnnotationsJar()
);
return KotlinCoreEnvironment.createForTests(parentDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES);
}
@Override
protected List<FqName> getClassesToValidate() throws IOException {
JarFile jar = new JarFile(KotlinTestUtils.findAndroidApiJar());
try {
Enumeration<JarEntry> entries = jar.entries();
Set<FqName> result = Sets.newLinkedHashSet();
while (entries.hasMoreElements()){
JarEntry entry = entries.nextElement();
String entryName = entry.getName();
if (!entry.isDirectory() && entryName.endsWith(".class")) {
String className = entryName.substring(0, entryName.length() - ".class".length()).replace("/", ".").replace("$", ".");
result.add(new FqName(className));
}
}
return Lists.newArrayList(result);
} finally {
jar.close();
}
}
}
@@ -1,126 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.jvm.compiler;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.intellij.codeInsight.ExternalAnnotationsManager;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.io.StreamUtil;
import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileManager;
import com.intellij.openapi.vfs.VirtualFileVisitor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.name.FqName;
import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class JdkAnnotationsValidityTest extends AbstractSdkAnnotationsValidityTest {
// KT-4359 Alternative signature checking problem: Set<?> is incompatible with Set<Object>
//
// <item name='javax.management.openmbean.TabularDataSupport java.util.Set&lt;java.lang.Object&gt; keySet()'>
// <annotation name='org.jetbrains.annotations.NotNull'/>
// </item>
// <item name='java.util.Map java.util.Set&lt;K&gt; keySet()'>
// <annotation name='org.jetbrains.annotations.NotNull'/>
// <annotation name='jet.runtime.typeinfo.KotlinSignature'>
// <val name="value" val="&quot;fun keySet() : Set&lt;K&gt;&quot;"/>
// </annotation>
// </item>
// <item name='javax.management.openmbean.TabularData java.util.Set&lt;?&gt; keySet()'>
// <annotation name='org.jetbrains.annotations.NotNull'/>
// </item>
//
// KAnnotator produces above annotations and validation of TabularDataSupport results into:
// public open fun keySet(): kotlin.MutableSet<kotlin.Any> defined in javax.management.openmbean.TabularDataSupport :
// [Incompatible types in superclasses: [Any?, Any, Any], Incompatible projection kinds in type arguments of super methods' return types: [out Any?, Any, Any]]
private static final Set<String> classesToIgnore = new HashSet<String>(Arrays.asList("javax.management.openmbean.TabularDataSupport"));
private static KotlinCoreEnvironment createFullJdkEnvironment(Disposable parentDisposable) {
CompilerConfiguration configuration = KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.JDK_ONLY, TestJdkKind.FULL_JDK, KotlinTestUtils.getAnnotationsJar()
);
// TODO: move this test to idea-tests and re-implement it for ExternalAnnotationsManagerImpl
// configuration.add(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY, new File("ideaSDK/lib/jdkAnnotations.jar"));
return KotlinCoreEnvironment.createForTests(parentDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES);
}
@Override
protected KotlinCoreEnvironment createEnvironment(Disposable parentDisposable) {
return createFullJdkEnvironment(parentDisposable);
}
@Override
protected List<FqName> getClassesToValidate() throws IOException {
return getAffectedClasses("jar://dist/kotlinc/lib/kotlin-jdk-annotations.jar!/");
}
static List<FqName> getAffectedClasses(String rootUrl) {
Disposable myDisposable = Disposer.newDisposable();
try {
createFullJdkEnvironment(myDisposable);
VirtualFile root = VirtualFileManager.getInstance().findFileByUrl(rootUrl);
assert root != null;
final Set<FqName> result = Sets.newLinkedHashSet();
VfsUtilCore.visitChildrenRecursively(root, new VirtualFileVisitor() {
@Override
public boolean visitFile(@NotNull VirtualFile file) {
if (ExternalAnnotationsManager.ANNOTATIONS_XML.equals(file.getName())) {
try {
String text = StreamUtil.readText(file.getInputStream());
Matcher matcher = Pattern.compile("<item name=['\"]([\\w\\d\\.]+)[\\s'\"]").matcher(text);
while (matcher.find()) {
String className = matcher.group(1);
if (!classesToIgnore.contains(className)) {
result.add(new FqName(className));
}
}
}
catch (IOException e) {
throw new RuntimeException(e);
}
}
return true;
}
});
return Lists.newArrayList(result);
}
finally {
Disposer.dispose(myDisposable);
}
}
}
@@ -685,106 +685,10 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Error extends AbstractLoadJavaTest {
@TestMetadata("AddingNullability.java")
public void testAddingNullability() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/AddingNullability.java");
doTestCompiledJava(fileName);
}
public void testAllFilesPresentInError() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/error"), Pattern.compile("^(.+)\\.java$"), true);
}
@TestMetadata("ConflictingProjectionKind.java")
public void testConflictingProjectionKind() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ConflictingProjectionKind.java");
doTestCompiledJava(fileName);
}
@TestMetadata("ExplicitFieldGettersAndSetters.java")
public void testExplicitFieldGettersAndSetters() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.java");
doTestCompiledJava(fileName);
}
@TestMetadata("ExtraUpperBound.java")
public void testExtraUpperBound() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExtraUpperBound.java");
doTestCompiledJava(fileName);
}
@TestMetadata("MissingUpperBound.java")
public void testMissingUpperBound() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/MissingUpperBound.java");
doTestCompiledJava(fileName);
}
@TestMetadata("NoFieldTypeRef.java")
public void testNoFieldTypeRef() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/NoFieldTypeRef.java");
doTestCompiledJava(fileName);
}
@TestMetadata("NotVarargReplacedWithVararg.java")
public void testNotVarargReplacedWithVararg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/NotVarargReplacedWithVararg.java");
doTestCompiledJava(fileName);
}
@TestMetadata("RedundantProjectionKind.java")
public void testRedundantProjectionKind() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/RedundantProjectionKind.java");
doTestCompiledJava(fileName);
}
@TestMetadata("ReturnTypeMissing.java")
public void testReturnTypeMissing() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ReturnTypeMissing.java");
doTestCompiledJava(fileName);
}
@TestMetadata("SyntaxError.java")
public void testSyntaxError() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxError.java");
doTestCompiledJava(fileName);
}
@TestMetadata("SyntaxErrorInFieldAnnotation.java")
public void testSyntaxErrorInFieldAnnotation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.java");
doTestCompiledJava(fileName);
}
@TestMetadata("VarargReplacedWithNotVararg.java")
public void testVarargReplacedWithNotVararg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/VarargReplacedWithNotVararg.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongFieldInitializer.java")
public void testWrongFieldInitializer() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldInitializer.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongFieldMutability.java")
public void testWrongFieldMutability() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldMutability.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongFieldName.java")
public void testWrongFieldName() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldName.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongMethodName.java")
public void testWrongMethodName() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongMethodName.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongProjectionKind.java")
public void testWrongProjectionKind() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java");
@@ -797,59 +701,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
doTestCompiledJava(fileName);
}
@TestMetadata("WrongTypeName1.java")
public void testWrongTypeName1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName1.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongTypeName2.java")
public void testWrongTypeName2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName2.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongTypeName3.java")
public void testWrongTypeName3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName3.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongTypeParameterBoundStructure1.java")
public void testWrongTypeParameterBoundStructure1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongTypeParameterBoundStructure2.java")
public void testWrongTypeParameterBoundStructure2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongTypeParametersCount.java")
public void testWrongTypeParametersCount() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongValueParameterStructure1.java")
public void testWrongValueParameterStructure1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongValueParameterStructure2.java")
public void testWrongValueParameterStructure2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure2.java");
doTestCompiledJava(fileName);
}
@TestMetadata("WrongValueParametersCount.java")
public void testWrongValueParametersCount() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParametersCount.java");
doTestCompiledJava(fileName);
}
}
@TestMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation")
@@ -880,12 +742,6 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
doTestCompiledJava(fileName);
}
@TestMetadata("ChangeProjectionKind2.java")
public void testChangeProjectionKind2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.java");
doTestCompiledJava(fileName);
}
@TestMetadata("DeeplySubstitutedClassParameter.java")
public void testDeeplySubstitutedClassParameter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.java");
@@ -898,12 +754,6 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
doTestCompiledJava(fileName);
}
@TestMetadata("InheritMutability.java")
public void testInheritMutability() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritMutability.java");
doTestCompiledJava(fileName);
}
@TestMetadata("InheritNotVararg.java")
public void testInheritNotVararg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVararg.java");
@@ -934,18 +784,6 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
doTestCompiledJava(fileName);
}
@TestMetadata("InheritProjectionKind.java")
public void testInheritProjectionKind() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritProjectionKind.java");
doTestCompiledJava(fileName);
}
@TestMetadata("InheritReadOnliness.java")
public void testInheritReadOnliness() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritReadOnliness.java");
doTestCompiledJava(fileName);
}
@TestMetadata("InheritVararg.java")
public void testInheritVararg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVararg.java");
@@ -1252,24 +1090,12 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.java$"), true);
}
@TestMetadata("InheritMutability.java")
public void testInheritMutability() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/InheritMutability.java");
doTestCompiledJava(fileName);
}
@TestMetadata("InheritNullability.java")
public void testInheritNullability() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/InheritNullability.java");
doTestCompiledJava(fileName);
}
@TestMetadata("InheritReadOnliness.java")
public void testInheritReadOnliness() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.java");
doTestCompiledJava(fileName);
}
@TestMetadata("TwoBounds.java")
public void testTwoBounds() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoBounds.java");
@@ -1796,12 +1622,6 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java");
doTestCompiledJava(fileName);
}
@TestMetadata("TwoSuperclassesVarargAndNot.java")
public void testTwoSuperclassesVarargAndNot() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.java");
doTestCompiledJava(fileName);
}
}
@TestMetadata("compiler/testData/loadJava/compiledJava/static")
@@ -3745,106 +3745,10 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Error extends AbstractJvmRuntimeDescriptorLoaderTest {
@TestMetadata("AddingNullability.java")
public void testAddingNullability() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/AddingNullability.java");
doTest(fileName);
}
public void testAllFilesPresentInError() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/error"), Pattern.compile("^(.+)\\.java$"), true);
}
@TestMetadata("ConflictingProjectionKind.java")
public void testConflictingProjectionKind() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ConflictingProjectionKind.java");
doTest(fileName);
}
@TestMetadata("ExplicitFieldGettersAndSetters.java")
public void testExplicitFieldGettersAndSetters() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.java");
doTest(fileName);
}
@TestMetadata("ExtraUpperBound.java")
public void testExtraUpperBound() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExtraUpperBound.java");
doTest(fileName);
}
@TestMetadata("MissingUpperBound.java")
public void testMissingUpperBound() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/MissingUpperBound.java");
doTest(fileName);
}
@TestMetadata("NoFieldTypeRef.java")
public void testNoFieldTypeRef() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/NoFieldTypeRef.java");
doTest(fileName);
}
@TestMetadata("NotVarargReplacedWithVararg.java")
public void testNotVarargReplacedWithVararg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/NotVarargReplacedWithVararg.java");
doTest(fileName);
}
@TestMetadata("RedundantProjectionKind.java")
public void testRedundantProjectionKind() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/RedundantProjectionKind.java");
doTest(fileName);
}
@TestMetadata("ReturnTypeMissing.java")
public void testReturnTypeMissing() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ReturnTypeMissing.java");
doTest(fileName);
}
@TestMetadata("SyntaxError.java")
public void testSyntaxError() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxError.java");
doTest(fileName);
}
@TestMetadata("SyntaxErrorInFieldAnnotation.java")
public void testSyntaxErrorInFieldAnnotation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.java");
doTest(fileName);
}
@TestMetadata("VarargReplacedWithNotVararg.java")
public void testVarargReplacedWithNotVararg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/VarargReplacedWithNotVararg.java");
doTest(fileName);
}
@TestMetadata("WrongFieldInitializer.java")
public void testWrongFieldInitializer() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldInitializer.java");
doTest(fileName);
}
@TestMetadata("WrongFieldMutability.java")
public void testWrongFieldMutability() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldMutability.java");
doTest(fileName);
}
@TestMetadata("WrongFieldName.java")
public void testWrongFieldName() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldName.java");
doTest(fileName);
}
@TestMetadata("WrongMethodName.java")
public void testWrongMethodName() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongMethodName.java");
doTest(fileName);
}
@TestMetadata("WrongProjectionKind.java")
public void testWrongProjectionKind() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java");
@@ -3857,59 +3761,17 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
doTest(fileName);
}
@TestMetadata("WrongTypeName1.java")
public void testWrongTypeName1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName1.java");
doTest(fileName);
}
@TestMetadata("WrongTypeName2.java")
public void testWrongTypeName2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName2.java");
doTest(fileName);
}
@TestMetadata("WrongTypeName3.java")
public void testWrongTypeName3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName3.java");
doTest(fileName);
}
@TestMetadata("WrongTypeParameterBoundStructure1.java")
public void testWrongTypeParameterBoundStructure1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java");
doTest(fileName);
}
@TestMetadata("WrongTypeParameterBoundStructure2.java")
public void testWrongTypeParameterBoundStructure2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.java");
doTest(fileName);
}
@TestMetadata("WrongTypeParametersCount.java")
public void testWrongTypeParametersCount() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.java");
doTest(fileName);
}
@TestMetadata("WrongValueParameterStructure1.java")
public void testWrongValueParameterStructure1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java");
doTest(fileName);
}
@TestMetadata("WrongValueParameterStructure2.java")
public void testWrongValueParameterStructure2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure2.java");
doTest(fileName);
}
@TestMetadata("WrongValueParametersCount.java")
public void testWrongValueParametersCount() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParametersCount.java");
doTest(fileName);
}
}
}
@@ -4151,12 +4013,6 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java");
doTest(fileName);
}
@TestMetadata("TwoSuperclassesVarargAndNot.java")
public void testTwoSuperclassesVarargAndNot() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.java");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/loadJava/compiledJava/static")