Added test for closure template.
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
fun main(args : Array<String>) {
|
||||||
|
val someFun = {param -> param}<caret>
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fun main(args : Array<String>) {
|
||||||
|
val someFun = <caret>
|
||||||
|
}
|
||||||
@@ -109,9 +109,13 @@ public class LiveTemplatesTest extends LightCodeInsightFixtureTestCase {
|
|||||||
checkAfter();
|
checkAfter();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void typeAndNext(String s) {
|
public void testClosure() {
|
||||||
type(s);
|
start();
|
||||||
|
|
||||||
|
typeAndNext("param");
|
||||||
nextTab();
|
nextTab();
|
||||||
|
|
||||||
|
checkAfter();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIter() {
|
public void testIter() {
|
||||||
@@ -144,6 +148,11 @@ public class LiveTemplatesTest extends LightCodeInsightFixtureTestCase {
|
|||||||
myFixture.checkResultByFile(getTestName(true) + ".exp.kt");
|
myFixture.checkResultByFile(getTestName(true) + ".exp.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void typeAndNext(String s) {
|
||||||
|
type(s);
|
||||||
|
nextTab();
|
||||||
|
}
|
||||||
|
|
||||||
private void type(String s) {
|
private void type(String s) {
|
||||||
myFixture.type(s);
|
myFixture.type(s);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user