From ac23034816c1921b364edbaad97187186858ac8e Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 30 Nov 2017 00:32:37 +0100 Subject: [PATCH] fix the exporter unittest when the export is disabled. --- test/unit/utD3MFImportExport.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/unit/utD3MFImportExport.cpp b/test/unit/utD3MFImportExport.cpp index efc87c786..d344f0a3f 100644 --- a/test/unit/utD3MFImportExport.cpp +++ b/test/unit/utD3MFImportExport.cpp @@ -63,6 +63,8 @@ public: return ( nullptr != scene ); } +#ifndef ASSIMP_BUILD_NO_EXPORT + virtual bool exporterTest() { Assimp::Importer importer; const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/3MF/box.3mf", 0 ); @@ -70,13 +72,17 @@ public: Assimp::Exporter exporter; return AI_SUCCESS == exporter.Export( scene, "3mf", "test.3mf" ); } - +#endif // ASSIMP_BUILD_NO_EXPORT }; TEST_F(utD3MFImporterExporter, import3MFFromFileTest) { EXPECT_TRUE(importerTest()); } +#ifndef ASSIMP_BUILD_NO_EXPORT + TEST_F( utD3MFImporterExporter, export3MFtoMemTest ) { EXPECT_TRUE( exporterTest() ); } + +#endif // ASSIMP_BUILD_NO_EXPORT