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

Function TEST_F

engine/script/src/test/test_script_zlib.cpp:25–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23};
24
25TEST_F(ScriptZlibTest, TestZlib)
26{
27 int top = lua_gettop(L);
28
29 ASSERT_TRUE(RunFile(L, "test_zlib.luac"));
30
31 lua_getglobal(L, "functions");
32 ASSERT_EQ(LUA_TTABLE, lua_type(L, -1));
33 lua_getfield(L, -1, "test_zlib");
34 ASSERT_EQ(LUA_TFUNCTION, lua_type(L, -1));
35 int result = dmScript::PCall(L, 0, LUA_MULTRET);
36 if (result == LUA_ERRRUN)
37 {
38 ASSERT_TRUE(false);
39 }
40 else
41 {
42 ASSERT_EQ(0, result);
43 }
44 lua_pop(L, 1);
45
46 ASSERT_EQ(top, lua_gettop(L));
47}
48
49extern "C" void dmExportedSymbols();
50

Callers

nothing calls this directly

Calls 5

lua_gettopFunction · 0.85
lua_typeFunction · 0.85
lua_getfieldFunction · 0.85
PCallFunction · 0.85
RunFileFunction · 0.70

Tested by

no test coverage detected