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

Function TestCanRemoveNilObjectFromStack

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

Source from the content-addressed store, hash-verified

210}
211
212func TestCanRemoveNilObjectFromStack(t *testing.T) {
213 defer func() {
214 if r := recover(); r != nil {
215 t.Fatalf("failed to remove `nil`, %v", r)
216 }
217 }()
218
219 l := NewState()
220 l.PushString("hello")
221 l.Remove(-1)
222 l.PushNil()
223 l.Remove(-1)
224}
225
226func TestTableUserdataEquality(t *testing.T) {
227 const s = `return function(x)

Callers

nothing calls this directly

Calls 4

PushStringMethod · 0.95
RemoveMethod · 0.95
PushNilMethod · 0.95
NewStateFunction · 0.85

Tested by

no test coverage detected