diff options
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/crossfile/definition.lua | 4 | ||||
-rw-r--r-- | server/test/crossfile/hover.lua | 2 | ||||
-rw-r--r-- | server/test/definition/init.lua | 4 | ||||
-rw-r--r-- | server/test/find_lib/init.lua | 2 | ||||
-rw-r--r-- | server/test/hover/init.lua | 2 | ||||
-rw-r--r-- | server/test/type_inference/init.lua | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/server/test/crossfile/definition.lua b/server/test/crossfile/definition.lua index 458154bc..3fd8d3fe 100644 --- a/server/test/crossfile/definition.lua +++ b/server/test/crossfile/definition.lua @@ -63,8 +63,8 @@ function TEST(datas) local sourceVM = lsp:getVM(sourceUri) assert(sourceVM) local sourcePos = (sourceList[1][1] + sourceList[1][2]) // 2 - local result = core.findResult(sourceVM, sourcePos) - local positions = core.definition(sourceVM, result, lsp) + local source = core.findSource(sourceVM, sourcePos) + local positions = core.definition(sourceVM, source, lsp) assert(positions and positions[1]) local start, finish, valueUri = positions[1][1], positions[1][2], positions[1][3] assert(valueUri == targetUri) diff --git a/server/test/crossfile/hover.lua b/server/test/crossfile/hover.lua index a4479280..03f3c6d5 100644 --- a/server/test/crossfile/hover.lua +++ b/server/test/crossfile/hover.lua @@ -72,7 +72,7 @@ function TEST(data) local sourceVM = lsp:loadVM(sourceUri) assert(sourceVM) local sourcePos = (sourceList[1][1] + sourceList[1][2]) // 2 - local result, source = core.findResult(sourceVM, sourcePos) + local result, source = core.findSource(sourceVM, sourcePos) local hover = core.hover(result, source, lsp) assert(hover) if data.hover.description then diff --git a/server/test/definition/init.lua b/server/test/definition/init.lua index 19e353cc..f2b2833c 100644 --- a/server/test/definition/init.lua +++ b/server/test/definition/init.lua @@ -45,8 +45,8 @@ function TEST(script) local vm = buildVM(ast) assert(vm) - local result = core.findResult(vm, pos) - local positions = core.definition(vm, result, nil) + local source = core.findSource(vm, pos) + local positions = core.definition(vm, source, nil) if positions then assert(founded(target, positions)) else diff --git a/server/test/find_lib/init.lua b/server/test/find_lib/init.lua index e55b33af..eb4686bc 100644 --- a/server/test/find_lib/init.lua +++ b/server/test/find_lib/init.lua @@ -13,7 +13,7 @@ function TEST(fullkey) assert(ast) local vm = core.vm(ast) assert(vm) - local result = core.findResult(vm, pos) + local result = core.findSource(vm, pos) local _, name = core.findLib(result) assert(name == fullkey) end diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua index ca8cf823..cda10baa 100644 --- a/server/test/hover/init.lua +++ b/server/test/hover/init.lua @@ -12,7 +12,7 @@ function TEST(script) local ast = parser:ast(new_script) local vm = core.vm(ast) assert(vm) - local result, source = core.findResult(vm, pos) + local result, source = core.findSource(vm, pos) local hover = core.hover(result, source) if expect then assert(hover) diff --git a/server/test/type_inference/init.lua b/server/test/type_inference/init.lua index 0962c20d..ef0ef001 100644 --- a/server/test/type_inference/init.lua +++ b/server/test/type_inference/init.lua @@ -12,7 +12,7 @@ function TEST(res) local ast = parser:ast(new_script) local vm = core.vm(ast) assert(vm) - local result = core.findResult(vm, pos) + local result = core.findSource(vm, pos) assert(result) assert(res == result.value:getType()) end |