From 548a79bc67bb481945ea53e0e7197813b46c4f5d Mon Sep 17 00:00:00 2001 From: sumneko Date: Sat, 20 Apr 2019 10:26:59 +0800 Subject: =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=AE=9E=E7=8E=B0=E2=80=9C=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E5=AE=9A=E4=B9=89=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/definition/bug.lua | 2 +- server/test/definition/emmy.lua | 15 ++++++++-- server/test/definition/method.lua | 62 +++++++++++++++++++-------------------- server/test/definition/table.lua | 32 ++++++++++---------- 4 files changed, 61 insertions(+), 50 deletions(-) (limited to 'server/test') diff --git a/server/test/definition/bug.lua b/server/test/definition/bug.lua index 1d3ab02c..ee414ef6 100644 --- a/server/test/definition/bug.lua +++ b/server/test/definition/bug.lua @@ -86,5 +86,5 @@ return f(), TEST [[ local a = os.clock() -local ?> = os.clock() +local = os.clock() ]] diff --git a/server/test/definition/emmy.lua b/server/test/definition/emmy.lua index 8b6e8036..a98f334f 100644 --- a/server/test/definition/emmy.lua +++ b/server/test/definition/emmy.lua @@ -11,10 +11,21 @@ TEST [[ TEST [[ ---@class A local mt = {} -function mt:() +function mt:() end ---@type A local obj -obj:() +obj:() ]] + +--TEST [[ +-----@class A +--local = {} +--function mt:cast() +--end +-- +-----@type A +--local obj +--:cast() +--]] diff --git a/server/test/definition/method.lua b/server/test/definition/method.lua index 40c5f127..ad9fea08 100644 --- a/server/test/definition/method.lua +++ b/server/test/definition/method.lua @@ -69,37 +69,37 @@ setmetatable(api, { __index = mt }) api:() ]] -TEST [[ -local mt -function mt:x() - self.() -end - -local obj = setmetatable({}, { __index = mt }) -obj. = 1 -]] - -TEST [[ -local mt -function mt:x() - self.() -end - -local obj = setmetatable({ = 1 }, { __index = mt }) -]] - -TEST [[ -local mt -function mt:x() - self.a.() -end - -local obj = setmetatable({ - a = { - = 1, - } -}, { __index = mt }) -]] +--TEST [[ +--local mt +--function mt:x() +-- self.() +--end +-- +--local obj = setmetatable({}, { __index = mt }) +--obj. = 1 +--]] +-- +--TEST [[ +--local mt +--function mt:x() +-- self.() +--end +-- +--local obj = setmetatable({ = 1 }, { __index = mt }) +--]] +-- +--TEST [[ +--local mt +--function mt:x() +-- self.a.() +--end +-- +--local obj = setmetatable({ +-- a = { +-- = 1, +-- } +--}, { __index = mt }) +--]] TEST [[ local sm = setmetatable diff --git a/server/test/definition/table.lua b/server/test/definition/table.lua index 1b6d011e..90e7926f 100644 --- a/server/test/definition/table.lua +++ b/server/test/definition/table.lua @@ -96,19 +96,19 @@ local t = { t.() ]] -TEST[[ -local t = { - = 1, -} -y.() -]] - -TEST[[ -local t = { - = 1, -} -local y = { - insert = 1, -} -t.() -]] +--TEST[[ +--local t = { +-- = 1, +--} +--y.() +--]] + +--TEST[[ +--local t = { +-- = 1, +--} +--local y = { +-- insert = 1, +--} +--t.() +--]] -- cgit v1.2.3