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

Function testNoPanicString

vm_test.go:16–25  ·  view source on GitHub ↗

Commented out to avoid a warning relating to the method not being used. Left here since it's useful for debugging. func traceString(t *testing.T, s string) { testStringHelper(t, s, true) }

(t *testing.T, s string)

Source from the content-addressed store, hash-verified

14//func traceString(t *testing.T, s string) { testStringHelper(t, s, true) }
15
16func testNoPanicString(t *testing.T, s string) {
17 defer func() {
18 if rc := recover(); rc != nil {
19 var buffer [8192]byte
20 t.Errorf("got panic %v; expected none", rc)
21 t.Logf("trace:\n%s", buffer[:runtime.Stack(buffer[:], false)])
22 }
23 }()
24 testStringHelper(t, s, false)
25}
26
27func testStringHelper(t *testing.T, s string, trace bool) {
28 l := NewState()

Callers 4

TestTailCallRecursiveFunction · 0.85
TestTailCallSameFnFunction · 0.85
TestNormalCallFunction · 0.85

Calls 1

testStringHelperFunction · 0.85

Tested by

no test coverage detected