Refactor 3D import unit test

pull/2936/head
Turo Lamminen 2020-01-21 14:09:29 +02:00
parent 69284bdef9
commit 461f9923a7
1 changed files with 5 additions and 12 deletions

View File

@ -42,23 +42,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "UnitTestPCH.h"
#include "SceneDiffer.h"
#include "AbstractImportExportBase.h"
#include <assimp/Importer.hpp>
#include <assimp/postprocess.h>
using namespace Assimp;
class ut3DImportExport : public AbstractImportExportBase {
public:
virtual bool importerTest() {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/3D/box_a.3d", aiProcess_ValidateDataStructure );
return nullptr != scene;
}
};
TEST_F( ut3DImportExport, import3DFromFileTest ) {
EXPECT_TRUE( importerTest() );
TEST(ut3DImportExport, importBoxA) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/3D/box_a.3d", aiProcess_ValidateDataStructure);
ASSERT_NE(nullptr, scene);
}