Removed redundant and confusing .after files in negative tests
This commit is contained in:
@@ -14,8 +14,3 @@ package a
|
|||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
|
|
||||||
fun String.getValue(x: Any?, y: KProperty<*>) = ""
|
fun String.getValue(x: Any?, y: KProperty<*>) = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// FILE: first.after.kt
|
|
||||||
// Should not be checked
|
|
||||||
@@ -25,8 +25,3 @@ package some
|
|||||||
public class Some
|
public class Some
|
||||||
|
|
||||||
fun Some.get(s: String) {}
|
fun Some.get(s: String) {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// FILE: first.after.kt
|
|
||||||
// Should not be checked
|
|
||||||
|
|||||||
-4
@@ -25,7 +25,3 @@ package some
|
|||||||
public class Some
|
public class Some
|
||||||
|
|
||||||
operator fun Some.get(s: String) {}
|
operator fun Some.get(s: String) {}
|
||||||
|
|
||||||
|
|
||||||
// FILE: first.after.kt
|
|
||||||
// Empty File
|
|
||||||
-4
@@ -25,7 +25,3 @@ package some
|
|||||||
public class Some
|
public class Some
|
||||||
|
|
||||||
operator fun Some.set(s: String) {}
|
operator fun Some.set(s: String) {}
|
||||||
|
|
||||||
|
|
||||||
// FILE: first.after.kt
|
|
||||||
// Empty File
|
|
||||||
@@ -25,23 +25,3 @@ public class Some
|
|||||||
|
|
||||||
fun Some.invoke(s: String) {}
|
fun Some.invoke(s: String) {}
|
||||||
//-----------------------
|
//-----------------------
|
||||||
|
|
||||||
|
|
||||||
// FILE: first.after.kt
|
|
||||||
// "Import" "true"
|
|
||||||
// ERROR: Expression 'Some()' of type 'Some' cannot be invoked as a function. The function 'invoke()' is not found
|
|
||||||
// ACTION: Create extension function 'invoke'
|
|
||||||
// ACTION: Create member function 'invoke'
|
|
||||||
|
|
||||||
|
|
||||||
package testing
|
|
||||||
|
|
||||||
import some.Some
|
|
||||||
import some.invoke
|
|
||||||
|
|
||||||
fun testing() {
|
|
||||||
<caret>Some()("str")
|
|
||||||
}
|
|
||||||
//-----------------------
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,16 +18,3 @@ class Foo {
|
|||||||
fun foobar() {
|
fun foobar() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//FILE: main.after.kt
|
|
||||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportMemberFix" "false"
|
|
||||||
// ERROR: Unresolved reference: foobar
|
|
||||||
// ACTION: Create function 'foobar'
|
|
||||||
// ACTION: Rename reference
|
|
||||||
|
|
||||||
//KT-9009
|
|
||||||
|
|
||||||
|
|
||||||
fun f() {
|
|
||||||
foobar<caret>()
|
|
||||||
}
|
|
||||||
@@ -19,17 +19,3 @@ package bar
|
|||||||
class Foo {
|
class Foo {
|
||||||
var foobar = "foobar"
|
var foobar = "foobar"
|
||||||
}
|
}
|
||||||
|
|
||||||
//FILE: main.after.kt
|
|
||||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportMemberFix" "false"
|
|
||||||
// ERROR: Unresolved reference: foobar
|
|
||||||
// ACTION: Create local variable 'foobar'
|
|
||||||
// ACTION: Create property 'foobar'
|
|
||||||
// ACTION: Rename reference
|
|
||||||
|
|
||||||
//KT-9009
|
|
||||||
|
|
||||||
|
|
||||||
fun f() {
|
|
||||||
foobar<caret> = "barfoo"
|
|
||||||
}
|
|
||||||
@@ -19,17 +19,3 @@ package bar
|
|||||||
public class Foo {
|
public class Foo {
|
||||||
public foobar = "foobar"
|
public foobar = "foobar"
|
||||||
}
|
}
|
||||||
|
|
||||||
//FILE: main.after.kt
|
|
||||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportMemberFix" "false"
|
|
||||||
// ERROR: Unresolved reference: foobar
|
|
||||||
// ACTION: Create local variable 'foobar'
|
|
||||||
// ACTION: Create property 'foobar'
|
|
||||||
// ACTION: Rename reference
|
|
||||||
|
|
||||||
//KT-9009
|
|
||||||
|
|
||||||
|
|
||||||
fun f() {
|
|
||||||
foobar<caret> = "barfoo"
|
|
||||||
}
|
|
||||||
-13
@@ -19,16 +19,3 @@ public class Foo {
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//FILE: main.after.kt
|
|
||||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportMemberFix" "false"
|
|
||||||
// ERROR: Unresolved reference: foobar
|
|
||||||
// ACTION: Create function 'foobar'
|
|
||||||
// ACTION: Rename reference
|
|
||||||
|
|
||||||
//KT-9009
|
|
||||||
|
|
||||||
|
|
||||||
fun f() {
|
|
||||||
foobar<caret>()
|
|
||||||
}
|
|
||||||
@@ -17,16 +17,3 @@ package bar
|
|||||||
|
|
||||||
fun foobar() {
|
fun foobar() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//FILE: main.after.kt
|
|
||||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportMemberFix" "false"
|
|
||||||
// ERROR: Unresolved reference: foobar
|
|
||||||
// ACTION: Create function 'foobar'
|
|
||||||
// ACTION: Rename reference
|
|
||||||
|
|
||||||
//KT-9009
|
|
||||||
|
|
||||||
|
|
||||||
fun f() {
|
|
||||||
foobar<caret>()
|
|
||||||
}
|
|
||||||
-5
@@ -23,8 +23,3 @@ public class Some
|
|||||||
|
|
||||||
fun Some.component1() = 1
|
fun Some.component1() = 1
|
||||||
operator fun Some.component2() = 3
|
operator fun Some.component2() = 3
|
||||||
//-----------------------
|
|
||||||
|
|
||||||
|
|
||||||
// FILE: first.after.kt
|
|
||||||
// -- Empty file --
|
|
||||||
@@ -302,6 +302,9 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer
|
|||||||
KotlinTestUtils.assertEqualsToFile(new File(beforeFileName), actualTestFile.toString());
|
KotlinTestUtils.assertEqualsToFile(new File(beforeFileName), actualTestFile.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
assertNull(".after file should not exist", afterFile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (ComparisonFailure e) {
|
catch (ComparisonFailure e) {
|
||||||
throw e;
|
throw e;
|
||||||
|
|||||||
Reference in New Issue
Block a user