Added tests for KT-4870 "Change to constructor invocation" quick fix doesn't work

for local classes, objects and object expressions

 #KT-4870 Obsolete
This commit is contained in:
Svetlana Isakova
2014-04-23 20:47:28 +04:00
parent 91b0ad2023
commit 4590452b27
5 changed files with 30 additions and 0 deletions
@@ -0,0 +1,5 @@
// "Change to constructor invocation" "true"
fun bar() {
abstract class Foo {}
class A : Foo() {}
}
@@ -0,0 +1,5 @@
// "Change to constructor invocation" "true"
fun bar() {
abstract class Foo {}
val foo: Foo = object : Foo() {}
}
@@ -0,0 +1,5 @@
// "Change to constructor invocation" "true"
fun bar() {
abstract class Foo {}
class A : <caret>Foo {}
}
@@ -0,0 +1,5 @@
// "Change to constructor invocation" "true"
fun bar() {
abstract class Foo {}
val foo: Foo = object : <caret>Foo {}
}
@@ -1441,6 +1441,16 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
doTest("idea/testData/quickfix/supertypeInitialization/beforeSupertypeNotInitializedEmptyConstructor.kt");
}
@TestMetadata("beforeSupertypeNotInitializedForLocalClass.kt")
public void testSupertypeNotInitializedForLocalClass() throws Exception {
doTest("idea/testData/quickfix/supertypeInitialization/beforeSupertypeNotInitializedForLocalClass.kt");
}
@TestMetadata("beforeSupertypeNotInitializedForObjectExpression.kt")
public void testSupertypeNotInitializedForObjectExpression() throws Exception {
doTest("idea/testData/quickfix/supertypeInitialization/beforeSupertypeNotInitializedForObjectExpression.kt");
}
}
@TestMetadata("idea/testData/quickfix/suppress")