Add test for KT-20007

This commit is contained in:
Mikhail Glukhikh
2017-10-02 17:17:44 +03:00
parent 4c456983eb
commit e47feaf0b8
3 changed files with 40 additions and 0 deletions
@@ -0,0 +1,14 @@
// "Implement members" "true"
// ENABLE_MULTIPLATFORM
// ERROR: Expected interface 'InterfaceWithVals' has no actual declaration in module light_idea_test_case for JVM
fun TODO(s: String): Nothing = null!!
expect interface InterfaceWithVals {
fun funInInterface()
val importantVal: Int
}
class <caret>ChildOfInterface : InterfaceWithVals{
}
@@ -0,0 +1,20 @@
// "Implement members" "true"
// ENABLE_MULTIPLATFORM
// ERROR: Expected interface 'InterfaceWithVals' has no actual declaration in module light_idea_test_case for JVM
fun TODO(s: String): Nothing = null!!
expect interface InterfaceWithVals {
fun funInInterface()
val importantVal: Int
}
class ChildOfInterface : InterfaceWithVals{
override fun funInInterface() {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override val importantVal: Int
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
}
@@ -6212,6 +6212,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
doTest(fileName);
}
@TestMetadata("doNotAddExpectForVal.kt")
public void testDoNotAddExpectForVal() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/doNotAddExpectForVal.kt");
doTest(fileName);
}
@TestMetadata("doNotAddHeader.kt")
public void testDoNotAddHeader() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/doNotAddHeader.kt");