Drop AbstractLazyResolveRecursiveComparingTest test

Test data from compiler/testData/lazyResolve/ was moved to diagnostics tests
This commit is contained in:
Nikolay Krasko
2014-12-01 20:47:41 +03:00
parent dd79fd9a98
commit 75c887048e
54 changed files with 454 additions and 485 deletions
@@ -4,7 +4,7 @@ package test
import other.prop
// Note: "prop" is expected to be unresolved and replaced to Any
class PropType: prop
class PropType: <!UNRESOLVED_REFERENCE!>prop<!>
// Note: this time "prop" should be resolved and type should be inferred for "checkTypeProp"
val checkTypeProp = prop
@@ -14,4 +14,4 @@ package other
import test.PropType
val prop: PropType? = null
val prop: PropType? = null
@@ -0,0 +1,16 @@
package
package other {
internal val prop: test.PropType? = null
}
package test {
internal val checkTypeProp: test.PropType? = null
internal final class PropType {
public constructor PropType()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@@ -0,0 +1,32 @@
package
internal open class Base {
public constructor Base()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
internal final class SubBase : Base {
public constructor SubBase()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
package test {
internal open class Base {
public constructor Base()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
internal final class SubBase : test.Base {
public constructor SubBase()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@@ -0,0 +1,19 @@
// FILE: a.kt
package test
class A {}
// FILE: b.kt
package test.p; class C {fun f() {}}
// FILE: c.kt
package test.p; open class G<T> {open fun f(): T {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!> fun a() {}}
// FILE: d.kt
package test.p; class G2<E> : <!SUPERTYPE_NOT_INITIALIZED!>G<E><!> { fun g() : E {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!> override fun f() : E {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>}
// FILE: e.kt
package test.p; fun foo() {}
// FILE: f.kt
package test.p; fun foo(<!UNUSED_PARAMETER!>a<!>: C) {}
@@ -0,0 +1,43 @@
package
package test {
internal final class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
package test.p {
internal fun foo(): kotlin.Unit
internal fun foo(/*0*/ a: test.p.C): kotlin.Unit
internal final class C {
public constructor C()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal final fun f(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
internal open class G</*0*/ T> {
public constructor G</*0*/ T>()
internal final fun a(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal open fun f(): T
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
internal final class G2</*0*/ E> : test.p.G<E> {
public constructor G2</*0*/ E>()
internal final override /*1*/ /*fake_override*/ fun a(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal open override /*1*/ fun f(): E
internal final fun g(): E
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
}
@@ -0,0 +1,28 @@
package
package test {
internal final annotation class A : kotlin.Annotation {
public constructor A(/*0*/ a: kotlin.Int = ..., /*1*/ b: kotlin.String = ..., /*2*/ c: kotlin.String)
internal final val a: kotlin.Int
internal final val b: kotlin.String
internal final val c: kotlin.String
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
test.A(a = IntegerValueType(12): IntegerValueType(12), c = "Hello": kotlin.String) internal object SomeObject {
private constructor SomeObject()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public class object <class-object-for-SomeObject> : test.SomeObject {
private constructor <class-object-for-SomeObject>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
}
@@ -3,7 +3,7 @@ package test
// Checks that there is no rewrite error at ANNOTATION slice because of resolving annotations for object in lazy resolve and resolving
// object as property (method tries to resolve annotations too).
BadAnnotation
<!UNRESOLVED_REFERENCE!>BadAnnotation<!>
object SomeObject
val some = SomeObject
val some = SomeObject
@@ -0,0 +1,19 @@
package
package test {
internal val some: test.SomeObject
[ERROR : BadAnnotation]() internal object SomeObject {
private constructor SomeObject()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public class object <class-object-for-SomeObject> : test.SomeObject {
private constructor <class-object-for-SomeObject>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
}
@@ -0,0 +1,8 @@
package test
BadAnnotation(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
object SomeObject
val some = SomeObject
annotation class BadAnnotation(val s: String)
@@ -0,0 +1,27 @@
package
package test {
internal val some: test.SomeObject
internal final annotation class BadAnnotation : kotlin.Annotation {
public constructor BadAnnotation(/*0*/ s: kotlin.String)
internal final val s: kotlin.String
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
test.BadAnnotation(s = IntegerValueType(1): IntegerValueType(1)) internal object SomeObject {
private constructor SomeObject()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public class object <class-object-for-SomeObject> : test.SomeObject {
private constructor <class-object-for-SomeObject>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
}
@@ -0,0 +1,9 @@
package test
open class ToResolve<SomeClass>(f : (Int) -> Int)
fun testFun(<!UNUSED_PARAMETER!>a<!> : Int) = 12
class TestSome<P> {
class object : ToResolve<<!INACCESSIBLE_OUTER_CLASS_EXPRESSION!>P<!>>({testFun(it)}) {
}
}
@@ -0,0 +1,26 @@
package
package test {
internal fun testFun(/*0*/ a: kotlin.Int): kotlin.Int
internal final class TestSome</*0*/ P> {
public constructor TestSome</*0*/ P>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal class object <class-object-for-TestSome> : test.ToResolve<P> {
private constructor <class-object-for-TestSome>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
internal open class ToResolve</*0*/ SomeClass> {
public constructor ToResolve</*0*/ SomeClass>(/*0*/ f: (kotlin.Int) -> kotlin.Int)
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@@ -0,0 +1,9 @@
package test
class Test {
fun test(): Int = 12
class object {
val a = <!INACCESSIBLE_OUTER_CLASS_EXPRESSION!>test()<!> // Check if resolver will be able to infer type of a variable
}
}
@@ -0,0 +1,20 @@
package
package test {
internal final class Test {
public constructor Test()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
internal final fun test(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal class object <class-object-for-Test> {
private constructor <class-object-for-Test>()
internal final val a: kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
}
@@ -0,0 +1,11 @@
package
package test {
internal val fromImported: kotlin.Int = 1
internal val normal: kotlin.Int = 1
}
package testOther {
internal val fromImported: kotlin.Int = 1
internal val some: kotlin.Int = 1
}
@@ -0,0 +1,23 @@
package
package test {
internal val inferTypeFromImportedFun: kotlin.Int
internal final class B : testOther.A {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
package testOther {
internal fun testFun(): kotlin.Int
internal open class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@@ -6,7 +6,7 @@ import testing.other.*
import testing.TestFun
// Resolve should be ambiguous
val a = TestFun()
val a = <!OVERLOAD_RESOLUTION_AMBIGUITY!>TestFun<!>()
//FILE:testing.kt
@@ -0,0 +1,19 @@
package
package test {
internal val a: [ERROR : Type for TestFun()]
}
package testing {
internal final class TestFun {
public constructor TestFun()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
package testing.other {
internal fun TestFun(): kotlin.Int
}
}
@@ -2,9 +2,9 @@ package test
class B {
class B {
fun foo(b: B.C) {
fun foo(<!UNUSED_PARAMETER!>b<!>: B.C) {
}
class C {
}
}
}
}
@@ -0,0 +1,26 @@
package
package test {
internal final class B {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal final class B {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal final fun foo(/*0*/ b: test.B.B.C): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal final class C {
public constructor C()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
}
}
@@ -0,0 +1,9 @@
package test
open class A {
open fun foo(a: <!UNRESOLVED_REFERENCE!>E<!>) {}
}
class B : A() {
override fun foo(a: <!UNRESOLVED_REFERENCE!>E<!>) {}
}
@@ -0,0 +1,20 @@
package
package test {
internal open class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal open fun foo(/*0*/ a: [ERROR : E]): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
internal final class B : test.A {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal open override /*1*/ fun foo(/*0*/ a: [ERROR : E]): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@@ -0,0 +1,5 @@
package test
class CompositeIterator<T>(vararg iterators: <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>java.util.Iterator<T><!>){
val iteratorsIter = iterators.iterator()
}
@@ -0,0 +1,12 @@
package
package test {
internal final class CompositeIterator</*0*/ T> {
public constructor CompositeIterator</*0*/ T>(/*0*/ vararg iterators: java.util.Iterator<T> /*kotlin.Array<java.util.Iterator<T>>*/)
internal final val iteratorsIter: kotlin.Iterator<java.util.Iterator<T>>
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@@ -1,19 +0,0 @@
package test
internal final annotation class A : kotlin.Annotation {
/*primary*/ public constructor A(/*0*/ a: kotlin.Int = ..., /*1*/ b: kotlin.String = ..., /*2*/ c: kotlin.String)
internal final val a: kotlin.Int
internal final fun <get-a>(): kotlin.Int
internal final val b: kotlin.String
internal final fun <get-b>(): kotlin.String
internal final val c: kotlin.String
internal final fun <get-c>(): kotlin.String
}
test.A(a = IntegerValueType(12): IntegerValueType(12), c = "Hello": kotlin.String) internal object SomeObject {
/*primary*/ private constructor SomeObject()
public class object <class-object-for-SomeObject> : test.SomeObject {
/*primary*/ private constructor <class-object-for-SomeObject>()
}
}
@@ -1,10 +0,0 @@
package test
trait A
trait B : A, E
trait C : B
trait D : B
trait E : F
trait F : D, C
trait G : F
trait H : F
@@ -1,25 +0,0 @@
package test
internal trait A {
}
internal trait B : test.A {
}
internal trait C {
}
internal trait D {
}
internal trait E {
}
internal trait F {
}
internal trait G : test.F {
}
internal trait H : test.F {
}
@@ -1,14 +0,0 @@
package test
internal final class B {
/*primary*/ public constructor B()
internal final class B {
/*primary*/ public constructor B()
internal final fun foo(/*0*/ b: test.B.B.C): kotlin.Unit
internal final class C {
/*primary*/ public constructor C()
}
}
}
@@ -1,9 +0,0 @@
package test
open class A {
open fun foo(a: E) {}
}
class B : A() {
override fun foo(a: E) {}
}
@@ -1,11 +0,0 @@
package test
internal open class A {
/*primary*/ public constructor A()
internal open fun foo(/*0*/ a: [ERROR : E]): kotlin.Unit
}
internal final class B : test.A {
/*primary*/ public constructor B()
internal open override /*1*/ fun foo(/*0*/ a: [ERROR : E]): kotlin.Unit
}
@@ -1,12 +0,0 @@
package test
internal val some: test.SomeObject
internal fun <get-some>(): test.SomeObject
[ERROR : BadAnnotation]() internal object SomeObject {
/*primary*/ private constructor SomeObject()
public class object <class-object-for-SomeObject> : test.SomeObject {
/*primary*/ private constructor <class-object-for-SomeObject>()
}
}
@@ -1,8 +0,0 @@
package test
BadAnnotation(1)
object SomeObject
val some = SomeObject
annotation class BadAnnotation(val s: String)
@@ -1,18 +0,0 @@
package test
internal val some: test.SomeObject
internal fun <get-some>(): test.SomeObject
internal final annotation class BadAnnotation : kotlin.Annotation {
/*primary*/ public constructor BadAnnotation(/*0*/ s: kotlin.String)
internal final val s: kotlin.String
internal final fun <get-s>(): kotlin.String
}
test.BadAnnotation(s = IntegerValueType(1): IntegerValueType(1)) internal object SomeObject {
/*primary*/ private constructor SomeObject()
public class object <class-object-for-SomeObject> : test.SomeObject {
/*primary*/ private constructor <class-object-for-SomeObject>()
}
}
@@ -1,9 +0,0 @@
package test
open class ToResolve<SomeClass>(f : (Int) -> Int)
fun testFun(a : Int) = 12
class TestSome<P> {
class object : ToResolve<P>({testFun(it)}) {
}
}
@@ -1,15 +0,0 @@
package test
internal fun testFun(/*0*/ a: kotlin.Int): kotlin.Int
internal final class TestSome</*0*/ P> {
/*primary*/ public constructor TestSome</*0*/ P>()
internal class object <class-object-for-TestSome> : test.ToResolve<P> {
/*primary*/ private constructor <class-object-for-TestSome>()
}
}
internal open class ToResolve</*0*/ SomeClass> {
/*primary*/ public constructor ToResolve</*0*/ SomeClass>(/*0*/ f: (kotlin.Int) -> kotlin.Int)
}
@@ -1,6 +0,0 @@
package test
internal val fromImported: kotlin.Int = 1
internal fun <get-fromImported>(): kotlin.Int
internal val normal: kotlin.Int = 1
internal fun <get-normal>(): kotlin.Int
@@ -1,8 +0,0 @@
package test
internal val inferTypeFromImportedFun: kotlin.Int
internal fun <get-inferTypeFromImportedFun>(): kotlin.Int
internal final class B : testOther.A {
/*primary*/ public constructor B()
}
@@ -1,4 +0,0 @@
package test
internal val a: [ERROR : Type for TestFun()]
internal fun <get-a>(): [ERROR : Type for TestFun()]
@@ -1,8 +0,0 @@
package test
internal val checkTypeProp: test.PropType? = null
internal fun <get-checkTypeProp>(): test.PropType?
internal final class PropType {
/*primary*/ public constructor PropType()
}
@@ -1,9 +0,0 @@
package test
class Test {
fun test(): Int = 12
class object {
val a = test() // Check if resolver will be able to infer type of a variable
}
}
@@ -1,12 +0,0 @@
package test
internal final class Test {
/*primary*/ public constructor Test()
internal final fun test(): kotlin.Int
internal class object <class-object-for-Test> {
/*primary*/ private constructor <class-object-for-Test>()
internal final val a: kotlin.Int
internal final fun <get-a>(): kotlin.Int
}
}
@@ -1,9 +0,0 @@
package test
internal open class Base {
/*primary*/ public constructor Base()
}
internal final class SubBase : test.Base {
/*primary*/ public constructor SubBase()
}
@@ -1,19 +0,0 @@
// FILE: a.kt
package test
class A {}
// FILE: b.kt
package test.p; class C {fun f() {}}
// FILE: c.kt
package test.p; open class G<T> {open fun f(): T {} fun a() {}}
// FILE: d.kt
package test.p; class G2<E> : G<E> { fun g() : E {} override fun f() : E {}}
// FILE: e.kt
package test.p; fun foo() {}
// FILE: f.kt
package test.p; fun foo(a: C) {}
@@ -1,28 +0,0 @@
package test
internal final class A {
/*primary*/ public constructor A()
}
package test.p {
internal fun foo(): kotlin.Unit
internal fun foo(/*0*/ a: test.p.C): kotlin.Unit
internal final class C {
/*primary*/ public constructor C()
internal final fun f(): kotlin.Unit
}
internal open class G</*0*/ T> {
/*primary*/ public constructor G</*0*/ T>()
internal final fun a(): kotlin.Unit
internal open fun f(): T
}
internal final class G2</*0*/ E> : test.p.G<E> {
/*primary*/ public constructor G2</*0*/ E>()
internal final override /*1*/ /*fake_override*/ fun a(): kotlin.Unit
internal open override /*1*/ fun f(): E
internal final fun g(): E
}
}
@@ -1,5 +0,0 @@
package test
class CompositeIterator<T>(vararg iterators: java.util.Iterator<T>){
val iteratorsIter = iterators.iterator()
}
@@ -1,7 +0,0 @@
package test
internal final class CompositeIterator</*0*/ T> {
/*primary*/ public constructor CompositeIterator</*0*/ T>(/*0*/ vararg iterators: java.util.Iterator<T> /*kotlin.Array<java.util.Iterator<T>>*/)
internal final val iteratorsIter: kotlin.Iterator<java.util.Iterator<T>>
internal final fun <get-iteratorsIter>(): kotlin.Iterator<java.util.Iterator<T>>
}
@@ -196,6 +196,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("fileDependencyRecursion.kt")
public void testFileDependencyRecursion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/fileDependencyRecursion.kt");
doTest(fileName);
}
@TestMetadata("FinalClassObjectBound.kt")
public void testFinalClassObjectBound() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/FinalClassObjectBound.kt");
@@ -589,6 +595,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("AnnotationOnObject.kt")
public void testAnnotationOnObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationOnObject.kt");
doTest(fileName);
}
@TestMetadata("AnnotationsForClasses.kt")
public void testAnnotationsForClasses() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.kt");
@@ -697,6 +709,18 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("UnresolvedAnnotationOnObject.kt")
public void testUnresolvedAnnotationOnObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/UnresolvedAnnotationOnObject.kt");
doTest(fileName);
}
@TestMetadata("WrongAnnotationArgsOnObject.kt")
public void testWrongAnnotationArgsOnObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -1361,6 +1385,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("classObjectHeader.kt")
public void testClassObjectHeader() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/classObjectHeader.kt");
doTest(fileName);
}
@TestMetadata("classObjectInLocalClass.kt")
public void testClassObjectInLocalClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/classObjectInLocalClass.kt");
@@ -1408,6 +1438,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.kt");
doTest(fileName);
}
@TestMetadata("resolveFunctionInsideClassObject.kt")
public void testResolveFunctionInsideClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis")
@@ -4607,6 +4643,18 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("importFunctionWithAllUnderImport.kt")
public void testImportFunctionWithAllUnderImport() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/importFunctionWithAllUnderImport.kt");
doTest(fileName);
}
@TestMetadata("importFunctionWithAllUnderImportAfterNamedImport.kt")
public void testImportFunctionWithAllUnderImportAfterNamedImport() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/importFunctionWithAllUnderImportAfterNamedImport.kt");
doTest(fileName);
}
@TestMetadata("ImportResolutionOrder.kt")
public void testImportResolutionOrder() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportResolutionOrder.kt");
@@ -6033,6 +6081,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("InnerClassNameClash.kt")
public void testInnerClassNameClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/InnerClassNameClash.kt");
doTest(fileName);
}
@TestMetadata("innerClassesInStaticParameters.kt")
public void testInnerClassesInStaticParameters() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.kt");
@@ -7734,6 +7788,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("OverrideWithErrors.kt")
public void testOverrideWithErrors() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/OverrideWithErrors.kt");
doTest(fileName);
}
@TestMetadata("OverridingFinalMember.kt")
public void testOverridingFinalMember() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/OverridingFinalMember.kt");
@@ -10211,6 +10271,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("varargIterator.kt")
public void testVarargIterator() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargIterator.kt");
doTest(fileName);
}
@TestMetadata("varargsAndFunctionLiterals.kt")
public void testVarargsAndFunctionLiterals() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargsAndFunctionLiterals.kt");
@@ -1,80 +0,0 @@
/*
* Copyright 2010-2013 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.jet.lang.resolve.lazy;
import com.intellij.openapi.util.io.FileUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.ConfigurationKind;
import org.jetbrains.jet.JetTestUtils;
import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment;
import org.jetbrains.jet.lang.descriptors.ModuleDescriptor;
import org.jetbrains.jet.lang.descriptors.PackageViewDescriptor;
import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.resolve.name.FqName;
import org.jetbrains.jet.test.util.RecursiveDescriptorComparator;
import org.junit.Assert;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import static org.jetbrains.jet.lang.psi.PsiPackage.JetPsiFactory;
import static org.jetbrains.jet.test.util.DescriptorValidator.ValidationVisitor.errorTypesAllowed;
import static org.jetbrains.jet.test.util.DescriptorValidator.ValidationVisitor.errorTypesForbidden;
public abstract class AbstractLazyResolveRecursiveComparingTest extends KotlinTestWithEnvironment {
@Override
protected JetCoreEnvironment createEnvironment() {
return createEnvironmentWithMockJdk(ConfigurationKind.ALL);
}
protected void doTest(String testFileName) throws IOException {
doTest(testFileName, true, true, true);
}
private void doTest(String testFileName, boolean checkPrimaryConstructors, boolean checkPropertyAccessors, boolean allowErrorTypes) throws IOException {
List<JetFile> files = JetTestUtils.createTestFiles(
testFileName,
FileUtil.loadFile(new File(testFileName), true),
new JetTestUtils.TestFileFactoryNoModules<JetFile>() {
@NotNull
@Override
public JetFile create(@NotNull String fileName, @NotNull String text, @NotNull Map<String, String> directives) {
return JetPsiFactory(getProject()).createFile(fileName, text);
}
}
);
ModuleDescriptor module = LazyResolveTestUtil.resolve(files, getEnvironment());
String testedPackage = "test";
PackageViewDescriptor testPackage = module.getPackage(new FqName(testedPackage));
Assert.assertNotNull("Package for name '" + testedPackage + "' is null after resolve", testPackage);
File serializeResultsTo = new File(FileUtil.getNameWithoutExtension(testFileName) + ".txt");
RecursiveDescriptorComparator.validateAndCompareDescriptorWithFile(
testPackage, RecursiveDescriptorComparator.DONT_INCLUDE_METHODS_OF_OBJECT
.filterRecursion(RecursiveDescriptorComparator.SKIP_BUILT_INS_PACKAGES)
.checkPrimaryConstructors(checkPrimaryConstructors)
.checkPropertyAccessors(checkPropertyAccessors)
.withValidationStrategy(allowErrorTypes ? errorTypesAllowed() : errorTypesForbidden()),
serializeResultsTo);
}
}
@@ -1,128 +0,0 @@
/*
* Copyright 2010-2014 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.jet.lang.resolve.lazy;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.jet.JUnit3RunnerWithInners;
import org.jetbrains.jet.JetTestUtils;
import org.jetbrains.jet.test.InnerTestClasses;
import org.jetbrains.jet.test.TestMetadata;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/lazyResolve/recursiveComparator")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class LazyResolveRecursiveComparingTestGenerated extends AbstractLazyResolveRecursiveComparingTest {
public void testAllFilesPresentInRecursiveComparator() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/lazyResolve/recursiveComparator"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("AnnotationOnObject.kt")
public void testAnnotationOnObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/AnnotationOnObject.kt");
doTest(fileName);
}
@TestMetadata("classObjectHeader.kt")
public void testClassObjectHeader() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/classObjectHeader.kt");
doTest(fileName);
}
@TestMetadata("CyclicHierarchy.kt")
public void testCyclicHierarchy() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/CyclicHierarchy.kt");
doTest(fileName);
}
@TestMetadata("fileDependencyRecursion.kt")
public void testFileDependencyRecursion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/fileDependencyRecursion.kt");
doTest(fileName);
}
@TestMetadata("importFunctionWithAllUnderImport.kt")
public void testImportFunctionWithAllUnderImport() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/importFunctionWithAllUnderImport.kt");
doTest(fileName);
}
@TestMetadata("importFunctionWithAllUnderImportAfterNamedImport.kt")
public void testImportFunctionWithAllUnderImportAfterNamedImport() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/importFunctionWithAllUnderImportAfterNamedImport.kt");
doTest(fileName);
}
@TestMetadata("InnerClassNameClash.kt")
public void testInnerClassNameClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/InnerClassNameClash.kt");
doTest(fileName);
}
@TestMetadata("OverrideWithErrors.kt")
public void testOverrideWithErrors() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/OverrideWithErrors.kt");
doTest(fileName);
}
@TestMetadata("propertyClassFileDependencyRecursion.kt")
public void testPropertyClassFileDependencyRecursion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/propertyClassFileDependencyRecursion.kt");
doTest(fileName);
}
@TestMetadata("resolveFunctionInsideClassObject.kt")
public void testResolveFunctionInsideClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/resolveFunctionInsideClassObject.kt");
doTest(fileName);
}
@TestMetadata("sameClassNameResolve.kt")
public void testSameClassNameResolve() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/sameClassNameResolve.kt");
doTest(fileName);
}
@TestMetadata("simpleClass.kt")
public void testSimpleClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/simpleClass.kt");
doTest(fileName);
}
@TestMetadata("UnresolvedAnnotationOnObject.kt")
public void testUnresolvedAnnotationOnObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/UnresolvedAnnotationOnObject.kt");
doTest(fileName);
}
@TestMetadata("varargIterator.kt")
public void testVarargIterator() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/varargIterator.kt");
doTest(fileName);
}
@TestMetadata("WrongAnnotationArgsOnObject.kt")
public void testWrongAnnotationArgsOnObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lazyResolve/recursiveComparator/WrongAnnotationArgsOnObject.kt");
doTest(fileName);
}
}
@@ -35,7 +35,6 @@ import org.jetbrains.jet.codegen.defaultConstructor.AbstractDefaultArgumentsRefl
import org.jetbrains.jet.jvm.compiler.AbstractLoadJavaTest
import org.jetbrains.jet.jvm.compiler.AbstractCompileJavaAgainstKotlinTest
import org.jetbrains.jet.jvm.compiler.AbstractCompileKotlinAgainstKotlinTest
import org.jetbrains.jet.lang.resolve.lazy.AbstractLazyResolveRecursiveComparingTest
import org.jetbrains.jet.modules.xml.AbstractModuleXmlParserTest
import org.jetbrains.jet.jvm.compiler.AbstractWriteSignatureTest
import org.jetbrains.jet.cli.AbstractKotlincExecutableTest
@@ -249,10 +248,6 @@ fun main(args: Array<String>) {
model("renderer")
}
testClass(javaClass<AbstractLazyResolveRecursiveComparingTest>()) {
model("lazyResolve/recursiveComparator")
}
testClass(javaClass<AbstractModuleXmlParserTest>()) {
model("modules.xml", extension = "xml")
}