Fix unittest.

pull/1043/head
Kim Kulling 2016-10-30 08:55:11 +01:00
parent b9261f01a3
commit 293654fe7c
5 changed files with 12 additions and 13 deletions

View File

@ -105,7 +105,6 @@ public:
BlenderImporter(); BlenderImporter();
~BlenderImporter(); ~BlenderImporter();
public: public:
// -------------------- // --------------------

View File

@ -78,14 +78,14 @@ public:
/// Read from stream /// Read from stream
size_t Read(void* pvBuffer, size_t Read(void* pvBuffer,
size_t pSize, size_t pSize,
size_t pCount); size_t pCount) override;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/// Write to stream /// Write to stream
size_t Write(const void* pvBuffer, size_t Write(const void* pvBuffer,
size_t pSize, size_t pSize,
size_t pCount); size_t pCount) override;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/// Seek specific position /// Seek specific position
@ -94,18 +94,18 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/// Get current seek position /// Get current seek position
size_t Tell() const; size_t Tell() const override;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/// Get size of file /// Get size of file
size_t FileSize() const; size_t FileSize() const override;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/// Flush file contents /// Flush file contents
void Flush(); void Flush() override;
private: private:
// File datastructure, using clib // File data-structure, using clib
FILE* mFile; FILE* mFile;
// Filename // Filename
std::string mFilename; std::string mFilename;

View File

@ -447,7 +447,7 @@ void ExportSkin(Asset& mAsset, const aiMesh* aim, Ref<Mesh>& meshRef, Ref<Buffer
unsigned int jointNamesIndex; unsigned int jointNamesIndex;
bool addJointToJointNames = true; bool addJointToJointNames = true;
for (int idx_joint = 0; idx_joint < skinRef->jointNames.size(); ++idx_joint) { for ( unsigned int idx_joint = 0; idx_joint < skinRef->jointNames.size(); ++idx_joint) {
if (skinRef->jointNames[idx_joint]->jointName.compare(nodeRef->jointName) == 0) { if (skinRef->jointNames[idx_joint]->jointName.compare(nodeRef->jointName) == 0) {
addJointToJointNames = false; addJointToJointNames = false;
jointNamesIndex = idx_joint; jointNamesIndex = idx_joint;
@ -732,7 +732,7 @@ void glTFExporter::ExportMeshes()
// Create the Accessor for skinRef->inverseBindMatrices // Create the Accessor for skinRef->inverseBindMatrices
if (createSkin) { if (createSkin) {
mat4* invBindMatrixData = new mat4[inverseBindMatricesData.size()]; mat4* invBindMatrixData = new mat4[inverseBindMatricesData.size()];
for (int idx_joint = 0; idx_joint < inverseBindMatricesData.size(); ++idx_joint) { for ( unsigned int idx_joint = 0; idx_joint < inverseBindMatricesData.size(); ++idx_joint) {
CopyValue(inverseBindMatricesData[idx_joint], invBindMatrixData[idx_joint]); CopyValue(inverseBindMatricesData[idx_joint], invBindMatrixData[idx_joint]);
} }

View File

@ -97,10 +97,10 @@ TEST_F( IOStreamBufferTest, readlineTest ) {
EXPECT_EQ( 26, myBuffer.cacheSize() ); EXPECT_EQ( 26, myBuffer.cacheSize() );
TestDefaultIOStream myStream( fs, buffer ); TestDefaultIOStream myStream( fs, buffer );
size_t size( myStream.FileSize() );
size_t numBlocks( size / myBuffer.cacheSize() );
EXPECT_TRUE( myBuffer.open( &myStream ) ); EXPECT_TRUE( myBuffer.open( &myStream ) );
EXPECT_EQ( numBlocks, myBuffer.getNumBlocks() );
EXPECT_EQ( 10, myBuffer.getNumBlocks() );
EXPECT_TRUE( myBuffer.close() ); EXPECT_TRUE( myBuffer.close() );
} }