Find usages test: Move test data out of code

This commit is contained in:
Alexey Sedunov
2013-08-09 14:44:40 +04:00
parent 341174534a
commit ea7a377bea
37 changed files with 449 additions and 241 deletions
@@ -0,0 +1 @@
Field declaration (4: 13) private Server myServer;
@@ -0,0 +1,12 @@
Class/object property type (6: 21) var nextServer: Server? = null
Function return types (14: 26) fun getNextServer(): Server? {
Function return types (32: 21) fun Any.asServer(): Server? {
Import directive (3: 15) import server.Server
Local variable type (10: 21) val server: Server = s
Nested class/object (7: 16) val name = Server.NAME
Parameter type (24: 19) fun Client.bar(s: Server) {
Parameter type (9: 16) fun foo(s: Server) {
Super type qualifier (19: 15) super<Server>.work()
Supertype (5: 15) class Client: Server {
Target type of 'as' operation (33: 40) return if (this is Server) this as Server else null
Target type of 'is' operation (33: 24) return if (this is Server) this as Server else null
@@ -0,0 +1,2 @@
Annotation (5: 1) X("")
Import directive (3: 15) import server.X
@@ -0,0 +1,4 @@
Import directive (3: 15) import server.Data
Type argument (9: 16) val c = Client<Data>()
Type constraint (5: 17) class Client<T: Data, X> where X: Data {
Type constraint (5: 35) class Client<T: Data, X> where X: Data {
@@ -0,0 +1 @@
Unclassified usage (6: 16) server.processRequest();
@@ -0,0 +1,3 @@
Callable reference (6: 23) val methodRef = ::processRequest()
Function call (10: 9) processRequest()
Import directive (3: 15) import server.processRequest
@@ -0,0 +1,2 @@
Class static member access (7: 28) println("foo = " + O.instance$.getFoo())
Usage in import (3: 15) import server.O
@@ -0,0 +1,3 @@
Import directive (3: 15) import server.O
Receiver (7: 26) println("foo = ${O.foo}")
Value read (8: 19) val obj = O
@@ -0,0 +1 @@
Unclassified usage (7: 40) println("foo = " + O.instance$.getFoo())
@@ -0,0 +1,3 @@
Import directive (3: 15) import server.foo
Receiver (8: 35) println("length: ${server.foo.length()}")
Selector (7: 33) println("foo = ${server.foo}")
@@ -0,0 +1 @@
Instantiation (5: 9) val a = Test()
@@ -0,0 +1 @@
Usage in extends/implements clause (1: 29) public class Client extends Foo {}