Major API cleanup. Unified formatting & doxygen tags in the public API.
Added factory provider for default log streams. Added default log streams to std::out and std::cerr. Updated VC8 project config, boost workarounds is now working for the viewer. Updated unit test suite. Fixed some minor issues in the postprocessing-framework. BROKEN: DebugDLL build. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@292 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
|
||||
#include "UnitTestPCH.h"
|
||||
#include "utFindInvalidData.h"
|
||||
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION (FindInvalidDataProcessTest);
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void FindInvalidDataProcessTest :: setUp (void)
|
||||
{
|
||||
CPPUNIT_ASSERT( AI_MAX_NUMBER_OF_TEXTURECOORDS >= 3);
|
||||
@@ -19,7 +20,7 @@ void FindInvalidDataProcessTest :: setUp (void)
|
||||
|
||||
pcMesh->mNormals = new aiVector3D[1000];
|
||||
for (unsigned int i = 0; i < 1000;++i)
|
||||
pcMesh->mNormals[i] = aiVector3D((float)i);
|
||||
pcMesh->mNormals[i] = aiVector3D((float)i+1);
|
||||
|
||||
pcMesh->mTangents = new aiVector3D[1000];
|
||||
for (unsigned int i = 0; i < 1000;++i)
|
||||
@@ -37,12 +38,14 @@ void FindInvalidDataProcessTest :: setUp (void)
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void FindInvalidDataProcessTest :: tearDown (void)
|
||||
{
|
||||
delete piProcess;
|
||||
delete pcMesh;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void FindInvalidDataProcessTest :: testStepNegativeResult (void)
|
||||
{
|
||||
::memset(pcMesh->mNormals,0,pcMesh->mNumVertices*sizeof(aiVector3D));
|
||||
@@ -53,22 +56,19 @@ void FindInvalidDataProcessTest :: testStepNegativeResult (void)
|
||||
piProcess->ProcessMesh(pcMesh);
|
||||
|
||||
CPPUNIT_ASSERT(NULL != pcMesh->mVertices);
|
||||
|
||||
CPPUNIT_ASSERT(NULL == pcMesh->mNormals);
|
||||
CPPUNIT_ASSERT(NULL == pcMesh->mTangents);
|
||||
CPPUNIT_ASSERT(NULL == pcMesh->mBitangents);
|
||||
|
||||
|
||||
for (unsigned int i = 0; i < 2;++i)
|
||||
{
|
||||
CPPUNIT_ASSERT(NULL != pcMesh->mTextureCoords[i]);
|
||||
}
|
||||
|
||||
for (unsigned int i = 2; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
|
||||
{
|
||||
CPPUNIT_ASSERT(NULL == pcMesh->mTextureCoords[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void FindInvalidDataProcessTest :: testStepPositiveResult (void)
|
||||
{
|
||||
piProcess->ProcessMesh(pcMesh);
|
||||
@@ -80,7 +80,5 @@ void FindInvalidDataProcessTest :: testStepPositiveResult (void)
|
||||
CPPUNIT_ASSERT(NULL != pcMesh->mBitangents);
|
||||
|
||||
for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
|
||||
{
|
||||
CPPUNIT_ASSERT(NULL != pcMesh->mTextureCoords[i]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user