Compare commits

...

18 Commits

Author SHA1 Message Date
Kim Kulling
9a9e4b4a59 Update ObjTools.h 2025-12-25 21:42:41 +01:00
Kim Kulling
ea7f710d70 Update glTF2Asset.h 2025-12-25 21:34:49 +01:00
Kim Kulling
93f3c38ceb Refactor ObjFileParser for improved readability#
Refactor handling of cstype section end and material descriptor parsing.
2025-12-25 21:03:29 +01:00
Kim Kulling
0a9cefe943 Refactor insideCstype condition for clarity 2025-12-25 21:01:46 +01:00
Kim Kulling
daa6d64227 Clean up commented code in ObjFileParser.cpp
Removed commented-out code related to material name parsing.
2025-12-25 20:56:55 +01:00
Kim Kulling
04946cc0f4 Add new presents 2025-12-08 23:43:28 +01:00
Kim Kulling
30c4784619 Use constexpr 2025-11-24 20:13:43 +01:00
Kim Kulling
f7d2de1efc Replace string copy by using pure iterators. 2025-11-23 20:16:40 +01:00
Kim Kulling
74a72a20e2 SIB: Fix unittests 2025-11-16 19:54:45 +01:00
Kim Kulling
07f24a7e93 Update glTF2Exporter.cpp 2025-11-16 17:19:49 +01:00
Kim Kulling
122884557e Update glTF2AssetWriter.h 2025-11-16 17:19:29 +01:00
Kim Kulling
18d84b5d20 Update glTFAsset.h 2025-11-16 17:18:45 +01:00
Kim Kulling
2b3dfb9164 Merge branch 'master' into bugfix/fix_linkage_no_importers_issue-5971 2025-11-16 17:07:58 +01:00
Kim Kulling
9143651e2e Remove commented out GLTF importer guard 2025-11-11 15:36:17 +01:00
Kim Kulling
bec3e1a089 Refactor glTFCommon namespace structure
Refactor namespace declarations for consistency.
2025-11-11 15:35:25 +01:00
Kim Kulling
0e6af01232 Remove unused preprocessor directives in glTF2Exporter 2025-11-11 15:33:42 +01:00
Kim Kulling
c54522f3c1 Merge branch 'master' into bugfix/fix_linkage_no_importers_issue-5971 2025-11-11 09:32:27 +01:00
Kim Kulling
5e084cd1e8 Fix linkage 2025-11-10 21:36:40 +01:00
21 changed files with 142 additions and 148 deletions

View File

@@ -1,17 +1,54 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 0
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 0
},
"configurePresets": [
{
"name": "assimp",
"binaryDir": "${sourceDir}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"ASSIMP_BUILD_ASSIMP_TOOLS": "OFF"
}
},
"configurePresets": [
{
"name": "assimp_with_tools",
"binaryDir": "${sourceDir}",
"cacheVariables": {
"ASSIMP_BUILD_ASSIMP_TOOLS" : "ON"
}
}
]
{
"name": "assimp_static",
"binaryDir": "${sourceDir}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_SHARED_LIBS": "OFF",
"ASSIMP_BUILD_ASSIMP_TOOLS": "OFF",
"ASSIMP_DOUBLE_PRECISION": "ON"
}
},
{
"name": "assimp_double_precision",
"binaryDir": "${sourceDir}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"ASSIMP_BUILD_ASSIMP_TOOLS": "OFF",
"ASSIMP_DOUBLE_PRECISION": "ON"
}
},
{
"name": "assimp_with_tools",
"binaryDir": "${sourceDir}",
"cacheVariables": {
"ASSIMP_BUILD_ASSIMP_TOOLS": "ON"
}
},
{
"name": "assimp_all",
"binaryDir": "${sourceDir}",
"cacheVariables": {
"ASSIMP_BUILD_ASSIMP_TOOLS": "ON",
"ASSIMP_BUILD_SAMPLES": "ON",
"ASSIMP_BUILD_DOCS": "ON"
}
}
]
}

View File

@@ -47,8 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_FBX_EXPORTER
namespace Assimp {
namespace FBX {
namespace Assimp::FBX {
static constexpr size_t NumNullRecords = 25;
@@ -84,8 +83,7 @@ enum TransformInheritance {
TransformInheritance_MAX // end-of-enum sentinel
};
} // namespace FBX
} // namespace Assimp
} // namespace Assimp::FBX
#endif // ASSIMP_BUILD_NO_FBX_EXPORTER

