From 9ca33e92200b9465ddf71f64edce61c2a1b6a2c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 12 May 2021 16:59:54 +0800 Subject: cleanup --- test/type_inference/init.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test') 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 = {} + () ]] TEST 'string' [[ +_VERSION = 'Lua 5.4' + = _VERSION ]] -- cgit v1.2.3