diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-16 16:32:53 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-16 16:32:53 +0800 |
commit | 4cff67f7bee4304aecd1c4ce6f142eb030412bcf (patch) | |
tree | 5fca00cc728b7ef90d81f61f30b76f9ac3246279 /server/test | |
parent | 6e92a326b61686cb029ef773128a6040b7aa6125 (diff) | |
download | lua-language-server-4cff67f7bee4304aecd1c4ce6f142eb030412bcf.zip |
亲自指定参数位置
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/signature/init.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/server/test/signature/init.lua b/server/test/signature/init.lua index 0f16af91..9096c826 100644 --- a/server/test/signature/init.lua +++ b/server/test/signature/init.lua @@ -19,7 +19,8 @@ function TEST(script) local arg = hover.argLabel assert(expect.label == label) - assert(expect.arg == arg) + assert(expect.arg[1] == arg[1]) + assert(expect.arg[2] == arg[2]) else assert(expect == nil) end @@ -34,7 +35,7 @@ x(@ ]] { label = "function x(a: any, b: any)", - arg = 'a: any' + arg = {12, 17}, } TEST [[ @@ -45,7 +46,7 @@ x(@) ]] { label = "function x(a: any, b: any)", - arg = 'a: any' + arg = {12, 17}, } TEST [[ @@ -56,7 +57,7 @@ x(xxx@) ]] { label = "function x(a: any, b: any)", - arg = 'a: any' + arg = {12, 17}, } TEST [[ @@ -67,7 +68,7 @@ x(xxx, @) ]] { label = "function x(a: any, b: any)", - arg = 'b: any' + arg = {20, 25}, } TEST [[ @@ -78,7 +79,7 @@ mt:f(@ ]] { label = 'function mt:f(a: any)', - arg = 'a: any' + arg = {15, 20}, } TEST [[ @@ -89,7 +90,7 @@ TEST [[ function *string:sub(i: integer [, j: integer(-1)]) -> string ]], - arg = 'i: integer' + arg = {22, 31}, } TEST [[ |