diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-12 16:17:12 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-12 16:17:12 +0800 |
commit | 9cae97d4433181150742b2bc946898c321d5bf08 (patch) | |
tree | e26d37aec51fa2c368ca250fe91d8167fbbf0651 /server/test | |
parent | d1d6456378664a36a99094ddeb6b0c28f0449d72 (diff) | |
download | lua-language-server-9cae97d4433181150742b2bc946898c321d5bf08.zip |
删掉没用的代码
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/main.lua | 2 | ||||
-rw-r--r-- | server/test/type_inference/init.lua | 12 |
2 files changed, 4 insertions, 10 deletions
diff --git a/server/test/main.lua b/server/test/main.lua index 690c8d3c..67e2da0a 100644 --- a/server/test/main.lua +++ b/server/test/main.lua @@ -24,9 +24,9 @@ local function main() end test 'vm' - --test 'type_inference' test 'definition' test 'diagnostics' + test 'type_inference' test 'find_lib' print('测试完成') diff --git a/server/test/type_inference/init.lua b/server/test/type_inference/init.lua index 59993b14..dc1a4099 100644 --- a/server/test/type_inference/init.lua +++ b/server/test/type_inference/init.lua @@ -10,16 +10,10 @@ function TEST(res) local pos = (start + finish) // 2 + 1 local new_script = script:gsub('<[!?]', ' '):gsub('[!?]>', ' ') local ast = parser:ast(new_script) - assert(ast) - local results = matcher.compile(ast) - assert(results) - matcher.typeInference(results) - local result = matcher.findResult(results, pos) + local vm = matcher.vm(ast) + assert(vm) + local result = matcher.findResult(vm.results, pos) assert(result) - local var = result.var - assert(var) - assert(var.group) - assert(var.group.type == res) end end |