diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.java b/compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.java new file mode 100644 index 00000000000..992bdcdc2a6 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.java @@ -0,0 +1,10 @@ +package test; + +import java.util.*; +import jet.runtime.typeinfo.KotlinSignature; + +public class ConstructorWithNewTypeParams { + @KotlinSignature("fun ConstructorWithNewTypeParams(first : Any)") // TODO: first : U doesn't work + public ConstructorWithNewTypeParams(U first) { + } +} \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.kt b/compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.kt new file mode 100644 index 00000000000..fe3ac9d8d53 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.kt @@ -0,0 +1,4 @@ +package test + +public open class ConstructorWithNewTypeParams(p0 : Any) : java.lang.Object() { +} \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.txt b/compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.txt new file mode 100644 index 00000000000..848f288beaf --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.txt @@ -0,0 +1,5 @@ +namespace test + +public open class test.ConstructorWithNewTypeParams : java.lang.Object { + public final /*constructor*/ fun (/*0*/ p0: jet.Any): test.ConstructorWithNewTypeParams +} diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.java b/compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.java new file mode 100644 index 00000000000..3e04f89e23e --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.java @@ -0,0 +1,10 @@ +package test; + +import java.util.*; +import jet.runtime.typeinfo.KotlinSignature; + +public class ConstructorWithParentTypeParams { + @KotlinSignature("fun ConstructorWithParentTypeParams(first: T)") + public ConstructorWithParentTypeParams(T first) { + } +} \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.kt b/compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.kt new file mode 100644 index 00000000000..db424036871 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.kt @@ -0,0 +1,4 @@ +package test + +public open class ConstructorWithParentTypeParams(p0 : T) : java.lang.Object() { +} \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.txt b/compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.txt new file mode 100644 index 00000000000..73fa8298641 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.txt @@ -0,0 +1,5 @@ +namespace test + +public open class test.ConstructorWithParentTypeParams : java.lang.Object { + public final /*constructor*/ fun (/*0*/ p0: T): test.ConstructorWithParentTypeParams +} diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.java b/compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.java new file mode 100644 index 00000000000..1b0ac8c04a2 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.java @@ -0,0 +1,10 @@ +package test; + +import java.util.*; +import jet.runtime.typeinfo.KotlinSignature; + +public class ConstructorWithSeveralParams { + @KotlinSignature("fun ConstructorWithSeveralParams(integer : Int, intField : Int, collection: ArrayList)") + public ConstructorWithSeveralParams(Integer integer, int intBasic, ArrayList collection) { + } +} \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.kt b/compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.kt new file mode 100644 index 00000000000..c53b66bf254 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.kt @@ -0,0 +1,6 @@ +package test + +import java.util.* + +public open class ConstructorWithSeveralParams(p0: Int, p1 : Int, p2 : ArrayList) : java.lang.Object() { +} \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.txt b/compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.txt new file mode 100644 index 00000000000..aa4a451fad4 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.txt @@ -0,0 +1,5 @@ +namespace test + +public open class test.ConstructorWithSeveralParams : java.lang.Object { + public final /*constructor*/ fun (/*0*/ p0: jet.Int, /*1*/ p1: jet.Int, /*2*/ p2: java.util.ArrayList): test.ConstructorWithSeveralParams +} diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.java b/compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.java new file mode 100644 index 00000000000..a7a4cc9b165 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.java @@ -0,0 +1,10 @@ +package test; + +import java.util.*; +import jet.runtime.typeinfo.KotlinSignature; + +public class ConstructorWithoutParams { + @KotlinSignature("fun ConstructorWithoutParams()") + public ConstructorWithoutParams() { + } +} \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.kt b/compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.kt new file mode 100644 index 00000000000..5aae90c6c96 --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.kt @@ -0,0 +1,4 @@ +package test + +public open class ConstructorWithoutParams() : java.lang.Object() { +} \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.txt b/compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.txt new file mode 100644 index 00000000000..41b9367681c --- /dev/null +++ b/compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.txt @@ -0,0 +1,5 @@ +namespace test + +public open class test.ConstructorWithoutParams : java.lang.Object { + public final /*constructor*/ fun (): test.ConstructorWithoutParams +} diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java index aea4a176c9d..0793d47884d 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java @@ -15,16 +15,13 @@ */ package org.jetbrains.jet.jvm.compiler; -import junit.framework.Assert; import junit.framework.Test; import junit.framework.TestSuite; - -import java.io.File; import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.test.InnerTestClasses; import org.jetbrains.jet.test.TestMetadata; -import org.jetbrains.jet.jvm.compiler.AbstractLoadJavaTest; +import java.io.File; /** This class is generated by {@link org.jetbrains.jet.jvm.compiler.AbstractLoadJavaTest}. DO NOT MODIFY MANUALLY */ @TestMetadata("compiler/testData/loadJava") @@ -240,6 +237,26 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.jvm.compiler.AbstractLoadJavaTest", new File("compiler/testData/loadJava/kotlinSignature"), "java", true); } + @TestMetadata("ConstructorWithNewTypeParams.java") + public void testConstructorWithNewTypeParams() throws Exception { + doTest("compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.java"); + } + + @TestMetadata("ConstructorWithParentTypeParams.java") + public void testConstructorWithParentTypeParams() throws Exception { + doTest("compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.java"); + } + + @TestMetadata("ConstructorWithSeveralParams.java") + public void testConstructorWithSeveralParams() throws Exception { + doTest("compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.java"); + } + + @TestMetadata("ConstructorWithoutParams.java") + public void testConstructorWithoutParams() throws Exception { + doTest("compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.java"); + } + @TestMetadata("MethodWithFunctionTypes.java") public void testMethodWithFunctionTypes() throws Exception { doTest("compiler/testData/loadJava/kotlinSignature/MethodWithFunctionTypes.java"); diff --git a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java index bc746023412..da3f892d7b3 100644 --- a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveNamespaceComparingTestGenerated.java @@ -15,16 +15,13 @@ */ package org.jetbrains.jet.lang.resolve.lazy; -import junit.framework.Assert; import junit.framework.Test; import junit.framework.TestSuite; - -import java.io.File; import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.test.InnerTestClasses; import org.jetbrains.jet.test.TestMetadata; -import org.jetbrains.jet.lang.resolve.lazy.AbstractLazyResolveNamespaceComparingTest; +import java.io.File; /** This class is generated by {@link org.jetbrains.jet.lang.resolve.lazy.AbstractLazyResolveNamespaceComparingTest}. DO NOT MODIFY MANUALLY */ @InnerTestClasses({LazyResolveNamespaceComparingTestGenerated.LoadKotlin.class, LazyResolveNamespaceComparingTestGenerated.LoadJava.class, LazyResolveNamespaceComparingTestGenerated.NamespaceComparator.class}) @@ -1125,6 +1122,26 @@ public class LazyResolveNamespaceComparingTestGenerated extends AbstractLazyReso JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.lang.resolve.lazy.AbstractLazyResolveNamespaceComparingTest", new File("compiler/testData/loadJava/kotlinSignature"), "kt", true); } + @TestMetadata("ConstructorWithNewTypeParams.kt") + public void testConstructorWithNewTypeParams() throws Exception { + doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); + } + + @TestMetadata("ConstructorWithParentTypeParams.kt") + public void testConstructorWithParentTypeParams() throws Exception { + doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); + } + + @TestMetadata("ConstructorWithSeveralParams.kt") + public void testConstructorWithSeveralParams() throws Exception { + doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); + } + + @TestMetadata("ConstructorWithoutParams.kt") + public void testConstructorWithoutParams() throws Exception { + doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/ConstructorWithoutParams.kt"); + } + @TestMetadata("MethodWithFunctionTypes.kt") public void testMethodWithFunctionTypes() throws Exception { doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/MethodWithFunctionTypes.kt");