Name suggester + tests.

Fixed commented introduce variable tests.
This commit is contained in:
Alefas
2012-02-07 18:22:27 +04:00
parent ddbd86cdf5
commit 1d88960a19
20 changed files with 431 additions and 44 deletions
@@ -1,10 +1,10 @@
open class A {
open class A() {
{
do <selection>1</selection> while (true)
}
}
/*
open class A {
open class A() {
{
do {
val i = 1
@@ -1,5 +0,0 @@
fun x(x: Int = <selection>1</selection>) {}
/*
val i = 1
fun x(x: Int = i) {}
*/
@@ -1,13 +1,13 @@
fun a() {
when (1) {
is 1 -> <selection>1</selection>
is 1 -> <selection>2</selection>
}
}
/*
fun a() {
when (1) {
is 1 -> {
val i = 1
val i = 2
}
}
}
@@ -1,10 +1,10 @@
open class A {
open class A() {
{
while (true) <selection>1</selection>
}
}
/*
open class A {
open class A() {
{
while (true) {
val i = 1
@@ -0,0 +1,9 @@
class A() {}
fun a() {
<selection>Array(2) {A()}</selection>
}
/*
array
arrayOfAs
*/
@@ -0,0 +1,7 @@
fun a() {
<selection>Array(2) {"text"}</selection>
}
/*
array
strings
*/
@@ -0,0 +1,10 @@
fun currentTimeMillis(): Long = 1
fun a() {
<selection>currentTimeMillis()</selection>
}
/*
currentTimeMillis
l
millis
timeMillis
*/
@@ -0,0 +1,11 @@
class StringBuilder(s: String) {}
fun a() {
val s = StringBuilder("text")
<selection>s</selection>
}
/*
builder
s
stringBuilder
*/
@@ -0,0 +1,9 @@
fun a() {
val x: Long = 1
<selection>x</selection>
}
/*
l
x
*/
@@ -0,0 +1,10 @@
fun a() {
val aBcD = 1
<selection>aBcD</selection>
}
/*
aBcD
bcD
d
i
*/
@@ -0,0 +1,6 @@
fun a() {
<selection>"test"</selection>
}
/*
s
*/