fix unittest folder for roundtriptest.
parent
20c817bc36
commit
4c023c3818
|
@ -100,26 +100,22 @@ IRRImporter::~IRRImporter()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns whether the class can handle the format of the given file.
|
// Returns whether the class can handle the format of the given file.
|
||||||
bool IRRImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
|
bool IRRImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const {
|
||||||
{
|
|
||||||
/* NOTE: A simple check for the file extension is not enough
|
|
||||||
* here. Irrmesh and irr are easy, but xml is too generic
|
|
||||||
* and could be collada, too. So we need to open the file and
|
|
||||||
* search for typical tokens.
|
|
||||||
*/
|
|
||||||
const std::string extension = GetExtension(pFile);
|
const std::string extension = GetExtension(pFile);
|
||||||
|
if ( extension == "irr" ) {
|
||||||
if (extension == "irr")return true;
|
return true;
|
||||||
else if (extension == "xml" || checkSig)
|
} else if (extension == "xml" || checkSig) {
|
||||||
{
|
|
||||||
/* If CanRead() is called in order to check whether we
|
/* If CanRead() is called in order to check whether we
|
||||||
* support a specific file extension in general pIOHandler
|
* support a specific file extension in general pIOHandler
|
||||||
* might be NULL and it's our duty to return true here.
|
* might be NULL and it's our duty to return true here.
|
||||||
*/
|
*/
|
||||||
if (!pIOHandler)return true;
|
if ( nullptr == pIOHandler ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
const char* tokens[] = {"irr_scene"};
|
const char* tokens[] = {"irr_scene"};
|
||||||
return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
|
return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ TEST_F( utD3MFImporterExporter, roundtrip3MFtoMemTest ) {
|
||||||
EXPECT_TRUE( exporterTest() );
|
EXPECT_TRUE( exporterTest() );
|
||||||
|
|
||||||
Assimp::Importer importer;
|
Assimp::Importer importer;
|
||||||
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "test.3mf", 0 );
|
const aiScene *scene = importer.ReadFile( "test.3mf", 0 );
|
||||||
EXPECT_NE( nullptr, scene );
|
EXPECT_NE( nullptr, scene );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue