[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<!>()
}
@@ -1,3 +1,4 @@
// !JDK_KIND: MODIFIED_MOCK_JDK
// !CHECK_TYPE
// SKIP_TXT
// WITH_RUNTIME
@@ -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("")
}
@@ -1,3 +1,4 @@
// !JDK_KIND: MODIFIED_MOCK_JDK
// !CHECK_TYPE
interface A : MutableCollection<String> {
@@ -0,0 +1,6 @@
// !JDK_KIND: MODIFIED_MOCK_JDK
abstract class A : Throwable(1.0) {}
fun foo() {
Throwable(1.5)
}
@@ -1,3 +1,4 @@
// !JDK_KIND: MODIFIED_MOCK_JDK
abstract class A : <!DEPRECATION!>Throwable<!>(1.0) {}
fun foo() {