Merge pull request #3415 from assimp/issue_3379

closes https://github.com/assimp/assimp/issues/3379: reproduce error …
pull/3413/head^2
Kim Kulling 2020-10-06 10:38:09 +02:00 committed by GitHub
commit 95d0443a5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 234 additions and 234 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2020, assimp team Copyright (c) 2006-2020, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
@ -49,9 +47,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_IMPORTER_DESC_H_INC #define AI_IMPORTER_DESC_H_INC
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC system_header # pragma GCC system_header
#endif #endif
#include <assimp/types.h>
/** Mixed set of flags for #aiImporterDesc, indicating some features /** Mixed set of flags for #aiImporterDesc, indicating some features
* common to many importers*/ * common to many importers*/
enum aiImporterFlags { enum aiImporterFlags {

View File

@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2020, assimp team Copyright (c) 2006-2020, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
@ -46,14 +44,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp; using namespace Assimp;
class AssimpAPITest : public ::testing::Test { class AssimpAPITest : public ::testing::Test {
// empty
}; };
TEST_F( AssimpAPITest, aiGetImporterDescTest ) { TEST_F( AssimpAPITest, aiGetImporterDescTest ) {
const aiImporterDesc *desc( NULL ); const aiImporterDesc *desc( nullptr );
desc = aiGetImporterDesc( NULL ); desc = aiGetImporterDesc(nullptr);
EXPECT_EQ( NULL, desc ); EXPECT_EQ(nullptr, desc);
desc = aiGetImporterDesc( "obj" ); desc = aiGetImporterDesc( "obj" );
EXPECT_TRUE( NULL != desc ); EXPECT_TRUE(nullptr != desc);
}
TEST_F( AssimpAPITest, aiGetLastErrorTest ) {
const char *error = aiGetErrorString();
EXPECT_NE(nullptr, error);
} }