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();
|
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() {
|
public void testIter() {
|
||||||
start();
|
start();
|
||||||
|
|
||||||
assertStringItems("args", "collection", "myList", "str", "stream");
|
assertStringItems("args", "collection", "myList", "str", "stream");
|
||||||
type("args");
|
type("args");
|
||||||
nextTab();
|
nextTab(2);
|
||||||
nextTab();
|
|
||||||
|
|
||||||
checkAfter();
|
checkAfter();
|
||||||
}
|
}
|
||||||
@@ -91,6 +117,12 @@ public class LiveTemplatesTest extends LightCodeInsightFixtureTestCase {
|
|||||||
getTemplateState().nextTab();
|
getTemplateState().nextTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void nextTab(int times) {
|
||||||
|
for (int i = 0; i < times; i++) {
|
||||||
|
nextTab();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private TemplateState getTemplateState() {
|
private TemplateState getTemplateState() {
|
||||||
return TemplateManagerImpl.getTemplateState(myFixture.getEditor());
|
return TemplateManagerImpl.getTemplateState(myFixture.getEditor());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user