[TEST] Migrate AbstractDiagnosticsWithModifiedMockJdkTest to new test runners

This commit is contained in:
Dmitriy Novozhilov
2020-12-09 12:45:27 +03:00
parent b43fa94cb6
commit 26d7ea6ce6
13 changed files with 91 additions and 75 deletions
@@ -0,0 +1,13 @@
// !JDK_KIND: MODIFIED_MOCK_JDK
// !CHECK_TYPE
// SKIP_TXT
// WITH_RUNTIME
fun foo(s: String) {
s.isBlank()
s.lines().checkType { _<List<String>>() }
s.repeat(1)
// We don't have `strip` extension, so leave it for a while in gray list
s.<!UNRESOLVED_REFERENCE!>strip<!>()
}
@@ -0,0 +1,13 @@
// !JDK_KIND: MODIFIED_MOCK_JDK
// !CHECK_TYPE
// SKIP_TXT
// WITH_RUNTIME
fun foo(s: String) {
s.isBlank()
s.lines().checkType { _<List<String>>() }
s.repeat(1)
// We don't have `strip` extension, so leave it for a while in gray list
s.<!DEPRECATION!>strip<!>()
}
@@ -0,0 +1,13 @@
// !JDK_KIND: MODIFIED_MOCK_JDK
// !CHECK_TYPE
interface A : MutableCollection<String> {
// Override of deprecated function could be marked as deprecated too
override fun nonExistingMethod(x: String) = ""
}
fun foo(x: MutableCollection<Int>, y: Collection<String>, z: A) {
x.<!UNRESOLVED_REFERENCE!>nonExistingMethod<!>(1).<!INAPPLICABLE_CANDIDATE!>checkType<!> { <!INAPPLICABLE_CANDIDATE!>_<!><String>() }
y.<!UNRESOLVED_REFERENCE!>nonExistingMethod<!>("")
z.nonExistingMethod("")
}
@@ -0,0 +1,13 @@
// !JDK_KIND: MODIFIED_MOCK_JDK
// !CHECK_TYPE
interface A : MutableCollection<String> {
// Override of deprecated function could be marked as deprecated too
override fun nonExistingMethod(x: String) = ""
}
fun foo(x: MutableCollection<Int>, y: Collection<String>, z: A) {
x.<!DEPRECATION!>nonExistingMethod<!>(1).checkType { _<String>() }
y.<!DEPRECATION!>nonExistingMethod<!>("")
z.<!DEPRECATION!>nonExistingMethod<!>("")
}
@@ -0,0 +1,21 @@
package
public fun foo(/*0*/ x: kotlin.collections.MutableCollection<kotlin.Int>, /*1*/ y: kotlin.collections.Collection<kotlin.String>, /*2*/ z: A): kotlin.Unit
public interface A : kotlin.collections.MutableCollection<kotlin.String> {
public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int
public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ element: kotlin.String): kotlin.Boolean
public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ elements: kotlin.collections.Collection<kotlin.String>): kotlin.Boolean
public abstract override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit
public abstract override /*1*/ /*fake_override*/ fun contains(/*0*/ element: kotlin.String): kotlin.Boolean
public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection<kotlin.String>): kotlin.Boolean
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 abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean
public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator<kotlin.String>
public open override /*1*/ fun nonExistingMethod(/*0*/ x: kotlin.String): kotlin.String
public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ element: kotlin.String): kotlin.Boolean
public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection<kotlin.String>): kotlin.Boolean
public abstract override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection<kotlin.String>): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -0,0 +1,6 @@
// !JDK_KIND: MODIFIED_MOCK_JDK
abstract class A : Throwable(1.0) {}
fun foo() {
Throwable(1.5)
}
@@ -0,0 +1,6 @@
// !JDK_KIND: MODIFIED_MOCK_JDK
abstract class A : <!DEPRECATION!>Throwable<!>(1.0) {}
fun foo() {
<!DEPRECATION!>Throwable<!>(1.5)
}
@@ -0,0 +1,20 @@
package
public fun foo(): kotlin.Unit
public abstract class A : kotlin.Throwable {
public constructor A()
public open override /*1*/ /*fake_override*/ val cause: kotlin.Throwable?
public open override /*1*/ /*fake_override*/ val message: kotlin.String?
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun fillInStackTrace(): kotlin.Throwable!
public open override /*1*/ /*fake_override*/ fun getLocalizedMessage(): kotlin.String!
public open override /*1*/ /*fake_override*/ fun getStackTrace(): kotlin.Array<(out) java.lang.StackTraceElement!>!
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun initCause(/*0*/ cause: kotlin.Throwable!): kotlin.Throwable!
public open override /*1*/ /*fake_override*/ fun printStackTrace(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun printStackTrace(/*0*/ s: java.io.PrintStream!): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun printStackTrace(/*0*/ s: java.io.PrintWriter!): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun setStackTrace(/*0*/ stackTrace: kotlin.Array<(out) java.lang.StackTraceElement!>!): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}