MCPcopy Create free account
hub / github.com/Shopify/goluago / openTestingLibrary

Function openTestingLibrary

pkg/testing/testing.go:44–58  ·  view source on GitHub ↗
(l *lua.State, t *testing.T)

Source from the content-addressed store, hash-verified

42}
43
44func openTestingLibrary(l *lua.State, t *testing.T) {
45 open := func(l *lua.State) int {
46 lua.NewLibrary(l, []lua.RegistryFunction{
47 {"error", error_(t)},
48 {"errorf", errorf(t)},
49 {"fatal", fatal(t)},
50 {"fatalf", fatalf(t)},
51 {"log", log(t)},
52 {"logf", logf(t)},
53 })
54 return 1
55 }
56 lua.Require(l, "goluago/testing", open, false)
57 l.Pop(1)
58}
59
60func error_(t *testing.T) lua.Function {
61 return func(l *lua.State) int {

Callers 1

runLuaTestFunction · 0.85

Calls 6

error_Function · 0.85
errorfFunction · 0.85
fatalFunction · 0.85
fatalfFunction · 0.85
logFunction · 0.85
logfFunction · 0.85

Tested by

no test coverage detected