summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-21 17:58:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-21 17:58:25 +0800
commitb30e4ff8f33b504880066faea7143342e9aea4f2 (patch)
tree58f1b8bc7b67cccefe1609a66cbc4db8df1e13b5 /test
parent9b16225abb1562de8f8680406c783e1a46e1a44b (diff)
downloadlua-language-server-b30e4ff8f33b504880066faea7143342e9aea4f2.zip
pass tests
Diffstat (limited to 'test')
-rw-r--r--test/definition/luadoc.lua4
-rw-r--r--test/diagnostics/type-check.lua2
2 files changed, 6 insertions, 0 deletions
diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua
index 2d927016..afa53227 100644
--- a/test/definition/luadoc.lua
+++ b/test/definition/luadoc.lua
@@ -1,3 +1,5 @@
+local config = require "config.config"
+config.set(nil, 'Lua.type.castNumberToInteger', false)
TEST [[
---@class <!A!>
---@class B : <?A?>
@@ -919,3 +921,5 @@ f {
<!<?x?>!> = 1,
}
]]
+
+config.set(nil, 'Lua.type.castNumberToInteger', true)
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua
index c3bc3301..3aeca5d5 100644
--- a/test/diagnostics/type-check.lua
+++ b/test/diagnostics/type-check.lua
@@ -3,6 +3,7 @@ local config = require 'config'
config.add(nil, 'Lua.diagnostics.disable', 'unused-local')
config.add(nil, 'Lua.diagnostics.disable', 'unused-function')
config.add(nil, 'Lua.diagnostics.disable', 'undefined-global')
+config.set(nil, 'Lua.type.castNumberToInteger', false)
TEST [[
local x = 0
@@ -777,3 +778,4 @@ f(<!3!>)
config.remove(nil, 'Lua.diagnostics.disable', 'unused-local')
config.remove(nil, 'Lua.diagnostics.disable', 'unused-function')
config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global')
+config.set(nil, 'Lua.type.castNumberToInteger', true)