Support CONFIGURE_LIBRARY directive in intention tests

Also restore tests for ConvertCamelCaseTestFunctionToSpaced
and apply fix for KT-18375
This commit is contained in:
Dmitry Jemerov
2017-06-14 12:09:46 +02:00
parent 4fa75256b7
commit 0e2bdb8e66
12 changed files with 92 additions and 51 deletions
@@ -0,0 +1,10 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import org.junit.Test
class A {
@Test fun <caret>testTwoPlusTwoEqualsFour() {}
}
fun test() {
A().testTwoPlusTwoEqualsFour()
}
@@ -0,0 +1,10 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import org.junit.Test
class A {
@Test fun `test two plus two equals four`() {}
}
fun test() {
A().`test two plus two equals four`()
}
@@ -1,12 +0,0 @@
// 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,10 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import org.junit.Test
class A {
@Test fun <caret>`testTwo + Two==Four`() {}
}
fun test() {
A().`testTwo + Two==Four`()
}
@@ -0,0 +1,10 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import org.junit.Test
class A {
@Test fun `test two + two == four`() {}
}
fun test() {
A().`test two + two == four`()
}
@@ -1,12 +0,0 @@
// 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,8 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
// IS_APPLICABLE: false
import org.junit.Test
class A {
@Test fun `<caret>foo bar`() {}
}
@@ -1,10 +0,0 @@
// 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`() {}
}