1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-12 03:00:30 +00:00

That's it, I'm adding pre-commit hooks

This commit is contained in:
Jonathan Coates 2021-04-28 08:19:09 +01:00
parent abbc46877b
commit 74dae4ec17
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ describe("Coroutines", function()
--- Run a function in a coroutine, "echoing" the yielded value back as the resumption value.
local function coroutine_echo(f)
local co = coroutine.create(f)
local result = {n = 0}
local result = { n = 0 }
while coroutine.status(co) ~= "dead" do
result = assert_resume(coroutine.resume(co, table.unpack(result, 1, result.n)))
end
@ -148,7 +148,7 @@ describe("Coroutines", function()
expect(y):eq(b)
return a.x < b.x
end
end,
}
local function create(val) return setmetatable({ x = val }, meta) end

View File

@ -2,7 +2,7 @@ describe("The VM", function()
it("allows unpacking a large number of values", function()
-- We don't allow arbitrarily many values, half a meg is probably fine.
-- I don't actually have any numbers on this - maybe we do need more?
local len = 2^19
local len = 2 ^ 19
local tbl = { (" "):rep(len):byte(1, -1) }
expect(#tbl):eq(len)
end)