- update unit tests.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1238 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/5/head
aramis_acg 2012-04-22 23:00:44 +00:00
parent 53665faacf
commit bbaf838463
19 changed files with 44 additions and 46 deletions

View File

@ -1,9 +1,8 @@
// This is just a small test to check whether Assimp's API compiles from C // This is just a small test to check whether Assimp's API compiles from C
#include <types.h> #include <assimp/postprocess.h>
#include <postprocess.h> #include <assimp/scene.h>
#include <scene.h> #include <assimp/version.h>
#include <version.h> #include <assimp/config.h>
#include <config.h> #include <assimp/cimport.h>
#include <cimport.h>

View File

@ -6,7 +6,7 @@
// We need to be sure to have the same STL settings as Assimp // We need to be sure to have the same STL settings as Assimp
#include <AssimpPCH.h> #include <AssimpPCH.h>
#include "cimport.h" #include <assimp/cimport.h>
// CPPUNIT // CPPUNIT
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>

View File

@ -3,8 +3,8 @@
#ifndef ASSIMP_BUILD_NO_EXPORT #ifndef ASSIMP_BUILD_NO_EXPORT
#include <cexport.h> #include <assimp/cexport.h>
#include <Exporter.hpp> #include <assimp/Exporter.hpp>
using namespace Assimp; using namespace Assimp;

View File

@ -4,9 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <types.h> #include <assimp/scene.h>
#include <mesh.h>
#include <scene.h>
#include <GenVertexNormalsProcess.h> #include <GenVertexNormalsProcess.h>

View File

@ -56,6 +56,21 @@ CPPUNIT_TEST_SUITE_REGISTRATION (ImporterTest);
#define AIUT_DEF_ERROR_TEXT "sorry, this is a test" #define AIUT_DEF_ERROR_TEXT "sorry, this is a test"
static const aiImporterDesc desc = {
"UNIT TEST - IMPORTER",
"",
"",
"",
0,
0,
0,
0,
0,
"apple mac linux windows"
};
bool TestPlugin :: CanRead( const std::string& pFile, bool TestPlugin :: CanRead( const std::string& pFile,
IOSystem* pIOHandler, bool test) const IOSystem* pIOHandler, bool test) const
{ {
@ -70,12 +85,9 @@ bool TestPlugin :: CanRead( const std::string& pFile,
extension == ".linux" || extension == ".windows" ); extension == ".linux" || extension == ".windows" );
} }
void TestPlugin :: GetExtensionList(std::set<std::string>& extensions) const aiImporterDesc* TestPlugin :: GetInfo() const
{ {
extensions.insert("apple"); return & desc;
extensions.insert("mac");
extensions.insert("linux");
extensions.insert("windows");
} }
void TestPlugin :: InternReadFile( const std::string& pFile, void TestPlugin :: InternReadFile( const std::string& pFile,
@ -147,7 +159,7 @@ void ImporterTest :: testPluginInterface (void)
CPPUNIT_ASSERT(pImp->IsExtensionSupported(".3ds")); CPPUNIT_ASSERT(pImp->IsExtensionSupported(".3ds"));
CPPUNIT_ASSERT(!pImp->IsExtensionSupported(".")); CPPUNIT_ASSERT(!pImp->IsExtensionSupported("."));
TestPlugin* p = (TestPlugin*) pImp->FindLoader(".windows"); TestPlugin* p = (TestPlugin*) pImp->GetImporter(".windows");
CPPUNIT_ASSERT(NULL != p); CPPUNIT_ASSERT(NULL != p);
try { try {

View File

@ -4,7 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <Importer.hpp> #include <assimp/Importer.hpp>
#include <BaseImporter.h> #include <BaseImporter.h>
using namespace std; using namespace std;
@ -52,7 +52,7 @@ public:
IOSystem* pIOHandler, bool test) const; IOSystem* pIOHandler, bool test) const;
// overriden // overriden
void GetExtensionList(std::set<std::string>& extensions); const aiImporterDesc* GetInfo () const;
// overriden // overriden
void InternReadFile( const std::string& pFile, void InternReadFile( const std::string& pFile,

View File

@ -4,7 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <scene.h> #include <assimp/scene.h>
#include <JoinVerticesProcess.h> #include <JoinVerticesProcess.h>

View File

@ -4,7 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <scene.h> #include <assimp/scene.h>
#include <LimitBoneWeightsProcess.h> #include <LimitBoneWeightsProcess.h>

View File

@ -4,9 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <types.h> #include <assimp/scene.h>
#include <mesh.h>
#include <scene.h>
#include <MaterialSystem.h> #include <MaterialSystem.h>

View File

@ -4,7 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <scene.h> #include <assimp/scene.h>
#include <PretransformVertices.h> #include <PretransformVertices.h>

View File

@ -4,7 +4,6 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include "types.h"
#include <RemoveComments.h> #include <RemoveComments.h>

View File

@ -4,7 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <scene.h> #include <assimp/scene.h>
#include <RemoveVCProcess.h> #include <RemoveVCProcess.h>
#include <MaterialSystem.h> #include <MaterialSystem.h>

View File

@ -4,9 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <types.h> #include <assimp/scene.h>
#include <mesh.h>
#include <scene.h>
#include <RemoveRedundantMaterials.h> #include <RemoveRedundantMaterials.h>
#include <MaterialSystem.h> #include <MaterialSystem.h>

View File

@ -7,9 +7,9 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <mesh.h> #include <assimp/mesh.h>
#include <scene.h> #include <assimp/scene.h>
#include <Importer.hpp> #include <assimp/Importer.hpp>
#include <ScenePreprocessor.h> #include <ScenePreprocessor.h>
using namespace std; using namespace std;

View File

@ -4,8 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <types.h> #include <assimp/scene.h>
#include <scene.h>
#include <BaseProcess.h> #include <BaseProcess.h>

View File

@ -4,8 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <types.h> #include <assimp/scene.h>
#include <scene.h>
#include <SortByPTypeProcess.h> #include <SortByPTypeProcess.h>

View File

@ -4,9 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <types.h> #include <assimp/scene.h>
#include <mesh.h>
#include <scene.h>
#include <SplitLargeMeshes.h> #include <SplitLargeMeshes.h>

View File

@ -4,9 +4,7 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <types.h> #include <assimp/scene.h>
#include <mesh.h>
#include <scene.h>
#include <TriangulateProcess.h> #include <TriangulateProcess.h>

View File

@ -4,8 +4,8 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include "types.h" #include "assimp/types.h"
#include "mesh.h" #include "assimp/mesh.h"
#include <VertexTriangleAdjacency.h> #include <VertexTriangleAdjacency.h>