Added tests for fun0, fun1, fun2.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
fun foo() : Unit {
|
||||
<caret>
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<caret>
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(x : Any) : Unit {
|
||||
<caret>
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<caret>
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(x : Any, y : Any) : Unit {
|
||||
<caret>
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<caret>
|
||||
@@ -52,13 +52,39 @@ public class LiveTemplatesTest extends LightCodeInsightFixtureTestCase {
|
||||
paremeterless();
|
||||
}
|
||||
|
||||
public void testFun0() {
|
||||
start();
|
||||
|
||||
type("foo");
|
||||
nextTab(2);
|
||||
|
||||
checkAfter();
|
||||
}
|
||||
|
||||
public void testFun1() {
|
||||
start();
|
||||
|
||||
type("foo");
|
||||
nextTab(4);
|
||||
|
||||
checkAfter();
|
||||
}
|
||||
|
||||
public void testFun2() {
|
||||
start();
|
||||
|
||||
type("foo");
|
||||
nextTab(6);
|
||||
|
||||
checkAfter();
|
||||
}
|
||||
|
||||
public void testIter() {
|
||||
start();
|
||||
|
||||
assertStringItems("args", "collection", "myList", "str", "stream");
|
||||
type("args");
|
||||
nextTab();
|
||||
nextTab();
|
||||
nextTab(2);
|
||||
|
||||
checkAfter();
|
||||
}
|
||||
@@ -91,6 +117,12 @@ public class LiveTemplatesTest extends LightCodeInsightFixtureTestCase {
|
||||
getTemplateState().nextTab();
|
||||
}
|
||||
|
||||
private void nextTab(int times) {
|
||||
for (int i = 0; i < times; i++) {
|
||||
nextTab();
|
||||
}
|
||||
}
|
||||
|
||||
private TemplateState getTemplateState() {
|
||||
return TemplateManagerImpl.getTemplateState(myFixture.getEditor());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user