MCPcopy Create free account
hub / github.com/defold/defold / UserdataErrorFunc

Function UserdataErrorFunc

engine/script/src/test/test_script_lua.cpp:501–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501static int UserdataErrorFunc(lua_State* L) {
502 // This simulates calling error() from Lua with userdata
503 lua_getglobal(L, "error");
504 dmScript::PushHash(L, dmHashString64("test_userdata_error"));
505 lua_call(L, 1, 0);
506 return 0; // Never reached
507}
508
509TEST_F(ScriptTestLua, TestUserdataError)
510{

Callers

nothing calls this directly

Calls 2

PushHashFunction · 0.85
lua_callFunction · 0.85

Tested by

no test coverage detected