summaryrefslogtreecommitdiff
path: root/server/test/references/init.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-22 20:18:27 +0800
committersumneko <sumneko@hotmail.com>2019-04-22 20:18:27 +0800
commit659cc0e395719b2816615f1f8efc750292105144 (patch)
tree27546a483adf6353ee9d8ceff51b9c2e8646440f /server/test/references/init.lua
parent57eefd5142fab69c1e575917945fd3aded42f5ca (diff)
downloadlua-language-server-659cc0e395719b2816615f1f8efc750292105144.zip
更新 EmmyTypeUnit
Diffstat (limited to 'server/test/references/init.lua')
-rw-r--r--server/test/references/init.lua30
1 files changed, 18 insertions, 12 deletions
diff --git a/server/test/references/init.lua b/server/test/references/init.lua
index 782007f3..d1eab422 100644
--- a/server/test/references/init.lua
+++ b/server/test/references/init.lua
@@ -43,7 +43,7 @@ function TEST(script)
local vm = buildVM(ast)
assert(vm)
- local positions = core.references(vm, pos, 'reference')
+ local positions = core.definition(vm, pos, 'reference')
if positions then
assert(founded(target, positions))
else
@@ -52,13 +52,13 @@ function TEST(script)
end
TEST [[
-local <!a!> = 1
-<?a?> = <?a?>
+local <?a?> = 1
+<!a!> = <!a!>
]]
TEST [[
-t.<!a!> = 1
-t.<?a?> = t.<?a?>
+t.<?a?> = 1
+t.<!a!> = t.<!a!>
]]
TEST [[
@@ -68,8 +68,8 @@ goto <?LABEL?>
TEST [[
local a = 1
-local <!a!> = 1
-<?a?> = <?a?>
+local <?a?> = 1
+<!a!> = <!a!>
]]
TEST [[
@@ -101,8 +101,14 @@ function table.<?dump?>()
end
]]
---TEST [[
------@class <?Class?>
------@type <!Class!>
------@type <!Class!>
---]]
+TEST [[
+---@class <!Class!>
+---@type <?Class?>
+---@type <!Class!>
+]]
+
+TEST [[
+---@class <?Class?>
+---@type <!Class!>
+---@type <!Class!>
+]]