View File

@@ -50,11 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string>
#include <cstring>
#ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
namespace Assimp {
namespace FBX {
namespace Util {
namespace Assimp::FBX::Util {
// ------------------------------------------------------------------------------------------------
const char* TokenTypeString(TokenType t)
@@ -233,8 +229,5 @@ std::string EncodeBase64(const char* data, size_t length)
return encoded_string;
}
} // !Util
} // !FBX
} // !Assimp
} // namespace Assimp::FBX::Util
#endif

View File

@@ -49,10 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "FBXTokenizer.h"
#include <stdint.h>
namespace Assimp {
namespace FBX {
namespace Util {
namespace Assimp::FBX::Util {
/** helper for std::for_each to delete all heap-allocated items in a container */
template<typename T>
@@ -73,12 +70,9 @@ struct destructor_fun {
}
};
/** Get a string representation for a #TokenType. */
const char* TokenTypeString(TokenType t);
/** Format log/error messages using a given offset in the source binary file
*
* @param offset offset within the file
@@ -129,8 +123,6 @@ char EncodeBase64(char byte);
* @return base64-encoded string*/
std::string EncodeBase64(const char* data, size_t length);
}
}
}
#endif // ! INCLUDED_AI_FBX_UTIL_H

View File

@@ -80,7 +80,7 @@ ObjFileParser::ObjFileParser(IOStreamBuffer<char> &streamBuffer, const std::stri
m_buffer(),
m_pIO(io),
m_progress(progress),
m_originalObjFileName(originalObjFileName) {
m_originalObjFileName(originalObjFileName) {
std::fill_n(m_buffer, Buffersize, '\0');
// Create the model instance to store all the data
@@ -139,11 +139,12 @@ void ObjFileParser::parseFile(IOStreamBuffer<char> &streamBuffer) {
// handle c-stype section end (http://paulbourke.net/dataformats/obj/)
if (insideCstype) {
switch (*m_DataIt) {
case 'e': {
std::string name;
getNameNoSpace(m_DataIt, m_DataItEnd, name);
insideCstype = name != "end";
} break;
case 'e': {
char *name{nullptr};
size_t len{0};
getNameNoSpace(m_DataIt, m_DataItEnd, &name, len);
insideCstype = !(len == 3 && strncmp(name, "end", 3) == 0);
} break;
}
goto pf_skip_line;
}
@@ -198,32 +199,23 @@ void ObjFileParser::parseFile(IOStreamBuffer<char> &streamBuffer) {
case 'u': // Parse a material desc. setter
{
std::string name;
char *name{nullptr};
size_t len{ 0 };
getNameNoSpace(m_DataIt, m_DataItEnd, &name, len);
getNameNoSpace(m_DataIt, m_DataItEnd, name);
size_t nextSpace = name.find(' ');
if (nextSpace != std::string::npos)
name = name.substr(0, nextSpace);
if (name == "usemtl") {
if (strncmp(name, "usemtl", len) == 0) {
getMaterialDesc();
}
} break;
case 'm': // Parse a material library or merging group ('mg')
{
std::string name;
getNameNoSpace(m_DataIt, m_DataItEnd, name);
size_t nextSpace = name.find(' ');
if (nextSpace != std::string::npos)
name = name.substr(0, nextSpace);
if (name == "mg")
char *name{nullptr};
size_t len{ 0 };
getNameNoSpace(m_DataIt, m_DataItEnd, &name, len);
if (strncmp(name, "mg", len) == 0)
getGroupNumberAndResolution();
else if (name == "mtllib")
else if (strncmp(name, "mtllib", len) == 0)
getMaterialLib();
else
goto pf_skip_line;
@@ -246,9 +238,11 @@ void ObjFileParser::parseFile(IOStreamBuffer<char> &streamBuffer) {
case 'c': // handle cstype section start
{
std::string name;
getNameNoSpace(m_DataIt, m_DataItEnd, name);
insideCstype = name == "cstype";
//std::string name;
char *name{nullptr};
size_t len{0};
getNameNoSpace(m_DataIt, m_DataItEnd, &name, len);
insideCstype = strncmp(name, "cstype", len) == 0;
goto pf_skip_line;
}

View File

@@ -177,31 +177,37 @@ inline char_t getName(char_t it, char_t end, std::string &name) {
* @return Current-iterator with new position
*/
template <class char_t>
inline char_t getNameNoSpace(char_t it, char_t end, std::string &name) {
name = "";
inline char_t getNameNoSpace(char_t it, char_t end, char **name, size_t &len) {
*name = nullptr;
len = 0;
if (isEndOfBuffer(it, end)) {
return end;
}
char *pStart = &(*it);
while (&(*it) > pStart && (isEndOfBuffer(it, end) || IsLineEnd(*it) || IsSpaceOrNewLine(*it))) {
--it;
--len;
}
while (!isEndOfBuffer(it, end) && !IsLineEnd(*it) && !IsSpaceOrNewLine(*it)) {
++it;
++len;
}
while (isEndOfBuffer(it, end) || IsLineEnd(*it) || IsSpaceOrNewLine(*it)) {
--it;
--len;
}
++it;
++len;
// Get name
// if there is no name, and the previous char is a separator, come back to start
while (&(*it) < pStart) {
++it;
++len;
}
std::string strName(pStart, &(*it));
if (!strName.empty()) {
name = strName;
}
*name = pStart;
return it;
}
@@ -239,7 +245,7 @@ inline char_t CopyNextWord(char_t it, char_t end, char *pBuffer, size_t length)
*/
template <class char_t>
inline char_t getFloat(char_t it, char_t end, ai_real &value) {
static const size_t BUFFERSIZE = 1024;
static constexpr size_t BUFFERSIZE = 1024;
char buffer[BUFFERSIZE] = {};
it = CopyNextWord<char_t>(it, end, buffer, BUFFERSIZE);
value = (ai_real)fast_atof(buffer);

View File

@@ -49,8 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GLTFASSET_H_INC
#define GLTFASSET_H_INC
#if !defined(ASSIMP_BUILD_NO_GLTF_IMPORTER) && !defined(ASSIMP_BUILD_NO_GLTF1_IMPORTER)
#include "AssetLib/glTFCommon/glTFCommon.h"
#include <assimp/Exceptional.h>
#include <list>
@@ -1008,6 +1006,4 @@ private:
// Include the implementation of the methods
#include "glTFAsset.inl"
#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
#endif // GLTFASSET_H_INC

View File

@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GLTFASSETWRITER_H_INC
#define GLTFASSETWRITER_H_INC
#if !defined(ASSIMP_BUILD_NO_GLTF_IMPORTER) && !defined(ASSIMP_BUILD_NO_GLTF1_IMPORTER)
//#if !defined(ASSIMP_BUILD_NO_GLTF_IMPORTER) && !defined(ASSIMP_BUILD_NO_GLTF1_IMPORTER)
#include "glTFAsset.h"
@@ -63,16 +63,6 @@ class AssetWriter
template<class T>
friend void WriteLazyDict(LazyDict<T>& d, AssetWriter& w);
private:
void WriteBinaryData(IOStream* outfile, size_t sceneLength);
void WriteMetadata();
void WriteExtensionsUsed();
template<class T>
void WriteObjects(LazyDict<T>& d);
public:
Document mDoc;
Asset& mAsset;
@@ -80,9 +70,19 @@ public:
MemoryPoolAllocator<>& mAl;
AssetWriter(Asset& asset);
~AssetWriter() = default;
void WriteFile(const char* path);
void WriteGLBFile(const char* path);
private:
void WriteBinaryData(IOStream* outfile, size_t sceneLength);
void WriteMetadata();
void WriteExtensionsUsed();
template<class T>
void WriteObjects(LazyDict<T>& d);
};
}
@@ -90,6 +90,6 @@ public:
// Include the implementation of the methods
#include "glTFAssetWriter.inl"
#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
//#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
#endif // GLTFASSETWRITER_H_INC

View File

@@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_GLTF_EXPORTER
#include "AssetLib/glTF/glTFExporter.h"
#include "AssetLib/glTF/glTFAsset.h"
#include "AssetLib/glTF/glTFAssetWriter.h"
#include "PostProcessing/SplitLargeMeshes.h"
@@ -62,6 +63,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <limits>
#include <inttypes.h>
#include <rapidjson/rapidjson.h>
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
#ifdef ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC
// Header files, Open3DGC.
# include <Open3DGC/o3dgcSC3DMCEncoder.h>
@@ -1064,6 +1069,5 @@ void glTFExporter::ExportAnimations()
} // End: for-loop mNumAnimations
}
#endif // ASSIMP_BUILD_NO_GLTF_EXPORTER
#endif // ASSIMP_BUILD_NO_EXPORT

View File

@@ -58,8 +58,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GLTF2ASSET_H_INC
#define GLTF2ASSET_H_INC
#if !defined(ASSIMP_BUILD_NO_GLTF_IMPORTER) && !defined(ASSIMP_BUILD_NO_GLTF2_IMPORTER)
#include <assimp/Exceptional.h>
#include <algorithm>
@@ -1283,6 +1281,4 @@ inline std::string getContextForErrorMessages(const std::string &id, const std::
// Include the implementation of the methods
#include "glTF2Asset.inl"
#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
#endif // GLTF2ASSET_H_INC

View File

@@ -57,8 +57,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GLTF2ASSETWRITER_H_INC
#define GLTF2ASSETWRITER_H_INC
#if !defined(ASSIMP_BUILD_NO_GLTF_IMPORTER) && !defined(ASSIMP_BUILD_NO_GLTF2_IMPORTER)
#include "glTF2Asset.h"
namespace glTF2
@@ -98,6 +96,4 @@ public:
// Include the implementation of the methods
#include "glTF2AssetWriter.inl"
#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
#endif // GLTF2ASSETWRITER_H_INC

View File

@@ -64,6 +64,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <memory>
#include <iostream>
#include <rapidjson/rapidjson.h>
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
using namespace rapidjson;
using namespace Assimp;

View File

@@ -45,8 +45,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_GLTF2EXPORTER_H_INC
#define AI_GLTF2EXPORTER_H_INC
#if !defined(ASSIMP_BUILD_NO_GLTF_IMPORTER) && !defined(ASSIMP_BUILD_NO_GLTF2_IMPORTER)
#include <assimp/material.h>
#include <assimp/types.h>
#include <assimp/defs.h>
@@ -150,6 +148,4 @@ private:
} // namespace Assimp
#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
#endif // AI_GLTF2EXPORTER_H_INC

View File

@@ -65,6 +65,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <rapidjson/document.h>
#include <rapidjson/rapidjson.h>
#include <rapidjson/error/en.h>
using namespace Assimp;
using namespace glTF2;

View File

@@ -38,15 +38,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
#include "AssetLib/glTFCommon/glTFCommon.h"
namespace glTFCommon {
using namespace glTFCommon::Util;
namespace Util {
namespace glTFCommon::Util {
bool ParseDataURI(const char *const_uri, size_t uriLen, DataURI &out) {
if (nullptr == const_uri) {
@@ -111,7 +107,4 @@ bool ParseDataURI(const char *const_uri, size_t uriLen, DataURI &out) {
return true;
}
} // namespace Util
} // namespace glTFCommon
#endif
} // namespace glTFCommon::Uti

View File

@@ -41,8 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_GLFTCOMMON_H_INC
#define AI_GLFTCOMMON_H_INC
#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
#include <assimp/Exceptional.h>
#include <assimp/DefaultLogger.hpp>
@@ -532,6 +530,4 @@ inline Value *FindNumber(Value &val, const char *id) {
} // namespace glTFCommon
#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
#endif // AI_GLFTCOMMON_H_INC

View File

@@ -602,6 +602,12 @@ ADD_ASSIMP_IMPORTER( XGL
AssetLib/XGL/XGLLoader.h
)
SET( FBX_COMMON_SRCS
AssetLib/FBX/FBXUtil.h
AssetLib/FBX/FBXUtil.cpp
AssetLib/FBX/FBXCommon.h
)
ADD_ASSIMP_IMPORTER( FBX
AssetLib/FBX/FBXImporter.cpp
AssetLib/FBX/FBXCompileConfig.h
@@ -613,8 +619,6 @@ ADD_ASSIMP_IMPORTER( FBX
AssetLib/FBX/FBXImportSettings.h
AssetLib/FBX/FBXConverter.h
AssetLib/FBX/FBXConverter.cpp
AssetLib/FBX/FBXUtil.h
AssetLib/FBX/FBXUtil.cpp
AssetLib/FBX/FBXDocument.h
AssetLib/FBX/FBXDocument.cpp
AssetLib/FBX/FBXProperties.h
@@ -628,7 +632,6 @@ ADD_ASSIMP_IMPORTER( FBX
AssetLib/FBX/FBXDeformer.cpp
AssetLib/FBX/FBXBinaryTokenizer.cpp
AssetLib/FBX/FBXDocumentUtil.cpp
AssetLib/FBX/FBXCommon.h
)
if (NOT ASSIMP_NO_EXPORT)
@@ -1348,6 +1351,8 @@ SET( assimp_src
${ASSIMP_LOADER_SRCS}
${ASSIMP_EXPORTER_SRCS}
${FBX_COMMON_SRCS}
# Third-party libraries
${unzip_compile_SRCS}
${Poly2Tri_SRCS}

View File

@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
static const float VertComponents[24 * 3] = {
static constexpr float VertComponents[24 * 3] = {
-0.500000, 0.500000, 0.500000,
-0.500000, 0.500000, -0.500000,
-0.500000, -0.500000, -0.500000,
@@ -76,7 +76,7 @@ static const float VertComponents[24 * 3] = {
0.500000, -0.500000, 0.500000f
};
static const char *ObjModel =
static constexpr char ObjModel[] =
"o 1\n"
"\n"
"# Vertex list\n"
@@ -103,7 +103,7 @@ static const char *ObjModel =
"\n"
"# End of file\n";
static const char *ObjModel_Issue1111 =
static constexpr char ObjModel_Issue1111[] =
"o 1\n"
"\n"
"# Vertex list\n"
@@ -408,7 +408,7 @@ TEST_F(utObjImportExport, homogeneous_coordinates_divide_by_zero_Test) {
EXPECT_EQ(nullptr, scene);
}
TEST_F(utObjImportExport, 0based_array_Test) {
TEST_F(utObjImportExport, zero_based_array_Test) {
static const char *curObjModel =
"v -0.500000 0.000000 0.400000\n"
"v -0.500000 0.000000 -0.800000\n"

View File

@@ -38,22 +38,19 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------------
*/
#ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER
#include "AssetLib/Obj/ObjFileParser.h"
#include "AssetLib/Obj/ObjTools.h"
#include "UnitTestPCH.h"
using namespace ::Assimp;
class utObjTools : public ::testing::Test {
// empty
};
class utObjTools : public ::testing::Test {};
class TestObjFileParser : public ObjFileParser {
public:
TestObjFileParser() :
ObjFileParser() {
// empty
}
TestObjFileParser() = default;
~TestObjFileParser() = default;
@@ -84,7 +81,7 @@ TEST_F(utObjTools, skipDataLine_TwoLines_Success) {
buffer.resize(data.size());
::memcpy(&buffer[0], &data[0], data.size());
test_parser.setBuffer(buffer);
static const size_t Size = 4096UL;
static constexpr size_t Size = 4096UL;
char data_buffer[Size];
test_parser.testCopyNextWord(data_buffer, Size);
@@ -112,3 +109,5 @@ TEST_F(utObjTools, countComponents_TwoLines_Success) {
size_t numComps = test_parser.testGetNumComponentsInDataDefinition();
EXPECT_EQ(3U, numComps);
}
#endif // ASSIMP_BUILD_NO_OBJ_IMPORTER

View File

@@ -52,22 +52,16 @@ using namespace ::Assimp;
class utSIBImporter : public AbstractImportExportBase {
public:
virtual bool importerTest() {
Assimp::Importer importer;
Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/SIB/heffalump.sib", aiProcess_ValidateDataStructure);
return nullptr != scene;
}
};
TEST_F(utSIBImporter, createTest) {
bool ok(true);
try {
SIBImporter myImporter;
} catch (...) {
ok = false;
}
EXPECT_TRUE(ok);
}
TEST_F(utSIBImporter, importTest) {
#ifdef ASSIMP_BUILD_NO_SIB_IMPORTER
EXPECT_FALSE(importerTest());
#else
EXPECT_TRUE(importerTest());
#endif
}

View File

@@ -56,18 +56,12 @@ public:
}
};
TEST_F(utSMDImporter, createTest) {
bool ok(true);
try {
SMDImporter myImporter;
} catch (...) {
ok = false;
}
EXPECT_TRUE(ok);
}
TEST_F(utSMDImporter, importTest) {
#ifndef ASSIMP_BUILD_NO_SMD_IMPORTER
EXPECT_TRUE(importerTest());
#else
EXPECT_FALSE(importerTest());
#endif
}
TEST_F(utSMDImporter, issue_899_Texture_garbage_at_end_of_string_Test) {