(t *testing.T, s string, trace bool)
| 25 | } |
| 26 | |
| 27 | func testStringHelper(t *testing.T, s string, trace bool) { |
| 28 | l := NewState() |
| 29 | OpenLibraries(l) |
| 30 | LoadString(l, s) |
| 31 | if trace { |
| 32 | SetDebugHook(l, func(state *State, ar Debug) { |
| 33 | ci := state.callInfo |
| 34 | p := state.prototype(ci) |
| 35 | println(stack(state.stack[ci.base():state.top])) |
| 36 | println(ci.code[ci.savedPC].String(), p.source, p.lineInfo[ci.savedPC]) |
| 37 | }, MaskCount, 1) |
| 38 | } |
| 39 | l.Call(0, 0) |
| 40 | } |
| 41 | |
| 42 | func TestProtectedCall(t *testing.T) { |
| 43 | l := NewState() |
no test coverage detected