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

Function expectErrorFromUndump

undump_test.go:91–97  ·  view source on GitHub ↗
(expected error, data interface{}, t *testing.T)

Source from the content-addressed store, hash-verified

89}
90
91func expectErrorFromUndump(expected error, data interface{}, t *testing.T) {
92 l := NewState()
93 _, err := l.undump(readerOn(data, t), "test")
94 if err != expected {
95 t.Error("expected", expected, "but got", err)
96 }
97}
98
99func readerOn(data interface{}, t *testing.T) io.Reader {
100 buf := new(bytes.Buffer)

Callers 5

TestAllHeaderNoFunFunction · 0.85
TestWrongEndianFunction · 0.85
TestWrongVersionFunction · 0.85
TestWrongNumberSizeFunction · 0.85
TestCorruptTailFunction · 0.85

Calls 4

undumpMethod · 0.95
NewStateFunction · 0.85
readerOnFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected