diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-05-12 16:59:54 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-05-12 16:59:54 +0800 |
commit | 9ca33e92200b9465ddf71f64edce61c2a1b6a2c2 (patch) | |
tree | 4c44e5861fb39bde58483aef06c1f895f0f161a3 /test | |
parent | 5f074dc6a601edd730b457f6004cffacfdb6d66a (diff) | |
download | lua-language-server-9ca33e92200b9465ddf71f64edce61c2a1b6a2c2.zip |
cleanup
Diffstat (limited to 'test')
-rw-r--r-- | test/type_inference/init.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index dc77e0f8..df8f4fe8 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -1,6 +1,7 @@ local files = require 'files' local vm = require 'vm' local guide = require 'parser.guide' +local infer = require 'core.infer' rawset(_G, 'TEST', true) @@ -29,7 +30,7 @@ function TEST(wanted) files.setText('', newScript) local source = getSource(pos) assert(source) - local result = vm.getInferType(source, 0) + local result = infer.searchAndViewInfers(source, 0) assert(wanted == result) end end @@ -139,10 +140,15 @@ TEST 'number' [[ ]] TEST 'tablelib' [[ +---@class tablelib +table = {} + <?table?>() ]] TEST 'string' [[ +_VERSION = 'Lua 5.4' + <?x?> = _VERSION ]] |