Added tests for exfun/exval/exvar.

This commit is contained in:
Evgeny Gerashchenko
2012-02-13 21:35:30 +04:00
parent bb06bcab6c
commit 1bd56b7121
7 changed files with 54 additions and 2 deletions
+3
View File
@@ -0,0 +1,3 @@
fun Int.foo(arg : Int) : Unit {
<caret>
}
+1
View File
@@ -0,0 +1 @@
<caret>
+4
View File
@@ -0,0 +1,4 @@
val Int.v : Int
get() {
<caret>
}
+1
View File
@@ -0,0 +1 @@
<caret>
+7
View File
@@ -0,0 +1,7 @@
var Int.v : Int
get() {
<caret>
}
set(value) {
}
+1
View File
@@ -0,0 +1 @@
<caret>
@@ -42,8 +42,7 @@ public class LiveTemplatesTest extends LightCodeInsightFixtureTestCase {
start();
assertStringItems("args", "x", "y");
type("y");
nextTab();
typeAndNext("y");
checkAfter();
}
@@ -79,6 +78,42 @@ public class LiveTemplatesTest extends LightCodeInsightFixtureTestCase {
checkAfter();
}
public void testExfun() {
start();
typeAndNext("Int");
typeAndNext("foo");
typeAndNext("arg : Int");
nextTab();
checkAfter();
}
public void testExval() {
start();
typeAndNext("Int");
nextTab();
typeAndNext("Int");
checkAfter();
}
public void testExvar() {
start();
typeAndNext("Int");
nextTab();
typeAndNext("Int");
checkAfter();
}
private void typeAndNext(String s) {
type(s);
nextTab();
}
public void testIter() {
start();