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

Function TEST_F

engine/script/src/test/test_script_bitop.cpp:28–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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