[TEST] Migrate AbstractDiagnosticsWithExplicitApi to new test runners

This commit is contained in:
Dmitriy Novozhilov
2020-12-09 12:28:49 +03:00
parent c0e4452cf8
commit 23e704f361
27 changed files with 373 additions and 104 deletions
@@ -0,0 +1,47 @@
// SKIP_TXT
annotation class A
@Target(
AnnotationTarget.CLASS,
AnnotationTarget.PROPERTY,
AnnotationTarget.CONSTRUCTOR,
AnnotationTarget.FUNCTION
)
public annotation class B
annotation class C(val a: String)
/**
* Foo1 KDoc
*/
@B
class Foo1() {}
public class Foo2() {
/**
* KDoc for methodWithAnnotations
*/
@B
fun methodWithAnnotations() {}
/**
* Property KDoc
*/
@B
var simple: Int = 10
}
public open class ClassWithOpen {
/**
* constructor KDoc
*/
@B
constructor() {}
/**
* KDoc for openAnnotatedMethod
*/
@B
open fun openAnnotatedMethod() {}
}
@@ -0,0 +1,47 @@
// SKIP_TXT
/**
* KDoc for Foo1
*/
class Foo1() {}
public class Foo2() {
/**
* KDoc for method
*/
fun method() {}
/**
* KDoc for method2
*/
public fun method2() {}
private fun method3() {}
fun implicit() = 10
public fun implicit2() = 10
public fun implicit3(): Int = 10
}
public open class ClassWithOpen() {
/**
* KDoc for method
*/
fun method() {}
/**
* KDoc for openMethod
*/
open fun openMethod() {}
}
public data class FooData(val i: Int, val s: String)
data class FooData2(val i: Int, val s: String)
public class WithNested {
class Nested {}
inner class Inner {}
}
enum class Foo { A, B }
public enum class Bar { A, B }
@@ -0,0 +1,20 @@
// SKIP_TXT
public class Bar {
companion object {}
}
public class Bar2 {
companion object MyCompanion {}
}
public class Bar3 {
/**
* Nested object KDoc
*/
object NestedObject {}
}
data class FooData2(val i: Int, val s: String) {
object NestedObject {}
}
@@ -0,0 +1,17 @@
// SKIP_TXT
public class Foo1 () {}
public class Foo2 constructor() {}
public class Foo3 public constructor() {}
public class Foo4 private constructor() {}
public class Foo5 {
/**
* constructor KDoc
*/
constructor() {}
}
public class Foo6 {
public constructor() {}
}
@@ -0,0 +1,7 @@
// !DIAGNOSTICS: -EXPERIMENTAL_FEATURE_WARNING
// SKIP_TXT
inline class Value1(val inner: Int)
public inline class Value2(val inner: Int)
inline class Value3(public val inner: Int)
public inline class Value4(public val inner: Int)
@@ -0,0 +1,35 @@
// SKIP_TXT
interface I1 {
fun i()
}
public interface I2 {
fun i()
}
public interface I3 {
public fun i()
public val v: Int
}
public interface I4 {
public fun i(): Int
public val v: Int
}
public class Impl: I3 {
override fun i() {}
override val v: Int
get() = 10
}
public class Impl2: I4 {
override fun i() = 10
override val v = 10
}
private class PrivateImpl: I4 {
override fun i() = 10
override val v = 10
}
@@ -0,0 +1,23 @@
// SKIP_TXT
public class Foo(val bar: Int, private var bar2: String, internal var bar3: Long, public var bar4: Int) {
/**
* Property KDoc
*/
var simple: Int = 10
public var simple2: Int = 10
val withGetter: Int
get() = 10
public val withGetter2: Int
get() = 10
var getterAndSetter: Int = 10
get() = field
set(v) { field = v }
public var getterAndSetter2: Int = 10
get() = field
set(v) { field = v }
}
@@ -0,0 +1,7 @@
// SKIP_TXT
// WITH_RUNTIME
public class A {
@PublishedApi
internal fun foo() = 1
}
@@ -0,0 +1,12 @@
// SKIP_TXT
/**
* foo KDoc
*/
fun foo() {}
public fun foo2() {}
fun bar() = 10
public fun bar2() = 10
public fun bar3(): Int = 10