MCPcopy Index your code
hub / github.com/Shopify/go-lua / TestVarArgMeta

Function TestVarArgMeta

vm_test.go:203–210  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

201}
202
203func TestVarArgMeta(t *testing.T) {
204 s := `function f(t, ...) return t, {...} end
205 local a = setmetatable({}, {__call = f})
206 local x, y = a(table.unpack{"a", 1})
207 assert(#x == 0)
208 assert(#y == 2 and y[1] == "a" and y[2] == 1)`
209 testString(t, s)
210}
211
212func TestCanRemoveNilObjectFromStack(t *testing.T) {
213 defer func() {

Callers

nothing calls this directly

Calls 1

testStringFunction · 0.85

Tested by

no test coverage detected