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

Function TestTailCallRecursive

vm_test.go:170–177  ·  view source on GitHub ↗

TestTailCallRecursive tests for failures where both the callee and caller are making a tailcall.

(t *testing.T)

Source from the content-addressed store, hash-verified

168
169// TestTailCallRecursive tests for failures where both the callee and caller are making a tailcall.
170func TestTailCallRecursive(t *testing.T) {
171 s := `function tailcall(n, m)
172 if n > m then return n end
173 return tailcall(n + 1, m)
174 end
175 return tailcall(0, 5)`
176 testNoPanicString(t, s)
177}
178
179// TestTailCallRecursiveDiffFn tests for failures where only the caller is making a tailcall.
180func TestTailCallRecursiveDiffFn(t *testing.T) {

Callers

nothing calls this directly

Calls 1

testNoPanicStringFunction · 0.85

Tested by

no test coverage detected