From a31c979abce1a07a9f0cb61f04d026cd231a0364 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 10 Nov 2021 20:40:05 +0100 Subject: [PATCH] Use helloworld as X3D-Testcase --- code/AssetLib/X3D/X3DImporter_Macro.hpp | 15 ++++++--------- test/unit/utX3DImportExport.cpp | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/code/AssetLib/X3D/X3DImporter_Macro.hpp b/code/AssetLib/X3D/X3DImporter_Macro.hpp index 08aac3da7..6d4c61c3f 100644 --- a/code/AssetLib/X3D/X3DImporter_Macro.hpp +++ b/code/AssetLib/X3D/X3DImporter_Macro.hpp @@ -63,15 +63,12 @@ inline X3DNodeElementBase *X3DImporter::MACRO_USE_CHECKANDAPPLY(XmlNode &node, s if (nullptr == mNodeElementCur) { printf("here\n"); } - - //do { - checkNodeMustBeEmpty(node); - if (!pDEF.empty()) - Assimp::Throw_DEF_And_USE(node.name()); - if (!FindNodeElement(pUSE, pType, &pNE)) - Assimp::Throw_USE_NotFound(node.name(), pUSE); - mNodeElementCur->Children.push_back(pNE); /* add found object as child to current element */ - //} while (false); + checkNodeMustBeEmpty(node); + if (!pDEF.empty()) + Assimp::Throw_DEF_And_USE(node.name()); + if (!FindNodeElement(pUSE, pType, &pNE)) + Assimp::Throw_USE_NotFound(node.name(), pUSE); + mNodeElementCur->Children.push_back(pNE); /* add found object as child to current element */ return pNE; } diff --git a/test/unit/utX3DImportExport.cpp b/test/unit/utX3DImportExport.cpp index 0d753c889..a6ad618ab 100644 --- a/test/unit/utX3DImportExport.cpp +++ b/test/unit/utX3DImportExport.cpp @@ -51,7 +51,7 @@ class utX3DImportExport : public AbstractImportExportBase { public: bool importerTest() override { Assimp::Importer importer; - const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X3D/ComputerKeyboard.x3d", aiProcess_ValidateDataStructure); + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X3D/HelloX3dTrademark.x3d", aiProcess_ValidateDataStructure); return nullptr != scene; } };