Add runtime dependency to tests where exception references are used.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// RUNTIME
|
||||
package a
|
||||
|
||||
class A() {
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
// "Specify return type explicitly" "true"
|
||||
// WITH_RUNTIME
|
||||
<caret>fun foo() = throw IllegalArgumentException()
|
||||
@@ -1,2 +1,3 @@
|
||||
// "Specify return type explicitly" "true"
|
||||
fun foo(): Nothing<caret> = throw IllegalArgumentException()
|
||||
// WITH_RUNTIME
|
||||
fun foo(): Nothing = throw IllegalArgumentException()
|
||||
@@ -1,5 +1,6 @@
|
||||
// "Implement interface" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Container {
|
||||
private interface <caret>Base {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// "Implement interface" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Container {
|
||||
private interface Base {
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// ERROR: Unresolved reference: Before
|
||||
// ERROR: Unresolved reference: junit
|
||||
// UNCONFIGURE_LIBRARY: JUnit4
|
||||
// WITH_RUNTIME
|
||||
package some
|
||||
|
||||
import org.<caret>junit.Before
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// ERROR: Unresolved reference: Before
|
||||
// ERROR: Unresolved reference: junit
|
||||
// UNCONFIGURE_LIBRARY: JUnit4
|
||||
// WITH_RUNTIME
|
||||
package some
|
||||
|
||||
import org.junit.Before
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// ERROR: Unresolved reference: BeforeMethod
|
||||
// ERROR: Unresolved reference: testng
|
||||
// UNCONFIGURE_LIBRARY: testng
|
||||
// WITH_RUNTIME
|
||||
package some
|
||||
|
||||
abstract class KBase {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// ERROR: Unresolved reference: BeforeMethod
|
||||
// ERROR: Unresolved reference: testng
|
||||
// UNCONFIGURE_LIBRARY: testng
|
||||
// WITH_RUNTIME
|
||||
package some
|
||||
|
||||
import org.testng.annotations.BeforeMethod
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Add 'open fun f(): Int' to 'A'" "true"
|
||||
// WITH_RUNTIME
|
||||
open class A {
|
||||
}
|
||||
class B : A() {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Add 'open fun f(): Int' to 'A'" "true"
|
||||
// WITH_RUNTIME
|
||||
open class A {
|
||||
open fun f(): Int {
|
||||
throw UnsupportedOperationException()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
for (i in list()<caret>!!) {}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
@Suppress("UNNECESSARY_NOT_NULL_ASSERTION")
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(): Any {
|
||||
throw Exception(""<caret>!!)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(): Any {
|
||||
@Suppress("UNNECESSARY_NOT_NULL_ASSERTION")
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Remove 'val' from parameter" "true"
|
||||
// WITH_RUNTIME
|
||||
fun f() {
|
||||
try {
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Remove 'val' from parameter" "true"
|
||||
// WITH_RUNTIME
|
||||
fun f() {
|
||||
try {
|
||||
|
||||
|
||||
@@ -93,9 +93,9 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("throw.kt")
|
||||
public void testThrow() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/throw.kt");
|
||||
@TestMetadata("throwRuntime.kt")
|
||||
public void testThrowRuntime() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/throwRuntime.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user