Intentions: Implement intention to replace camel-case test function name with a space-separated one

#KT-12489 Fixed
(cherry picked from commit 21e24a1)
This commit is contained in:
Alexey Sedunov
2016-06-20 20:09:18 +03:00
parent d9698dfa4d
commit c50f38aa52
15 changed files with 235 additions and 0 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.intentions.ConvertCamelCaseTestFunctionToSpacedIntention
@@ -0,0 +1,12 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
// ERROR: Cannot access class 'java.lang.Class'. Check your module classpath for missing or conflicting dependencies
// ERROR: This annotation is not applicable to target 'member function'
import org.junit.Test
class A {
@Test fun <caret>testTwoPlusTwoEqualsFour() {}
}
fun test() {
A().testTwoPlusTwoEqualsFour()
}
@@ -0,0 +1,4 @@
// IS_APPLICABLE: false
class A {
val <caret>foo = 1
}
@@ -0,0 +1,12 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
// ERROR: Cannot access class 'java.lang.Class'. Check your module classpath for missing or conflicting dependencies
// ERROR: This annotation is not applicable to target 'member function'
import org.junit.Test
class A {
@Test fun <caret>`testTwo + Two==Four`() {}
}
fun test() {
A().`testTwo + Two==Four`()
}
@@ -0,0 +1,4 @@
// IS_APPLICABLE: false
class A {
<caret>fun foo() {}
}
@@ -0,0 +1,4 @@
// IS_APPLICABLE: false
class A {
fun <caret>foo() {}
}
@@ -0,0 +1,10 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
// ERROR: Cannot access class 'java.lang.Class'. Check your module classpath for missing or conflicting dependencies
// ERROR: This annotation is not applicable to target 'member function'
// IS_APPLICABLE: false
import org.junit.Test
class A {
@Test fun `<caret>foo bar`() {}
}