From e05ece2eec2a52eee44dd6ac5dfd5f05a96be239 Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Thu, 25 Jul 2019 11:12:06 +0100 Subject: [PATCH] Add Exporter Unit Test output to gitignore --- test/.gitignore | 3 +++ test/models/PLY/cube_test.ply | 24 ------------------------ test/unit/utAssbinImportExport.cpp | 4 ++-- test/unit/utObjImportExport.cpp | 6 +++--- test/unit/utPLYImportExport.cpp | 2 +- 5 files changed, 9 insertions(+), 30 deletions(-) create mode 100644 test/.gitignore delete mode 100644 test/models/PLY/cube_test.ply diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 000000000..b652d6aae --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,3 @@ +# Ignore Unit Test Output files + +*_out.* diff --git a/test/models/PLY/cube_test.ply b/test/models/PLY/cube_test.ply deleted file mode 100644 index eef7cd426..000000000 --- a/test/models/PLY/cube_test.ply +++ /dev/null @@ -1,24 +0,0 @@ -ply -format ascii 1.0 -comment Created by Open Asset Import Library - http://assimp.sf.net (v4.1.649942190) -element vertex 8 -property float x -property float y -property float z -element face 6 -property list uchar int vertex_index -end_header -0 0 0 -0 0 1 -0 1 1 -0 1 0 -1 0 0 -1 0 1 -1 1 1 -1 1 0 -4 0 1 2 3 -4 7 6 5 4 -4 0 4 5 1 -4 1 5 6 2 -4 2 6 7 3 -4 3 7 4 0 diff --git a/test/unit/utAssbinImportExport.cpp b/test/unit/utAssbinImportExport.cpp index 6def04796..63c22cfea 100644 --- a/test/unit/utAssbinImportExport.cpp +++ b/test/unit/utAssbinImportExport.cpp @@ -58,8 +58,8 @@ public: const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", aiProcess_ValidateDataStructure ); Exporter exporter; - EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "assbin", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.assbin" ) ); - const aiScene *newScene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.assbin", aiProcess_ValidateDataStructure ); + EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "assbin", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_out.assbin" ) ); + const aiScene *newScene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider_out.assbin", aiProcess_ValidateDataStructure ); return newScene != nullptr; } diff --git a/test/unit/utObjImportExport.cpp b/test/unit/utObjImportExport.cpp index bb0d36b13..e00cd2075 100644 --- a/test/unit/utObjImportExport.cpp +++ b/test/unit/utObjImportExport.cpp @@ -205,8 +205,8 @@ protected: ::Assimp::Exporter exporter; const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", aiProcess_ValidateDataStructure ); EXPECT_NE( nullptr, scene ); - EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.obj" ) ); - EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "objnomtl", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_nomtl_test.obj" ) ); + EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_out.obj" ) ); + EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "objnomtl", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_nomtl_out.obj" ) ); return true; } @@ -263,7 +263,7 @@ TEST_F( utObjImportExport, issue809_vertex_color_Test ) { #ifndef ASSIMP_BUILD_NO_EXPORT ::Assimp::Exporter exporter; - EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/test.obj" ) ); + EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/test_out.obj" ) ); #endif // ASSIMP_BUILD_NO_EXPORT } diff --git a/test/unit/utPLYImportExport.cpp b/test/unit/utPLYImportExport.cpp index bb8ba64d9..17d1b28de 100644 --- a/test/unit/utPLYImportExport.cpp +++ b/test/unit/utPLYImportExport.cpp @@ -71,7 +71,7 @@ public: Exporter exporter; const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/PLY/cube.ply", aiProcess_ValidateDataStructure); EXPECT_NE(nullptr, scene); - EXPECT_EQ(aiReturn_SUCCESS, exporter.Export(scene, "ply", ASSIMP_TEST_MODELS_DIR "/PLY/cube_test.ply")); + EXPECT_EQ(aiReturn_SUCCESS, exporter.Export(scene, "ply", ASSIMP_TEST_MODELS_DIR "/PLY/cube_out.ply")); return true; }