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:
parent
abbc46877b
commit
74dae4ec17
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user