You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

63 lines
1.3 KiB

  1. #ifndef TESTIMPORTER_H
  2. #define TESTIMPORTER_H
  3. #include <cppunit/TestFixture.h>
  4. #include <cppunit/extensions/HelperMacros.h>
  5. #include <assimp/Importer.hpp>
  6. #include <BaseImporter.h>
  7. using namespace std;
  8. using namespace Assimp;
  9. class ImporterTest : public CPPUNIT_NS :: TestFixture
  10. {
  11. CPPUNIT_TEST_SUITE (ImporterTest);
  12. CPPUNIT_TEST (testIntProperty);
  13. CPPUNIT_TEST (testFloatProperty);
  14. CPPUNIT_TEST (testStringProperty);
  15. CPPUNIT_TEST (testPluginInterface);
  16. CPPUNIT_TEST (testExtensionCheck);
  17. CPPUNIT_TEST (testMemoryRead);
  18. CPPUNIT_TEST (testMultipleReads);
  19. CPPUNIT_TEST_SUITE_END ();
  20. public:
  21. void setUp (void);
  22. void tearDown (void);
  23. protected:
  24. void testIntProperty (void);
  25. void testFloatProperty (void);
  26. void testStringProperty (void);
  27. void testPluginInterface (void);
  28. void testExtensionCheck (void);
  29. void testMemoryRead (void);
  30. void testMultipleReads (void);
  31. private:
  32. Importer* pImp;
  33. };
  34. class TestPlugin : public BaseImporter
  35. {
  36. public:
  37. // overriden
  38. bool CanRead( const std::string& pFile,
  39. IOSystem* pIOHandler, bool test) const;
  40. // overriden
  41. const aiImporterDesc* GetInfo () const;
  42. // overriden
  43. void InternReadFile( const std::string& pFile,
  44. aiScene* pScene, IOSystem* pIOHandler);
  45. };
  46. #endif