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

Function TEST

engine/modelc/src/test/test_model.cpp:112–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112TEST(ModelGLTF, Load)
113{
114 const char* path = "./src/test/assets/car01.glb";
115 uint32_t file_size = 0;
116 void* mem = dmModelImporter::ReadFile(path, &file_size);
117
118 const char* suffix = strrchr(path, '.') + 1;
119
120 dmModelImporter::Options options;
121 dmModelImporter::Scene* scene = dmModelImporter::LoadFromBuffer(&options, suffix, mem, file_size);
122 ASSERT_FALSE(dmModelImporter::NeedsResolve(scene));
123 bool result = dmModelImporter::LoadFinalize(scene);
124 ASSERT_TRUE(result);
125 result = dmModelImporter::Validate(scene);
126 ASSERT_TRUE(result);
127
128 ASSERT_NE((void*)0, scene);
129
130 //dmModelImporter::DebugScene(scene);
131
132 dmModelImporter::DestroyScene(scene);
133
134 free(mem);
135}
136
137TEST(ModelGLTF, MorphWeightsAnimationChannel)
138{

Callers

nothing calls this directly

Calls 11

NeedsResolveFunction · 0.85
LoadFinalizeFunction · 0.85
ValidateFunction · 0.85
DestroySceneFunction · 0.85
freeFunction · 0.85
CheckChildrenFunction · 0.85
TestLoadingFunction · 0.85
LoadSceneFunction · 0.70
ReadFileFunction · 0.50
LoadFromBufferFunction · 0.50
SizeMethod · 0.45

Tested by

no test coverage detected