Enable unittest for apacity bug for dae files.
parent
c2deb3e15f
commit
12ea506504
|
@ -163,7 +163,6 @@ Exporter::ExportFormatEntry gExporters[] =
|
|||
|
||||
class ExporterPimpl {
|
||||
public:
|
||||
|
||||
ExporterPimpl()
|
||||
: blob()
|
||||
, mIOSystem(new Assimp::DefaultIOSystem())
|
||||
|
@ -171,7 +170,7 @@ public:
|
|||
{
|
||||
GetPostProcessingStepInstanceList(mPostProcessingSteps);
|
||||
|
||||
// grab all builtin exporters
|
||||
// grab all built-in exporters
|
||||
mExporters.resize(ASSIMP_NUM_EXPORTERS);
|
||||
std::copy(gExporters,gExporters+ASSIMP_NUM_EXPORTERS,mExporters.begin());
|
||||
}
|
||||
|
|
|
@ -44,7 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "../../include/assimp/scene.h"
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <BaseImporter.h>
|
||||
|
||||
#include "TestIOSystem.h"
|
||||
#include "DefaultIOSystem.h"
|
||||
|
||||
using namespace ::std;
|
||||
using namespace ::Assimp;
|
||||
|
@ -271,4 +272,7 @@ TEST_F(ImporterTest, testMultipleReads)
|
|||
//EXPECT_TRUE(pImp->ReadFile(ASSIMP_TEST_MODELS_DIR "/X/dwarf.x",flags)); # is in nonbsd
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
TEST_F( ImporterTest, SearchFileHeaderForTokenTest ) {
|
||||
//DefaultIOSystem ioSystem;
|
||||
// BaseImporter::SearchFileHeaderForToken( &ioSystem, assetPath, Token, 2 )
|
||||
}
|
|
@ -53,7 +53,7 @@ class utIssues : public ::testing::Test {
|
|||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
|
||||
TEST_F( utIssues, OpacityBugWhenExporting_727 ) {
|
||||
/*aiScene *scene( new aiScene );
|
||||
aiScene *scene( new aiScene );
|
||||
|
||||
scene->mNumMaterials = 1;
|
||||
scene->mMaterials = new aiMaterial*;
|
||||
|
@ -90,20 +90,23 @@ TEST_F( utIssues, OpacityBugWhenExporting_727 ) {
|
|||
Assimp::Importer importer;
|
||||
Assimp::Exporter exporter;
|
||||
for ( std::size_t i( 0 ); i < exporter.GetExportFormatCount(); ++i ) {
|
||||
|
||||
std::string path;
|
||||
const aiExportFormatDesc *desc( exporter.GetExportFormatDescription( i ) );
|
||||
EXPECT_NE( desc, nullptr );
|
||||
path.append( desc->fileExtension );
|
||||
|
||||
ASSERT_EQ( AI_SUCCESS, exporter.Export( scene, desc->id, path ) );
|
||||
if ( "dae" == path ) {
|
||||
EXPECT_EQ( AI_SUCCESS, exporter.Export( scene, desc->id, path ) );
|
||||
const aiScene *newScene( importer.ReadFile( path, 0 ) );
|
||||
ASSERT_TRUE( NULL != newScene );
|
||||
EXPECT_TRUE( NULL != newScene );
|
||||
float newOpacity;
|
||||
if ( newScene->mNumMaterials > 0 ) {
|
||||
//ASSERT_EQ( AI_SUCCESS, newScene->mMaterials[ 0 ]->Get( AI_MATKEY_OPACITY, newOpacity ) );
|
||||
//EXPECT_EQ( opacity, newOpacity );
|
||||
std::cout << "Desc = " << desc->description << "\n";
|
||||
EXPECT_EQ( AI_SUCCESS, newScene->mMaterials[ 0 ]->Get( AI_MATKEY_OPACITY, newOpacity ) );
|
||||
EXPECT_EQ( opacity, newOpacity );
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
#endif // ASSIMP_BUILD_NO_EXPORT
|
||||
|
|
Loading…
Reference in New Issue