Files
assimp/test/unit/utImporter.h
aramis_acg e2daf37a39 - Fix http://sourceforge.net/projects/assimp/forums/forum/817654/topic/3591099.
- Add unit test to avoid ppfx-related issue with re-use of Importer's in future.
- X file loader now properly resets all of its members.
- OptimizeMeshes step now properly resets all of its member.
- Fix old (and already deprecated) makefile.mingw.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@593 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2010-03-11 18:24:54 +00:00

63 lines
1.3 KiB
C++

#ifndef TESTIMPORTER_H
#define TESTIMPORTER_H
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <assimp.hpp>
#include <BaseImporter.h>
using namespace std;
using namespace Assimp;
class ImporterTest : public CPPUNIT_NS :: TestFixture
{
CPPUNIT_TEST_SUITE (ImporterTest);
CPPUNIT_TEST (testIntProperty);
CPPUNIT_TEST (testFloatProperty);
CPPUNIT_TEST (testStringProperty);
CPPUNIT_TEST (testPluginInterface);
CPPUNIT_TEST (testExtensionCheck);
CPPUNIT_TEST (testMemoryRead);
CPPUNIT_TEST (testMultipleReads);
CPPUNIT_TEST_SUITE_END ();
public:
void setUp (void);
void tearDown (void);
protected:
void testIntProperty (void);
void testFloatProperty (void);
void testStringProperty (void);
void testPluginInterface (void);
void testExtensionCheck (void);
void testMemoryRead (void);
void testMultipleReads (void);
private:
Importer* pImp;
};
class TestPlugin : public BaseImporter
{
public:
// overriden
bool CanRead( const std::string& pFile,
IOSystem* pIOHandler, bool test) const;
// overriden
void GetExtensionList(std::set<std::string>& extensions);
// overriden
void InternReadFile( const std::string& pFile,
aiScene* pScene, IOSystem* pIOHandler);
};
#endif