Added unit test for recursive references in GLTF2 file

pull/3070/head
Max Vollmer 2020-03-11 15:32:28 +00:00
parent 1bc7c710d6
commit ec69e2bf59
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,25 @@
{
"asset": {
"version": "2.0"
},
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"nodes": [
{
"children": [
1
]
},
{
"children": [
0
]
}
]
}

View File

@ -493,3 +493,9 @@ TEST_F(utglTF2ImportExport, texcoords) {
EXPECT_EQ(aiGetMaterialInteger(material, AI_MATKEY_GLTF_TEXTURE_TEXCOORD(aiTextureType_UNKNOWN, 0), &uvIndex), aiReturn_SUCCESS);
EXPECT_EQ(uvIndex, 1);
}
TEST_F(utglTF2ImportExport, recursive_nodes) {
Assimp::Importer importer;
const aiScene* scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/RecursiveNodes/RecursiveNodes.gltf", aiProcess_ValidateDataStructure);
EXPECT_EQ(nullptr, scene);
}