reformat unittests.
parent
edc73552cd
commit
68a9fa2df3
|
@ -42,9 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
// Actually just a dummy, used by the compiler to build the precompiled header.
|
||||
|
||||
#include <assimp/version.h>
|
||||
#include <assimp/scene.h>
|
||||
#include "ScenePrivate.h"
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/version.h>
|
||||
|
||||
#include "revision.h"
|
||||
|
||||
|
@ -57,8 +57,7 @@ static const char* LEGAL_INFORMATION =
|
|||
|
||||
"(c) 2006-2020, assimp team\n"
|
||||
"License under the terms and conditions of the 3-clause BSD license\n"
|
||||
"http://assimp.org\n"
|
||||
;
|
||||
"http://assimp.org\n";
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Get legal string
|
||||
|
@ -119,23 +118,8 @@ ASSIMP_API const char *aiGetBranchName() {
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
ASSIMP_API aiScene::aiScene()
|
||||
: mFlags(0)
|
||||
, mRootNode(nullptr)
|
||||
, mNumMeshes(0)
|
||||
, mMeshes(nullptr)
|
||||
, mNumMaterials(0)
|
||||
, mMaterials(nullptr)
|
||||
, mNumAnimations(0)
|
||||
, mAnimations(nullptr)
|
||||
, mNumTextures(0)
|
||||
, mTextures(nullptr)
|
||||
, mNumLights(0)
|
||||
, mLights(nullptr)
|
||||
, mNumCameras(0)
|
||||
, mCameras(nullptr)
|
||||
, mMetaData(nullptr)
|
||||
, mPrivate(new Assimp::ScenePrivateData()) {
|
||||
ASSIMP_API aiScene::aiScene() :
|
||||
mFlags(0), mRootNode(nullptr), mNumMeshes(0), mMeshes(nullptr), mNumMaterials(0), mMaterials(nullptr), mNumAnimations(0), mAnimations(nullptr), mNumTextures(0), mTextures(nullptr), mNumLights(0), mLights(nullptr), mNumCameras(0), mCameras(nullptr), mMetaData(nullptr), mPrivate(new Assimp::ScenePrivateData()) {
|
||||
// empty
|
||||
}
|
||||
|
||||
|
@ -184,4 +168,3 @@ ASSIMP_API aiScene::~aiScene() {
|
|||
|
||||
delete static_cast<Assimp::ScenePrivateData *>(mPrivate);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -76,10 +74,8 @@ public:
|
|||
EXPECT_EQ(nullptr, scene->mRootNode->FindNode(AI_MDL_HL1_NODE_SEQUENCE_GROUPS));
|
||||
EXPECT_EQ(nullptr, scene->mRootNode->FindNode(AI_MDL_HL1_NODE_SEQUENCE_TRANSITION_GRAPH));
|
||||
|
||||
expect_global_info_eq<int>(scene, {
|
||||
{ 0, "NumSequences" },
|
||||
{ 0, "NumTransitionNodes" }
|
||||
});
|
||||
expect_global_info_eq<int>(scene, { { 0, "NumSequences" },
|
||||
{ 0, "NumTransitionNodes" } });
|
||||
});
|
||||
|
||||
/* Verify that blend controllers info is *NOT* imported when
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -45,13 +43,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
* @brief Half-Life 1 MDL loader materials tests.
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "MDL/HalfLife/HL1ImportDefinitions.h"
|
||||
#include "MDLHL1TestFiles.h"
|
||||
#include "UnitTestPCH.h"
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include "MDLHL1TestFiles.h"
|
||||
#include "MDL/HalfLife/HL1ImportDefinitions.h"
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -45,13 +43,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
* @brief Half-Life 1 MDL loader nodes tests.
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "MDL/HalfLife/HL1ImportDefinitions.h"
|
||||
#include "MDLHL1TestFiles.h"
|
||||
#include "UnitTestPCH.h"
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include "MDLHL1TestFiles.h"
|
||||
#include "MDL/HalfLife/HL1ImportDefinitions.h"
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,15 +39,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
TEST(utCOBImporter, importDwarfASCII) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/COB/dwarf_ascii.cob", aiProcess_ValidateDataStructure);
|
||||
|
@ -58,14 +55,12 @@ TEST(utCOBImporter, importDwarfASCII) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utCOBImporter, importDwarf) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/COB/dwarf.cob", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utCOBImporter, importMoleculeASCII) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/COB/molecule_ascii.cob", aiProcess_ValidateDataStructure);
|
||||
|
@ -74,35 +69,30 @@ TEST(utCOBImporter, importMoleculeASCII) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utCOBImporter, importMolecule) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/COB/molecule.cob", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utCOBImporter, importSpider43ASCII) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/COB/spider_4_3_ascii.cob", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utCOBImporter, importSpider43) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/COB/spider_4_3.cob", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utCOBImporter, importSpider66ASCII) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/COB/spider_6_6_ascii.cob", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utCOBImporter, importSpider66) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/COB/spider_6_6.cob", aiProcess_ValidateDataStructure);
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -47,39 +45,32 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
|
||||
TEST(utMD2Importer, importFaerie) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/MD2/faerie.md2", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utMD2Importer, importSydney) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/MD2/sydney.md2", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utMD2Importer, importDolphin) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/MD2/dolphin.md2", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utMD2Importer, importFlag) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/MD2/flag.md2", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utMD2Importer, importHorse) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/MD2/horse.md2", aiProcess_ValidateDataStructure);
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -47,25 +45,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
|
||||
TEST(utMD3Importer, importWatercan) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/MD3/watercan.md3", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utMD3Importer, importWatercan_dmg) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/MD3/watercan_dmg.md3", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utMD3Importer, importEuropean_fnt_v2) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/MD3/q3root/models/mapobjects/kt_kubalwagon/european_fnt_v2.md3", aiProcess_ValidateDataStructure);
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -47,32 +45,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
|
||||
TEST(utMD5Importer, importEmpty) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/MD5/invalid/empty.md5mesh", aiProcess_ValidateDataStructure);
|
||||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utMD5Importer, importSimpleCube) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/MD5/SimpleCube.md5mesh", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utMD5Importer, importBoarMan) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/MD5/BoarMan.md5mesh", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utMD5Importer, importBob) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/MD5/Bob.md5mesh", aiProcess_ValidateDataStructure);
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,10 +39,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include <assimp/Importer.hpp>
|
||||
#include "UnitTestPCH.h"
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,13 +39,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
class utOFFImportExport : public AbstractImportExportBase {
|
||||
protected:
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,12 +39,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,12 +39,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -42,62 +40,53 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
TEST(utXGLImporter, importBCN_Epileptic) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/BCN_Epileptic.zgl", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXGLImporter, importCubesWithAlpha) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/cubes_with_alpha.zgl", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXGLImporter, importSample_official) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/sample_official.xgl", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXGLImporter, importSample_official_asxml) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/sample_official_asxml.xml", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXGLImporter, importSphereWithMatGloss) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/sphere_with_mat_gloss_10pc.zgl", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXGLImporter, importSpiderASCII) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/Spider_ascii.zgl", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXGLImporter, importWuson) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/Wuson.zgl", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXGLImporter, importWusonDXF) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/XGL/wuson_dxf.zgl", aiProcess_ValidateDataStructure);
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#include "UnitTestPCH.h"
|
||||
#include "../../include/assimp/DefaultLogger.hpp"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int main(int argc, char *argv[]) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
|
||||
// seed the randomizer with the current system time
|
||||
time_t t;time(&t);
|
||||
time_t t;
|
||||
time(&t);
|
||||
srand((unsigned int)t);
|
||||
|
||||
// ............................................................................
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,18 +39,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
class ut3DSImportExport : public AbstractImportExportBase {
|
||||
public:
|
||||
virtual bool importerTest() {
|
||||
bool importerTest() override {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/3DS/fels.3ds", aiProcess_ValidateDataStructure);
|
||||
#ifndef ASSIMP_BUILD_NO_3DS_IMPORTER
|
||||
|
@ -73,4 +71,3 @@ TEST_F( ut3DSImportExport, import3DSformatdetection) {
|
|||
|
||||
EXPECT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,12 +39,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
@ -61,8 +61,6 @@ TEST_F( utAMFImportExport, importAMFFromFileTest ) {
|
|||
EXPECT_TRUE(importerTest());
|
||||
}
|
||||
|
||||
|
||||
|
||||
TEST_F(utAMFImportExport, importAMFWithMatFromFileTest) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AMF/test_with_mat.amf", aiProcess_ValidateDataStructure);
|
||||
|
|
|
@ -39,18 +39,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
class utASEImportExport : public AbstractImportExportBase {
|
||||
public:
|
||||
virtual bool importerTest() {
|
||||
bool importerTest() override {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/ASE/ThreeCubesGreen.ASE", aiProcess_ValidateDataStructure);
|
||||
#ifndef ASSIMP_BUILD_NO_3DS_IMPORTER
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -40,18 +38,17 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "TestModelFactory.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
#include "PostProcessing/ArmaturePopulate.h"
|
||||
|
||||
|
|
|
@ -39,12 +39,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -40,17 +38,17 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
class utBVHImportExport : public AbstractImportExportBase {
|
||||
public:
|
||||
virtual bool importerTest() {
|
||||
bool importerTest() override {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BVH/01_01.bvh", aiProcess_ValidateDataStructure);
|
||||
return nullptr != scene;
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -43,34 +41,29 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/cexport.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/postprocess.h>
|
||||
|
||||
class BlendImportAreaLight : public ::testing::Test {
|
||||
public:
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
void SetUp() override {
|
||||
im = new Assimp::Importer();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
void TearDown() override {
|
||||
delete im;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
Assimp::Importer *im;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(BlendImportAreaLight, testImportLight)
|
||||
{
|
||||
TEST_F(BlendImportAreaLight, testImportLight) {
|
||||
const aiScene *pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/AreaLight_269.blend", aiProcess_ValidateDataStructure);
|
||||
ASSERT_TRUE(pTest != NULL);
|
||||
ASSERT_TRUE(pTest != nullptr);
|
||||
ASSERT_TRUE(pTest->HasLights());
|
||||
|
||||
std::vector<std::pair<std::string, size_t>> lightNames;
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -43,31 +41,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/cexport.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
class BlendImportMaterials : public ::testing::Test {
|
||||
public:
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
void SetUp() override {
|
||||
im = new Assimp::Importer();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
void TearDown() override {
|
||||
delete im;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
Assimp::Importer *im;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(BlendImportMaterials, testImportMaterial)
|
||||
{
|
||||
TEST_F(BlendImportMaterials, testImportMaterial) {
|
||||
const aiScene *pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/BlenderMaterial_269.blend", aiProcess_ValidateDataStructure);
|
||||
ASSERT_TRUE(pTest != NULL);
|
||||
ASSERT_TRUE(pTest->HasMaterials());
|
||||
|
@ -126,8 +119,7 @@ TEST_F(BlendImportMaterials, testImportMaterial)
|
|||
ASSERT_PROPERTY_FLOAT_EQ(0.87f, "mirror.glossAnisotropic", mirrorGlossAnisotropic);
|
||||
}
|
||||
|
||||
TEST_F(BlendImportMaterials, testImportMaterialwith2texturesAnd2TexCoordMappings)
|
||||
{
|
||||
TEST_F(BlendImportMaterials, testImportMaterialwith2texturesAnd2TexCoordMappings) {
|
||||
const aiScene *pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/plane_2_textures_2_texcoords_279.blend", aiProcess_ValidateDataStructure);
|
||||
ASSERT_TRUE(pTest != NULL);
|
||||
|
||||
|
|
|
@ -40,11 +40,11 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
@ -61,7 +61,6 @@ TEST_F( utBlenderImporterExporter, importBlenFromFileTest ) {
|
|||
EXPECT_TRUE(importerTest());
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, import4cubes) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/4Cubes4Mats_248.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -69,14 +68,12 @@ TEST( utBlenderImporter, import4cubes ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, import269_regress1) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/blender_269_regress1.blend", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importBlenderDefault248) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/BlenderDefault_248.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -84,7 +81,6 @@ TEST( utBlenderImporter, importBlenderDefault248 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importBlenderDefault250) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/BlenderDefault_250.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -92,7 +88,6 @@ TEST( utBlenderImporter, importBlenderDefault250 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importBlenderDefault250Compressed) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/BlenderDefault_250_Compressed.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -100,7 +95,6 @@ TEST( utBlenderImporter, importBlenderDefault250Compressed ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importBlenderDefault262) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/BlenderDefault_262.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -108,21 +102,18 @@ TEST( utBlenderImporter, importBlenderDefault262 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importBlenderDefault269) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/BlenderDefault_269.blend", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importBlenderDefault271) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/BlenderDefault_271.blend", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importCubeHierarchy_248) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/CubeHierarchy_248.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -130,7 +121,6 @@ TEST( utBlenderImporter, importCubeHierarchy_248 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importHuman) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/HUMAN.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -138,7 +128,6 @@ TEST( utBlenderImporter, importHuman ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importMirroredCube_252) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/MirroredCube_252.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -146,7 +135,6 @@ TEST( utBlenderImporter, importMirroredCube_252 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importNoisyTexturedCube_VoronoiGlob_248) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/NoisyTexturedCube_VoronoiGlob_248.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -154,7 +142,6 @@ TEST( utBlenderImporter, importNoisyTexturedCube_VoronoiGlob_248 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importSmoothVsSolidCube_248) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/SmoothVsSolidCube_248.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -162,7 +149,6 @@ TEST( utBlenderImporter, importSmoothVsSolidCube_248 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importSuzanne_248) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/Suzanne_248.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -170,7 +156,6 @@ TEST( utBlenderImporter, importSuzanne_248 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importSuzanneSubdiv_252) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/SuzanneSubdiv_252.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -178,7 +163,6 @@ TEST( utBlenderImporter, importSuzanneSubdiv_252 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importTexturedCube_ImageGlob_248) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/TexturedCube_ImageGlob_248.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -186,7 +170,6 @@ TEST( utBlenderImporter, importTexturedCube_ImageGlob_248 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importTexturedPlane_ImageUv_248) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/TexturedPlane_ImageUv_248.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -194,7 +177,6 @@ TEST( utBlenderImporter, importTexturedPlane_ImageUv_248 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importTexturedPlane_ImageUvPacked_248) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/TexturedPlane_ImageUvPacked_248.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -202,7 +184,6 @@ TEST( utBlenderImporter, importTexturedPlane_ImageUvPacked_248 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importTorusLightsCams_250_compressed) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/TorusLightsCams_250_compressed.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -210,7 +191,6 @@ TEST( utBlenderImporter, importTorusLightsCams_250_compressed ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, import_yxa_1) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/yxa_1.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -218,7 +198,6 @@ TEST( utBlenderImporter, import_yxa_1 ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importBob) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/BLEND/Bob.blend", aiProcess_ValidateDataStructure);
|
||||
|
@ -226,7 +205,6 @@ TEST( utBlenderImporter, importBob ) {
|
|||
ASSERT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utBlenderImporter, importFleurOptonl) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/BLEND/fleurOptonl.blend", aiProcess_ValidateDataStructure);
|
||||
|
|
|
@ -40,8 +40,8 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "Blender/BlenderIntermediate.h"
|
||||
#include "UnitTestPCH.h"
|
||||
#include <assimp/camera.h>
|
||||
#include <assimp/light.h>
|
||||
#include <assimp/mesh.h>
|
||||
|
@ -78,8 +78,3 @@ TEST_F( BlenderIntermediateTest,ConversionData_ObjectCompareTest ) {
|
|||
res = cmp_false_because_first_is_greater_than_second(&obj2, &obj1);
|
||||
EXPECT_FALSE(res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -40,26 +40,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include <assimp/cexport.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace ::Assimp;
|
||||
|
||||
class BlenderWorkTest : public ::testing::Test {
|
||||
public:
|
||||
virtual void SetUp()
|
||||
{
|
||||
virtual void SetUp() {
|
||||
im = new Assimp::Importer();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
virtual void TearDown() {
|
||||
delete im;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
Assimp::Importer *im;
|
||||
};
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -40,11 +38,11 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -43,10 +41,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/cexport.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/postprocess.h>
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
|
||||
|
@ -55,7 +53,6 @@ public:
|
|||
void SetUp() override {
|
||||
ex = new Assimp::Exporter();
|
||||
im = new Assimp::Importer();
|
||||
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
@ -77,7 +74,6 @@ TEST_F(ColladaExportCamera, testExportCamera) {
|
|||
ASSERT_NE(nullptr, pTest);
|
||||
ASSERT_TRUE(pTest->HasCameras());
|
||||
|
||||
|
||||
EXPECT_EQ(AI_SUCCESS, ex->Export(pTest, "collada", file));
|
||||
const unsigned int origNumCams(pTest->mNumCameras);
|
||||
std::unique_ptr<float[]> origFOV(new float[origNumCams]);
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -44,23 +42,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include <assimp/cexport.h>
|
||||
#include <assimp/commonMetaData.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/postprocess.h>
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
|
||||
class ColladaExportLight : public ::testing::Test {
|
||||
public:
|
||||
virtual void SetUp()
|
||||
{
|
||||
void SetUp() override {
|
||||
ex = new Assimp::Exporter();
|
||||
im = new Assimp::Importer();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
void TearDown() override {
|
||||
delete ex;
|
||||
delete im;
|
||||
}
|
||||
|
@ -71,8 +67,7 @@ protected:
|
|||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(ColladaExportLight, testExportLight)
|
||||
{
|
||||
TEST_F(ColladaExportLight, testExportLight) {
|
||||
const char *file = "lightsExp.dae";
|
||||
|
||||
const aiScene *pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/Collada/lights.dae", aiProcess_ValidateDataStructure);
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -40,13 +38,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
#include "3MF/D3MFExporter.h"
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,18 +39,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
class utDXFImporterExporter : public AbstractImportExportBase {
|
||||
public:
|
||||
virtual bool importerTest() {
|
||||
bool importerTest() override {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/DXF/PinkEggFromLW.dxf", aiProcess_ValidateDataStructure);
|
||||
return nullptr != scene;
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,16 +39,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/commonMetaData.h>
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/commonMetaData.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
@ -77,7 +75,6 @@ TEST_F( utFBXImporterExporter, importBareBoxWithoutColorsAndTextureCoords ) {
|
|||
EXPECT_EQ(mesh->mNumVertices, 36u);
|
||||
}
|
||||
|
||||
|
||||
TEST_F(utFBXImporterExporter, importCubesWithNoNames) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/FBX/cubes_nonames.fbx", aiProcess_ValidateDataStructure);
|
||||
|
|
|
@ -47,10 +47,8 @@ using namespace Assimp;
|
|||
|
||||
class FindDegeneratesProcessTest : public ::testing::Test {
|
||||
public:
|
||||
FindDegeneratesProcessTest()
|
||||
: Test()
|
||||
, mMesh( nullptr )
|
||||
, mProcess( nullptr ) {
|
||||
FindDegeneratesProcessTest() :
|
||||
Test(), mMesh(nullptr), mProcess(nullptr) {
|
||||
// empty
|
||||
}
|
||||
|
||||
|
@ -99,8 +97,7 @@ void FindDegeneratesProcessTest::SetUp() {
|
|||
if (n && i % 2 && 0 == n % 2) {
|
||||
f.mIndices[n] = f.mIndices[n - 1] + 5000;
|
||||
had = true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
f.mIndices[n] = numOut++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,10 +48,8 @@ using namespace Assimp;
|
|||
|
||||
class utFindInvalidDataProcess : public ::testing::Test {
|
||||
public:
|
||||
utFindInvalidDataProcess()
|
||||
: Test()
|
||||
, mMesh(nullptr)
|
||||
, mProcess(nullptr) {
|
||||
utFindInvalidDataProcess() :
|
||||
Test(), mMesh(nullptr), mProcess(nullptr) {
|
||||
// empty
|
||||
}
|
||||
|
||||
|
|
|
@ -48,11 +48,8 @@ using namespace Assimp;
|
|||
|
||||
class utGenBoundingBoxesProcess : public ::testing::Test {
|
||||
public:
|
||||
utGenBoundingBoxesProcess()
|
||||
: Test()
|
||||
, mProcess(nullptr)
|
||||
, mMesh(nullptr)
|
||||
, mScene(nullptr) {
|
||||
utGenBoundingBoxesProcess() :
|
||||
Test(), mProcess(nullptr), mMesh(nullptr), mScene(nullptr) {
|
||||
// empty
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -47,8 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
using namespace ::std;
|
||||
using namespace ::Assimp;
|
||||
|
||||
class GenNormalsTest : public ::testing::Test
|
||||
{
|
||||
class GenNormalsTest : public ::testing::Test {
|
||||
public:
|
||||
virtual void SetUp();
|
||||
virtual void TearDown();
|
||||
|
@ -59,8 +56,7 @@ protected:
|
|||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void GenNormalsTest::SetUp()
|
||||
{
|
||||
void GenNormalsTest::SetUp() {
|
||||
piProcess = new GenVertexNormalsProcess();
|
||||
pcMesh = new aiMesh();
|
||||
pcMesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
|
||||
|
@ -78,15 +74,13 @@ void GenNormalsTest::SetUp()
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void GenNormalsTest::TearDown()
|
||||
{
|
||||
void GenNormalsTest::TearDown() {
|
||||
delete this->pcMesh;
|
||||
delete this->piProcess;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(GenNormalsTest, testSimpleTriangle)
|
||||
{
|
||||
TEST_F(GenNormalsTest, testSimpleTriangle) {
|
||||
piProcess->GenMeshVertexNormals(pcMesh, 0);
|
||||
EXPECT_TRUE(pcMesh->mNormals != NULL);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -49,10 +49,8 @@ using namespace Assimp;
|
|||
|
||||
class utJoinVertices : public ::testing::Test {
|
||||
public:
|
||||
utJoinVertices()
|
||||
: Test()
|
||||
, piProcess(nullptr)
|
||||
, pcMesh(nullptr) {
|
||||
utJoinVertices() :
|
||||
Test(), piProcess(nullptr), pcMesh(nullptr) {
|
||||
// empty
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -40,15 +38,14 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "UnitTestPCH.h"
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
class utLWOImportExport : public AbstractImportExportBase {
|
||||
public:
|
||||
virtual bool importerTest() {
|
||||
|
@ -78,4 +75,3 @@ TEST_F(utLWOImportExport, importLWOformatdetection) {
|
|||
|
||||
EXPECT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -40,15 +38,14 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "UnitTestPCH.h"
|
||||
#include <assimp/postprocess.h>
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
class utLWSImportExport : public AbstractImportExportBase {
|
||||
public:
|
||||
virtual bool importerTest() {
|
||||
|
@ -139,4 +136,3 @@ TEST_F(utLWSImportExport, importLWSmove_xz_spline) {
|
|||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/LWS/move_xz_spline.lws", aiProcess_ValidateDataStructure);
|
||||
EXPECT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,18 +40,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/scene.h>
|
||||
#include "PostProcessing/LimitBoneWeightsProcess.h"
|
||||
#include <assimp/scene.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
||||
class LimitBoneWeightsTest : public ::testing::Test {
|
||||
public:
|
||||
LimitBoneWeightsTest()
|
||||
: Test()
|
||||
, mProcess(nullptr)
|
||||
, mMesh(nullptr) {
|
||||
LimitBoneWeightsTest() :
|
||||
Test(), mProcess(nullptr), mMesh(nullptr) {
|
||||
// empty
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
Copyright (c) 2006-2020, assimp tea
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
@ -41,12 +40,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -42,8 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/scene.h>
|
||||
#include "Material/MaterialSystem.h"
|
||||
#include <assimp/scene.h>
|
||||
|
||||
using namespace ::std;
|
||||
using namespace ::Assimp;
|
||||
|
@ -58,8 +56,7 @@ protected:
|
|||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(MaterialSystemTest, testFloatProperty)
|
||||
{
|
||||
TEST_F(MaterialSystemTest, testFloatProperty) {
|
||||
float pf = 150392.63f;
|
||||
this->pcMat->AddProperty(&pf, 1, "testKey1");
|
||||
pf = 0.0f;
|
||||
|
@ -69,8 +66,7 @@ TEST_F(MaterialSystemTest, testFloatProperty)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(MaterialSystemTest, testFloatArrayProperty)
|
||||
{
|
||||
TEST_F(MaterialSystemTest, testFloatArrayProperty) {
|
||||
float pf[] = { 0.0f, 1.0f, 2.0f, 3.0f };
|
||||
unsigned int pMax = sizeof(pf) / sizeof(float);
|
||||
this->pcMat->AddProperty(pf, pMax, "testKey2");
|
||||
|
@ -82,8 +78,7 @@ TEST_F(MaterialSystemTest, testFloatArrayProperty)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(MaterialSystemTest, testIntProperty)
|
||||
{
|
||||
TEST_F(MaterialSystemTest, testIntProperty) {
|
||||
int pf = 15039263;
|
||||
this->pcMat->AddProperty(&pf, 1, "testKey3");
|
||||
pf = 12;
|
||||
|
@ -93,8 +88,7 @@ TEST_F(MaterialSystemTest, testIntProperty)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(MaterialSystemTest, testIntArrayProperty)
|
||||
{
|
||||
TEST_F(MaterialSystemTest, testIntArrayProperty) {
|
||||
int pf[] = { 0, 1, 2, 3 };
|
||||
unsigned int pMax = sizeof(pf) / sizeof(int);
|
||||
this->pcMat->AddProperty(pf, pMax, "testKey4");
|
||||
|
@ -106,10 +100,12 @@ TEST_F(MaterialSystemTest, testIntArrayProperty)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(MaterialSystemTest, testColorProperty)
|
||||
{
|
||||
TEST_F(MaterialSystemTest, testColorProperty) {
|
||||
aiColor4D clr;
|
||||
clr.r = 2.0f;clr.g = 3.0f;clr.b = 4.0f;clr.a = 5.0f;
|
||||
clr.r = 2.0f;
|
||||
clr.g = 3.0f;
|
||||
clr.b = 4.0f;
|
||||
clr.a = 5.0f;
|
||||
this->pcMat->AddProperty(&clr, 1, "testKey5");
|
||||
clr.b = 1.0f;
|
||||
clr.a = clr.g = clr.r = 0.0f;
|
||||
|
@ -128,7 +124,6 @@ TEST_F(MaterialSystemTest, testStringProperty) {
|
|||
EXPECT_STREQ("Hello, this is a small test", s.data);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(MaterialSystemTest, testMaterialNameAccess) {
|
||||
aiMaterial *mat = new aiMaterial();
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -57,11 +55,7 @@ TEST_F( utMatrix3x3Test, FromToMatrixTest ) {
|
|||
const double PRECISION = 0.000001;
|
||||
|
||||
// axes test
|
||||
aiVector3D axes[] =
|
||||
{ aiVector3D(1, 0, 0)
|
||||
, aiVector3D(0, 1, 0)
|
||||
, aiVector3D(0, 0, 1)
|
||||
};
|
||||
aiVector3D axes[] = { aiVector3D(1, 0, 0), aiVector3D(0, 1, 0), aiVector3D(0, 0, 1) };
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
|
@ -80,16 +74,8 @@ TEST_F( utMatrix3x3Test, FromToMatrixTest ) {
|
|||
aiVector3D from, to;
|
||||
|
||||
for (int i = 0; i < NUM_SAMPLES; ++i) {
|
||||
from = aiVector3D
|
||||
( 1.f * rand() / RAND_MAX
|
||||
, 1.f * rand() / RAND_MAX
|
||||
, 1.f * rand() / RAND_MAX
|
||||
).Normalize();
|
||||
to = aiVector3D
|
||||
( 1.f * rand() / RAND_MAX
|
||||
, 1.f * rand() / RAND_MAX
|
||||
, 1.f * rand() / RAND_MAX
|
||||
).Normalize();
|
||||
from = aiVector3D(1.f * rand() / RAND_MAX, 1.f * rand() / RAND_MAX, 1.f * rand() / RAND_MAX).Normalize();
|
||||
to = aiVector3D(1.f * rand() / RAND_MAX, 1.f * rand() / RAND_MAX, 1.f * rand() / RAND_MAX).Normalize();
|
||||
|
||||
aiMatrix3x3::FromToMatrix(from, to, trafo);
|
||||
res = trafo * from;
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -46,7 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
using namespace Assimp;
|
||||
|
||||
class utMatrix4x4 : public ::testing::Test {
|
||||
|
||||
};
|
||||
|
||||
TEST_F(utMatrix4x4, badIndexOperatorTest) {
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -40,9 +38,9 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "Obj/ObjTools.h"
|
||||
#include "Obj/ObjFileParser.h"
|
||||
#include "Obj/ObjTools.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
using namespace ::Assimp;
|
||||
|
||||
|
@ -52,7 +50,8 @@ class utObjTools : public ::testing::Test {
|
|||
|
||||
class TestObjFileParser : public ObjFileParser {
|
||||
public:
|
||||
TestObjFileParser() : ObjFileParser(){
|
||||
TestObjFileParser() :
|
||||
ObjFileParser() {
|
||||
// empty
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,14 +39,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
class utOpenGEXImportExport : public AbstractImportExportBase {
|
||||
public:
|
||||
virtual bool importerTest() {
|
||||
|
@ -66,7 +63,6 @@ TEST_F( utOpenGEXImportExport, Importissue1262_NoCrash ) {
|
|||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/OpenGEX/light_issue1262.ogex", 0);
|
||||
EXPECT_NE(nullptr, scene);
|
||||
|
||||
}
|
||||
|
||||
TEST_F(utOpenGEXImportExport, Importissue1340_EmptyCameraObject) {
|
||||
|
|
|
@ -5,7 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,11 +40,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace ::Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -42,19 +40,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/scene.h>
|
||||
#include "PostProcessing/PretransformVertices.h"
|
||||
|
||||
#include <assimp/scene.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
||||
class PretransformVerticesTest : public ::testing::Test {
|
||||
public:
|
||||
PretransformVerticesTest()
|
||||
: Test()
|
||||
, mScene(nullptr)
|
||||
, mProcess(nullptr) {
|
||||
PretransformVerticesTest() :
|
||||
Test(), mScene(nullptr), mProcess(nullptr) {
|
||||
// empty
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -44,8 +42,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "AbstractImportExportBase.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -44,14 +42,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include <assimp/RemoveComments.h>
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST(RemoveCommentsTest, testSingleLineComments)
|
||||
{
|
||||
TEST(RemoveCommentsTest, testSingleLineComments) {
|
||||
const char *szTest = "int i = 0; \n"
|
||||
"if (4 == //)\n"
|
||||
"\ttrue) { // do something here \n"
|
||||
|
@ -73,8 +68,7 @@ TEST(RemoveCommentsTest, testSingleLineComments)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST(RemoveCommentsTest, testMultiLineComments)
|
||||
{
|
||||
TEST(RemoveCommentsTest, testMultiLineComments) {
|
||||
const char *szTest =
|
||||
"/* comment to be removed */\n"
|
||||
"valid text /* \n "
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -42,9 +40,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/scene.h>
|
||||
#include "PostProcessing/RemoveVCProcess.h"
|
||||
#include "Material/MaterialSystem.h"
|
||||
#include "PostProcessing/RemoveVCProcess.h"
|
||||
#include <assimp/scene.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
@ -60,8 +58,7 @@ protected:
|
|||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void RemoveVCProcessTest::SetUp()
|
||||
{
|
||||
void RemoveVCProcessTest::SetUp() {
|
||||
// construct the process
|
||||
piProcess = new RemoveVCProcess();
|
||||
pScene = new aiScene();
|
||||
|
@ -111,15 +108,13 @@ void RemoveVCProcessTest::SetUp()
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void RemoveVCProcessTest::TearDown()
|
||||
{
|
||||
void RemoveVCProcessTest::TearDown() {
|
||||
delete pScene;
|
||||
delete piProcess;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveVCProcessTest, testMeshRemove)
|
||||
{
|
||||
TEST_F(RemoveVCProcessTest, testMeshRemove) {
|
||||
piProcess->SetDeleteFlags(aiComponent_MESHES);
|
||||
piProcess->Execute(pScene);
|
||||
|
||||
|
@ -129,8 +124,7 @@ TEST_F(RemoveVCProcessTest, testMeshRemove)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveVCProcessTest, testAnimRemove)
|
||||
{
|
||||
TEST_F(RemoveVCProcessTest, testAnimRemove) {
|
||||
piProcess->SetDeleteFlags(aiComponent_ANIMATIONS);
|
||||
piProcess->Execute(pScene);
|
||||
|
||||
|
@ -140,8 +134,7 @@ TEST_F(RemoveVCProcessTest, testAnimRemove)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveVCProcessTest, testMaterialRemove)
|
||||
{
|
||||
TEST_F(RemoveVCProcessTest, testMaterialRemove) {
|
||||
piProcess->SetDeleteFlags(aiComponent_MATERIALS);
|
||||
piProcess->Execute(pScene);
|
||||
|
||||
|
@ -153,8 +146,7 @@ TEST_F(RemoveVCProcessTest, testMaterialRemove)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveVCProcessTest, testTextureRemove)
|
||||
{
|
||||
TEST_F(RemoveVCProcessTest, testTextureRemove) {
|
||||
piProcess->SetDeleteFlags(aiComponent_TEXTURES);
|
||||
piProcess->Execute(pScene);
|
||||
|
||||
|
@ -164,8 +156,7 @@ TEST_F(RemoveVCProcessTest, testTextureRemove)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveVCProcessTest, testCameraRemove)
|
||||
{
|
||||
TEST_F(RemoveVCProcessTest, testCameraRemove) {
|
||||
piProcess->SetDeleteFlags(aiComponent_CAMERAS);
|
||||
piProcess->Execute(pScene);
|
||||
|
||||
|
@ -175,8 +166,7 @@ TEST_F(RemoveVCProcessTest, testCameraRemove)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveVCProcessTest, testLightRemove)
|
||||
{
|
||||
TEST_F(RemoveVCProcessTest, testLightRemove) {
|
||||
piProcess->SetDeleteFlags(aiComponent_LIGHTS);
|
||||
piProcess->Execute(pScene);
|
||||
|
||||
|
@ -186,8 +176,7 @@ TEST_F(RemoveVCProcessTest, testLightRemove)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveVCProcessTest, testMeshComponentsRemoveA)
|
||||
{
|
||||
TEST_F(RemoveVCProcessTest, testMeshComponentsRemoveA) {
|
||||
piProcess->SetDeleteFlags(aiComponent_TEXCOORDSn(1) | aiComponent_TEXCOORDSn(2) | aiComponent_TEXCOORDSn(3));
|
||||
piProcess->Execute(pScene);
|
||||
|
||||
|
@ -199,8 +188,7 @@ TEST_F(RemoveVCProcessTest, testMeshComponentsRemoveA)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveVCProcessTest, testMeshComponentsRemoveB)
|
||||
{
|
||||
TEST_F(RemoveVCProcessTest, testMeshComponentsRemoveB) {
|
||||
piProcess->SetDeleteFlags(aiComponent_TEXCOORDSn(1) | aiComponent_NORMALS);
|
||||
piProcess->Execute(pScene);
|
||||
|
||||
|
@ -213,8 +201,7 @@ TEST_F(RemoveVCProcessTest, testMeshComponentsRemoveB)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveVCProcessTest, testRemoveEverything)
|
||||
{
|
||||
TEST_F(RemoveVCProcessTest, testRemoveEverything) {
|
||||
piProcess->SetDeleteFlags(aiComponent_LIGHTS | aiComponent_ANIMATIONS |
|
||||
aiComponent_MATERIALS | aiComponent_MESHES | aiComponent_CAMERAS | aiComponent_TEXTURES);
|
||||
piProcess->Execute(pScene);
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -42,9 +40,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/scene.h>
|
||||
#include "PostProcessing/RemoveRedundantMaterials.h"
|
||||
#include "Material/MaterialSystem.h"
|
||||
#include "PostProcessing/RemoveRedundantMaterials.h"
|
||||
#include <assimp/scene.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
@ -60,8 +58,7 @@ protected:
|
|||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
aiMaterial* getUniqueMaterial1()
|
||||
{
|
||||
aiMaterial *getUniqueMaterial1() {
|
||||
// setup an unique name for each material - this shouldn't care
|
||||
aiString mTemp;
|
||||
mTemp.Set("UniqueMat1");
|
||||
|
@ -75,23 +72,22 @@ aiMaterial* getUniqueMaterial1()
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
aiMaterial* getUniqueMaterial2()
|
||||
{
|
||||
aiMaterial *getUniqueMaterial2() {
|
||||
// setup an unique name for each material - this shouldn't care
|
||||
aiString mTemp;
|
||||
mTemp.Set("Unique Mat2");
|
||||
|
||||
aiMaterial *pcMat = new aiMaterial();
|
||||
pcMat->AddProperty(&mTemp, AI_MATKEY_NAME);
|
||||
float f = 4.0f;int i = 1;
|
||||
float f = 4.0f;
|
||||
int i = 1;
|
||||
pcMat->AddProperty<float>(&f, 1, AI_MATKEY_BUMPSCALING);
|
||||
pcMat->AddProperty<int>(&i, 1, AI_MATKEY_ENABLE_WIREFRAME);
|
||||
return pcMat;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
aiMaterial* getUniqueMaterial3()
|
||||
{
|
||||
aiMaterial *getUniqueMaterial3() {
|
||||
// setup an unique name for each material - this shouldn't care
|
||||
aiString mTemp;
|
||||
mTemp.Set("Complex material name");
|
||||
|
@ -102,8 +98,7 @@ aiMaterial* getUniqueMaterial3()
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void RemoveRedundantMatsTest::SetUp()
|
||||
{
|
||||
void RemoveRedundantMatsTest::SetUp() {
|
||||
// construct the process
|
||||
piProcess = new RemoveRedundantMatsProcess();
|
||||
|
||||
|
@ -143,15 +138,13 @@ void RemoveRedundantMatsTest::SetUp()
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void RemoveRedundantMatsTest::TearDown()
|
||||
{
|
||||
void RemoveRedundantMatsTest::TearDown() {
|
||||
delete piProcess;
|
||||
delete pcScene1;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveRedundantMatsTest, testRedundantMaterials)
|
||||
{
|
||||
TEST_F(RemoveRedundantMatsTest, testRedundantMaterials) {
|
||||
piProcess->SetFixedMaterialsString();
|
||||
|
||||
piProcess->Execute(pcScene1);
|
||||
|
@ -164,12 +157,10 @@ TEST_F(RemoveRedundantMatsTest, testRedundantMaterials)
|
|||
aiString sName;
|
||||
EXPECT_EQ(AI_SUCCESS, aiGetMaterialString(pcScene1->mMaterials[2], AI_MATKEY_NAME, &sName));
|
||||
EXPECT_STREQ("Complex material name", sName.data);
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(RemoveRedundantMatsTest, testRedundantMaterialsWithExcludeList)
|
||||
{
|
||||
TEST_F(RemoveRedundantMatsTest, testRedundantMaterialsWithExcludeList) {
|
||||
piProcess->SetFixedMaterialsString("\'Unique Mat2\'\t\'Complex material name\' and_another_one_which_we_wont_use");
|
||||
|
||||
piProcess->Execute(pcScene1);
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -40,8 +38,8 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "PostProcessing/RemoveVCProcess.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/scene.h>
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -44,8 +42,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "SIB/SIBImporter.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
#include "AbstractImportExportBase.h"
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -42,10 +40,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include "SMD/SMDLoader.h"
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SMD/SMDLoader.h"
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace ::Assimp;
|
||||
|
||||
|
@ -62,8 +60,7 @@ TEST_F( utSMDImporter, createTest ) {
|
|||
bool ok(true);
|
||||
try {
|
||||
SMDImporter myImporter;
|
||||
}
|
||||
catch ( ... ) {
|
||||
} catch (...) {
|
||||
ok = false;
|
||||
}
|
||||
EXPECT_TRUE(ok);
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,14 +39,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
@ -67,7 +65,6 @@ TEST_F( utSTLImporterExporter, importSTLFromFileTest ) {
|
|||
EXPECT_TRUE(importerTest());
|
||||
}
|
||||
|
||||
|
||||
TEST_F(utSTLImporterExporter, test_multiple) {
|
||||
// import same file twice, each with its own importer
|
||||
// must work both times and not crash
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -40,9 +38,9 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "PostProcessing/ScaleProcess.h"
|
||||
#include "TestModelFactory.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
namespace Assimp {
|
||||
namespace UnitTest {
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -42,20 +40,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include "Common/ScenePreprocessor.h"
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include "Common/ScenePreprocessor.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
||||
class ScenePreprocessorTest : public ::testing::Test {
|
||||
public:
|
||||
ScenePreprocessorTest()
|
||||
: Test()
|
||||
, mScenePreprocessor(nullptr)
|
||||
, mScene(nullptr) {
|
||||
ScenePreprocessorTest() :
|
||||
Test(), mScenePreprocessor(nullptr), mScene(nullptr) {
|
||||
// empty
|
||||
}
|
||||
|
||||
|
@ -199,4 +195,3 @@ TEST_F(ScenePreprocessorTest, testAnimationPreprocessingPos) {
|
|||
|
||||
delete p;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -42,20 +40,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/scene.h>
|
||||
#include "Common/ScenePreprocessor.h"
|
||||
#include "PostProcessing/SortByPTypeProcess.h"
|
||||
#include <assimp/scene.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
class SortByPTypeProcessTest : public ::testing::Test {
|
||||
public:
|
||||
SortByPTypeProcessTest()
|
||||
: Test()
|
||||
, mProcess1(nullptr)
|
||||
, mScene(nullptr) {
|
||||
SortByPTypeProcessTest() :
|
||||
Test(), mProcess1(nullptr), mScene(nullptr) {
|
||||
// empty
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -42,8 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/scene.h>
|
||||
#include "PostProcessing/SplitLargeMeshes.h"
|
||||
#include <assimp/scene.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
@ -54,34 +52,28 @@ public:
|
|||
virtual void TearDown();
|
||||
|
||||
protected:
|
||||
|
||||
SplitLargeMeshesProcess_Triangle *piProcessTriangle;
|
||||
SplitLargeMeshesProcess_Vertex *piProcessVertex;
|
||||
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void SplitLargeMeshesTest::SetUp()
|
||||
{
|
||||
void SplitLargeMeshesTest::SetUp() {
|
||||
// construct the processes
|
||||
this->piProcessTriangle = new SplitLargeMeshesProcess_Triangle();
|
||||
this->piProcessVertex = new SplitLargeMeshesProcess_Vertex();
|
||||
|
||||
this->piProcessTriangle->SetLimit(1000);
|
||||
this->piProcessVertex->SetLimit(1000);
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void SplitLargeMeshesTest::TearDown()
|
||||
{
|
||||
void SplitLargeMeshesTest::TearDown() {
|
||||
delete this->piProcessTriangle;
|
||||
delete this->piProcessVertex;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(SplitLargeMeshesTest, testVertexSplit)
|
||||
{
|
||||
TEST_F(SplitLargeMeshesTest, testVertexSplit) {
|
||||
std::vector<std::pair<aiMesh *, unsigned int>> avOut;
|
||||
|
||||
aiMesh *pcMesh1 = new aiMesh();
|
||||
|
@ -93,8 +85,7 @@ TEST_F(SplitLargeMeshesTest, testVertexSplit)
|
|||
pcMesh1->mFaces = new aiFace[pcMesh1->mNumFaces];
|
||||
|
||||
unsigned int qq = 0;
|
||||
for (unsigned int i = 0; i < pcMesh1->mNumFaces;++i)
|
||||
{
|
||||
for (unsigned int i = 0; i < pcMesh1->mNumFaces; ++i) {
|
||||
aiFace &face = pcMesh1->mFaces[i];
|
||||
face.mNumIndices = 3;
|
||||
face.mIndices = new unsigned int[3];
|
||||
|
@ -103,14 +94,13 @@ TEST_F(SplitLargeMeshesTest, testVertexSplit)
|
|||
face.mIndices[2] = qq++;
|
||||
}
|
||||
|
||||
|
||||
int iOldFaceNum = (int)pcMesh1->mNumFaces;
|
||||
piProcessVertex->SplitMesh(0, pcMesh1, avOut);
|
||||
|
||||
for (std::vector<std::pair<aiMesh *, unsigned int>>::const_iterator
|
||||
iter = avOut.begin(), end = avOut.end();
|
||||
iter != end; ++iter)
|
||||
{
|
||||
iter = avOut.begin(),
|
||||
end = avOut.end();
|
||||
iter != end; ++iter) {
|
||||
aiMesh *mesh = (*iter).first;
|
||||
EXPECT_LT(mesh->mNumVertices, 1000U);
|
||||
EXPECT_TRUE(NULL != mesh->mNormals);
|
||||
|
@ -123,8 +113,7 @@ TEST_F(SplitLargeMeshesTest, testVertexSplit)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(SplitLargeMeshesTest, testTriangleSplit)
|
||||
{
|
||||
TEST_F(SplitLargeMeshesTest, testTriangleSplit) {
|
||||
std::vector<std::pair<aiMesh *, unsigned int>> avOut;
|
||||
|
||||
// generate many, many faces with randomized indices for
|
||||
|
@ -137,8 +126,7 @@ TEST_F(SplitLargeMeshesTest, testTriangleSplit)
|
|||
pcMesh2->mNumFaces = 10000;
|
||||
pcMesh2->mFaces = new aiFace[pcMesh2->mNumFaces];
|
||||
|
||||
for (unsigned int i = 0; i < pcMesh2->mNumFaces;++i)
|
||||
{
|
||||
for (unsigned int i = 0; i < pcMesh2->mNumFaces; ++i) {
|
||||
aiFace &face = pcMesh2->mFaces[i];
|
||||
face.mNumIndices = 3;
|
||||
face.mIndices = new unsigned int[3];
|
||||
|
@ -152,9 +140,9 @@ TEST_F(SplitLargeMeshesTest, testTriangleSplit)
|
|||
piProcessTriangle->SplitMesh(0, pcMesh2, avOut);
|
||||
|
||||
for (std::vector<std::pair<aiMesh *, unsigned int>>::const_iterator
|
||||
iter = avOut.begin(), end = avOut.end();
|
||||
iter != end; ++iter)
|
||||
{
|
||||
iter = avOut.begin(),
|
||||
end = avOut.end();
|
||||
iter != end; ++iter) {
|
||||
aiMesh *mesh = (*iter).first;
|
||||
EXPECT_LT(mesh->mNumFaces, 1000U);
|
||||
EXPECT_TRUE(NULL != mesh->mNormals);
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -44,7 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "PostProcessing/TriangulateProcess.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
||||
|
@ -137,4 +136,3 @@ TEST_F(TriangulateProcessTest, testTriangulation) {
|
|||
// we should have no valid normal vectors now necause we aren't a pure polygon mesh
|
||||
EXPECT_TRUE(pcMesh->mNormals == NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -42,8 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/types.h>
|
||||
|
||||
#include "Common/VertexTriangleAdjacency.h"
|
||||
|
||||
|
@ -56,8 +54,7 @@ protected:
|
|||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(VTAdjacencyTest, largeRandomDataSet)
|
||||
{
|
||||
TEST_F(VTAdjacencyTest, largeRandomDataSet) {
|
||||
// build a test mesh with randomized input data
|
||||
// *******************************************************************************
|
||||
aiMesh mesh;
|
||||
|
@ -67,8 +64,7 @@ TEST_F(VTAdjacencyTest, largeRandomDataSet)
|
|||
|
||||
mesh.mFaces = new aiFace[600];
|
||||
unsigned int iCurrent = 0;
|
||||
for (unsigned int i = 0; i < 600;++i)
|
||||
{
|
||||
for (unsigned int i = 0; i < 600; ++i) {
|
||||
aiFace &face = mesh.mFaces[i];
|
||||
face.mNumIndices = 3;
|
||||
face.mIndices = new unsigned int[3];
|
||||
|
@ -76,18 +72,18 @@ TEST_F(VTAdjacencyTest, largeRandomDataSet)
|
|||
if (499 == iCurrent) iCurrent = 0;
|
||||
face.mIndices[0] = iCurrent++;
|
||||
|
||||
|
||||
while(face.mIndices[0] == ( face.mIndices[1] = (unsigned int)(((float)rand()/RAND_MAX)*499)));
|
||||
while (face.mIndices[0] == (face.mIndices[1] = (unsigned int)(((float)rand() / RAND_MAX) * 499)))
|
||||
;
|
||||
while (face.mIndices[0] == (face.mIndices[2] = (unsigned int)(((float)rand() / RAND_MAX) * 499)) ||
|
||||
face.mIndices[1] == face.mIndices[2]);
|
||||
face.mIndices[1] == face.mIndices[2])
|
||||
;
|
||||
}
|
||||
|
||||
checkMesh(mesh);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(VTAdjacencyTest, smallDataSet)
|
||||
{
|
||||
TEST_F(VTAdjacencyTest, smallDataSet) {
|
||||
|
||||
// build a test mesh - this one is extremely small
|
||||
// *******************************************************************************
|
||||
|
@ -120,8 +116,7 @@ TEST_F(VTAdjacencyTest, smallDataSet)
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F(VTAdjacencyTest, unreferencedVerticesSet)
|
||||
{
|
||||
TEST_F(VTAdjacencyTest, unreferencedVerticesSet) {
|
||||
// build a test mesh which does not reference all vertices
|
||||
// *******************************************************************************
|
||||
aiMesh mesh;
|
||||
|
@ -131,8 +126,7 @@ TEST_F(VTAdjacencyTest, unreferencedVerticesSet)
|
|||
|
||||
mesh.mFaces = new aiFace[600];
|
||||
unsigned int iCurrent = 0;
|
||||
for (unsigned int i = 0; i < 600;++i)
|
||||
{
|
||||
for (unsigned int i = 0; i < 600; ++i) {
|
||||
aiFace &face = mesh.mFaces[i];
|
||||
face.mNumIndices = 3;
|
||||
face.mIndices = new unsigned int[3];
|
||||
|
@ -146,19 +140,17 @@ TEST_F(VTAdjacencyTest, unreferencedVerticesSet)
|
|||
if (499 == iCurrent) iCurrent = 0;
|
||||
face.mIndices[2] = iCurrent++;
|
||||
|
||||
if (rand() > RAND_MAX/2 && face.mIndices[0])
|
||||
{
|
||||
if (rand() > RAND_MAX / 2 && face.mIndices[0]) {
|
||||
face.mIndices[0]--;
|
||||
}
|
||||
else if (face.mIndices[1]) face.mIndices[1]--;
|
||||
} else if (face.mIndices[1])
|
||||
face.mIndices[1]--;
|
||||
}
|
||||
|
||||
checkMesh(mesh);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void VTAdjacencyTest::checkMesh(const aiMesh& mesh)
|
||||
{
|
||||
void VTAdjacencyTest::checkMesh(const aiMesh &mesh) {
|
||||
VertexTriangleAdjacency adj(mesh.mFaces, mesh.mNumFaces, mesh.mNumVertices, true);
|
||||
|
||||
unsigned int *const piNum = adj.mLiveTriangles;
|
||||
|
@ -166,11 +158,9 @@ void VTAdjacencyTest::checkMesh(const aiMesh& mesh)
|
|||
// check the primary adjacency table and check whether all faces
|
||||
// are contained in the list
|
||||
unsigned int maxOfs = 0;
|
||||
for (unsigned int i = 0; i < mesh.mNumFaces;++i)
|
||||
{
|
||||
for (unsigned int i = 0; i < mesh.mNumFaces; ++i) {
|
||||
aiFace &face = mesh.mFaces[i];
|
||||
for (unsigned int qq = 0; qq < 3 ;++qq)
|
||||
{
|
||||
for (unsigned int qq = 0; qq < 3; ++qq) {
|
||||
const unsigned int idx = face.mIndices[qq];
|
||||
const unsigned int num = piNum[idx];
|
||||
|
||||
|
@ -181,10 +171,8 @@ void VTAdjacencyTest::checkMesh(const aiMesh& mesh)
|
|||
|
||||
// and search for us ...
|
||||
unsigned int tt = 0;
|
||||
for (; tt < num;++tt,++pi)
|
||||
{
|
||||
if (i == *pi)
|
||||
{
|
||||
for (; tt < num; ++tt, ++pi) {
|
||||
if (i == *pi) {
|
||||
// mask our entry in the table. Finally all entries should be masked
|
||||
*pi = 0xffffffff;
|
||||
|
||||
|
@ -199,17 +187,14 @@ void VTAdjacencyTest::checkMesh(const aiMesh& mesh)
|
|||
|
||||
// now check whether there are invalid faces
|
||||
const unsigned int *pi = adj.mAdjacencyTable;
|
||||
for (unsigned int i = 0; i < maxOfs;++i,++pi)
|
||||
{
|
||||
for (unsigned int i = 0; i < maxOfs; ++i, ++pi) {
|
||||
EXPECT_EQ(0xffffffff, *pi);
|
||||
}
|
||||
|
||||
// check the numTrianglesPerVertex table
|
||||
for (unsigned int i = 0; i < mesh.mNumFaces;++i)
|
||||
{
|
||||
for (unsigned int i = 0; i < mesh.mNumFaces; ++i) {
|
||||
aiFace &face = mesh.mFaces[i];
|
||||
for (unsigned int qq = 0; qq < 3 ;++qq)
|
||||
{
|
||||
for (unsigned int qq = 0; qq < 3; ++qq) {
|
||||
const unsigned int idx = face.mIndices[qq];
|
||||
|
||||
// we should not reach 0 here ...
|
||||
|
@ -219,8 +204,7 @@ void VTAdjacencyTest::checkMesh(const aiMesh& mesh)
|
|||
}
|
||||
|
||||
// check whether we reached 0 in all entries
|
||||
for (unsigned int i = 0; i < mesh.mNumVertices;++i)
|
||||
{
|
||||
for (unsigned int i = 0; i < mesh.mNumVertices; ++i) {
|
||||
EXPECT_FALSE(piNum[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,12 +39,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,12 +39,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "SceneDiffer.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
@ -68,70 +66,60 @@ TEST_F( utXImporterExporter, heap_overflow_in_tokenizer ) {
|
|||
EXPECT_NO_THROW(importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X/OV_GetNextToken", 0));
|
||||
}
|
||||
|
||||
|
||||
TEST(utXImporter, importAnimTest) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X/anim_test.x", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXImporter, importBCNEpileptic) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X/BCN_Epileptic.X", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXImporter, importFromTrueSpaceBin32) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X/fromtruespace_bin32.x", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXImporter, import_kwxport_test_cubewithvcolors) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X/kwxport_test_cubewithvcolors.x", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXImporter, importTestCubeBinary) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X/test_cube_binary.x", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXImporter, importTestCubeCompressed) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X/test_cube_compressed.x", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXImporter, importTestCubeText) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X/test_cube_text.x", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXImporter, importTestWuson) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X/Testwuson.X", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXImporter, TestFormatDetection) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X/TestFormatDetection", aiProcess_ValidateDataStructure);
|
||||
ASSERT_NE(nullptr, scene);
|
||||
}
|
||||
|
||||
|
||||
TEST(utXImporter, importDwarf) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/X/dwarf.x", aiProcess_ValidateDataStructure);
|
||||
|
|
|
@ -38,14 +38,14 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/commonMetaData.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/commonMetaData.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
#include <array>
|
||||
|
||||
|
@ -100,7 +100,6 @@ public:
|
|||
return true;
|
||||
}
|
||||
#endif // ASSIMP_BUILD_NO_EXPORT
|
||||
|
||||
};
|
||||
|
||||
TEST_F(utglTF2ImportExport, importglTF2FromFileTest) {
|
||||
|
@ -267,8 +266,7 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeLines) {
|
|||
EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4u);
|
||||
std::array<unsigned int, 5> l1 = { { 0u, 3u, 2u, 1u, 0u } };
|
||||
EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 2u);
|
||||
for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i)
|
||||
{
|
||||
for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i) {
|
||||
EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[0], l1[i]);
|
||||
EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[1], l1[i + 1]);
|
||||
}
|
||||
|
@ -282,8 +280,7 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeLineLoop) {
|
|||
EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4u);
|
||||
std::array<unsigned int, 5> l1 = { { 0, 3u, 2u, 1u, 0u } };
|
||||
EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 2u);
|
||||
for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i)
|
||||
{
|
||||
for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i) {
|
||||
EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[0], l1[i]);
|
||||
EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[1], l1[i + 1]);
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -40,14 +38,14 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "UnitTestPCH.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/commonMetaData.h>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
Loading…
Reference in New Issue