Refactor and generate tests on JetPositionManager

This commit is contained in:
Alexander Udalov
2014-09-24 12:11:51 +04:00
parent 9f7979d0ce
commit b5832d2656
29 changed files with 235 additions and 174 deletions
@@ -0,0 +1,3 @@
fun foo() {
"" // _DefaultPackage-_DefaultPackage-
}
@@ -0,0 +1,7 @@
class A {
fun foo() {
{
"" // A$foo$1
}()
}
}
@@ -0,0 +1,7 @@
package insertInBlock
fun foo() {
val lambda = {
val a = 1 // insertInBlock/InsertInBlockPackage$foo$lambda$1
}()
}
@@ -0,0 +1,9 @@
class A {
val x = go() // A
fun go() = 4 // A
fun foo() {
"" // A
}
}
@@ -0,0 +1,7 @@
class A {
class object {
fun foo() {
"" // A$object
}
}
}
@@ -0,0 +1,5 @@
enum class E {
fun foo() {
"" // E
}
}
@@ -0,0 +1,8 @@
package a
class A {
}
fun A.foo() {
"" // a/APackage-extensionFunction-
}
@@ -0,0 +1,10 @@
class A {
fun foo() {
{
fun innerFoo() {
"" // A$foo$1$1
}
innerFoo()
}()
}
}
@@ -0,0 +1,10 @@
class A {
fun foo() {
val a = {
fun innerFoo() {
val b = {} // A$foo$a$1$1
}
innerFoo()
}()
}
}
@@ -0,0 +1,7 @@
class A {
class B {
fun foo() {
"" // A$B
}
}
}
@@ -0,0 +1,8 @@
package test
fun foo(): String {
fun bar(): String {
return "" // test/TestPackage$foo$1
}
return bar()
}
@@ -0,0 +1,5 @@
package test
fun foo() {
"" // test/TestPackage-a-
}
@@ -0,0 +1,5 @@
package test
fun bar() {
foo(); // test/TestPackage-b-
}
@@ -0,0 +1,5 @@
package test
fun foo() {
"" // test/TestPackage-a-
}
@@ -0,0 +1,5 @@
package test
fun bar() {
"" // test/TestPackage-a-
}
@@ -0,0 +1,5 @@
package test
fun baz() {
"" // test/TestPackage-a-
}
@@ -0,0 +1,5 @@
package test
fun quux() {
"" // test/TestPackage-a-
}
@@ -0,0 +1,7 @@
object Obj {
val x = foo() // Obj
fun foo(): Int {
return 0 // Obj
}
}
@@ -0,0 +1,9 @@
class A {
fun foo() {
object {
fun bar() {
"" // A$foo$1
}
}
}
}
@@ -0,0 +1,5 @@
package test
fun foo() {
"" // test/TestPackage-package
}
@@ -0,0 +1,4 @@
class A {
val foo: Int
get() = 5 // A
}
@@ -0,0 +1,3 @@
class A {
val foo: Int = 5 // A
}
@@ -0,0 +1,3 @@
package prop
val foo: Int = 5 // prop/PropPackage-topLevelPropertyInitializer
@@ -0,0 +1,5 @@
trait A {
fun foo() {
"" // A$$TImpl
}
}
@@ -0,0 +1,2 @@
class A { fun f() {} } // A
class B { fun g() {} } // B