#include #include #include #include "test/lily-test.h" #include "import.test.h" void mock_push_mesh(lua_State *L, struct aiMesh *mesh) { lua_pushlightuserdata(L, mesh); } void mock_push_node(lua_State *L, struct aiNode *node) { lua_pushlightuserdata(L, node); } #define TEST_IMPORT_SCENE #define push_mesh mock_push_mesh #define push_node mock_push_node #include "import.c" #undef push_mesh #undef push_node void test_push_scene() { lua_State *L = luaL_newstate(); struct aiScene scene; const int num_meshes = 8; struct aiMesh m[num_meshes]; struct aiMesh *meshes[num_meshes]; for (int i=0; i