[AA] Add tests for KDoc reference resolution of non-static callables

^KTIJ-26003
This commit is contained in:
Marco Pennekamp
2023-09-14 14:40:18 +02:00
committed by Space Team
parent 2acee69908
commit 3dbae89cdd
53 changed files with 1162 additions and 0 deletions
@@ -0,0 +1,8 @@
class Foo {
fun foo() {}
}
/**
* [Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Foo) fun foo()
@@ -0,0 +1,8 @@
interface Foo {
fun foo()
}
/**
* [Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Foo) fun foo()
@@ -0,0 +1,10 @@
open class Bar {
fun foo() {}
}
class Foo : Bar()
/**
* [Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Bar) fun foo()
@@ -0,0 +1,10 @@
interface Bar {
fun foo()
}
abstract class Foo : Bar
/**
* [Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Bar) fun foo()
@@ -0,0 +1,12 @@
interface Baz {
fun foo()
}
abstract class Bar : Baz
abstract class Foo : Bar()
/**
* [Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Baz) fun foo()
@@ -0,0 +1,14 @@
// FILE: Foo.kt
package foo
class Foo {
fun foo() {}
}
// FILE: main.kt
package test
/**
* [foo.Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in foo.Foo) fun foo()
@@ -0,0 +1,14 @@
// FILE: Foo.kt
package foo
interface Foo {
fun foo()
}
// FILE: main.kt
package test
/**
* [foo.Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in foo.Foo) fun foo()
@@ -0,0 +1,16 @@
// FILE: Foo.kt
package foo
open class Bar {
fun foo() {}
}
class Foo : Bar()
// FILE: main.kt
package test
/**
* [foo.Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in foo.Bar) fun foo()
@@ -0,0 +1,16 @@
// FILE: Foo.kt
package foo
interface Bar {
fun foo()
}
abstract class Foo : Bar
// FILE: main.kt
package test
/**
* [foo.Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in foo.Bar) fun foo()
@@ -0,0 +1,18 @@
// FILE: Foo.kt
package foo
interface Baz {
fun foo()
}
abstract class Bar : Baz
abstract class Foo : Bar()
// FILE: main.kt
package test
/**
* [foo.Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in foo.Baz) fun foo()
@@ -0,0 +1,14 @@
// FILE: Foo.kt
package foo
class Foo {
val foo: Int = 5
}
// FILE: main.kt
package test
/**
* [foo.Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in foo.Foo) val foo: kotlin.Int
@@ -0,0 +1,14 @@
// FILE: Foo.kt
package foo
interface Foo {
val foo: Int
}
// FILE: main.kt
package test
/**
* [foo.Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in foo.Foo) val foo: kotlin.Int
@@ -0,0 +1,16 @@
// FILE: Foo.kt
package foo
open class Bar {
val foo: Int = 5
}
class Foo : Bar()
// FILE: main.kt
package test
/**
* [foo.Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in foo.Bar) val foo: kotlin.Int
@@ -0,0 +1,16 @@
// FILE: Foo.kt
package foo
interface Bar {
val foo: Int
}
abstract class Foo : Bar
// FILE: main.kt
package test
/**
* [foo.Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in foo.Bar) val foo: kotlin.Int
@@ -0,0 +1,18 @@
// FILE: Foo.kt
package foo
interface Baz {
val foo: Int
}
abstract class Bar : Baz
abstract class Foo : Bar()
// FILE: main.kt
package test
/**
* [foo.Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in foo.Baz) val foo: kotlin.Int
@@ -0,0 +1,8 @@
class Foo {
val foo: Int = 5
}
/**
* [Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Foo) val foo: kotlin.Int
@@ -0,0 +1,8 @@
interface Foo {
val foo: Int
}
/**
* [Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Foo) val foo: kotlin.Int
@@ -0,0 +1,10 @@
open class Bar {
val foo: Int = 5
}
class Foo : Bar()
/**
* [Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Bar) val foo: kotlin.Int
@@ -0,0 +1,10 @@
interface Bar {
val foo: Int
}
abstract class Foo : Bar
/**
* [Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Bar) val foo: kotlin.Int
@@ -0,0 +1,12 @@
interface Baz {
val foo: Int
}
abstract class Bar : Baz
abstract class Foo : Bar()
/**
* [Foo.<caret>foo]
*/
fun usage() {}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Baz) val foo: kotlin.Int