MCPcopy Index your code
hub / github.com/yuin/gopher-lua / errorIfFalse

Function errorIfFalse

testutils_test.go:22–30  ·  view source on GitHub ↗
(t *testing.T, cond bool, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

20}
21
22func errorIfFalse(t *testing.T, cond bool, msg string, args ...interface{}) {
23 if !cond {
24 if len(args) > 0 {
25 t.Errorf("%v %v", positionString(1), fmt.Sprintf(msg, args...))
26 } else {
27 t.Errorf("%v %v", positionString(1), msg)
28 }
29 }
30}
31
32func errorIfNotNil(t *testing.T, v1 interface{}) {
33 if fmt.Sprint(v1) != "<nil>" {

Callers 14

TestToTableFunction · 0.85
TestToFunctionFunction · 0.85
TestToUserDataFunction · 0.85
TestToChannelFunction · 0.85
TestPCallFunction · 0.85
TestCoroutineApi1Function · 0.85
TestContextTimeoutFunction · 0.85
TestContextCancelFunction · 0.85
TestContextWithCroutineFunction · 0.85
TestPCallAfterFailFunction · 0.85
TestRegistryAutoGrowFunction · 0.85

Calls 1

positionStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…