From 69284bdef931dc8134be93a0a629b10fcff7115a Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Tue, 21 Jan 2020 13:50:11 +0200 Subject: [PATCH] Add more XGL unit tests --- test/unit/ImportExport/utXGLImportExport.cpp | 48 ++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/test/unit/ImportExport/utXGLImportExport.cpp b/test/unit/ImportExport/utXGLImportExport.cpp index 8f5c4bdfe..4cace2904 100644 --- a/test/unit/ImportExport/utXGLImportExport.cpp +++ b/test/unit/ImportExport/utXGLImportExport.cpp @@ -49,9 +49,57 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace Assimp; +TEST(utXGLImporter, importBCN_Epileptic) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/BCN_Epileptic.zgl", aiProcess_ValidateDataStructure); + ASSERT_NE(nullptr, scene); +} + + +TEST(utXGLImporter, importCubesWithAlpha) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/cubes_with_alpha.zgl", aiProcess_ValidateDataStructure); + ASSERT_NE(nullptr, scene); +} + + TEST(utXGLImporter, importSample_official) { Assimp::Importer importer; const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/sample_official.xgl", aiProcess_ValidateDataStructure); ASSERT_NE(nullptr, scene); } + +TEST(utXGLImporter, importSample_official_asxml) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/sample_official_asxml.xml", aiProcess_ValidateDataStructure); + ASSERT_NE(nullptr, scene); +} + + +TEST(utXGLImporter, importSphereWithMatGloss) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/sphere_with_mat_gloss_10pc.zgl", aiProcess_ValidateDataStructure); + ASSERT_NE(nullptr, scene); +} + + +TEST(utXGLImporter, importSpiderASCII) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/Spider_ascii.zgl", aiProcess_ValidateDataStructure); + ASSERT_NE(nullptr, scene); +} + + +TEST(utXGLImporter, importWuson) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/Wuson.zgl", aiProcess_ValidateDataStructure); + ASSERT_NE(nullptr, scene); +} + + +TEST(utXGLImporter, importWusonDXF) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/wuson_dxf.zgl", aiProcess_ValidateDataStructure); + ASSERT_NE(nullptr, scene); +}