Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb8639d7c8 | ||
|
|
3fe8c72f5d | ||
|
|
6c526d7c64 | ||
|
|
d052b74b96 | ||
|
|
a2bbf76cf4 | ||
|
|
4b860dfc42 | ||
|
|
d74306ad67 | ||
|
|
cf0a83de17 | ||
|
|
4013b319af | ||
|
|
256f28432a | ||
|
|
4dc2cd8442 | ||
|
|
2cb1a9efc6 | ||
|
|
6bf68e063f | ||
|
|
96cb3f7140 | ||
|
|
ae9755286a | ||
|
|
6429502fc5 | ||
|
|
8606ec6060 | ||
|
|
5ce614be3b | ||
|
|
d150874f06 | ||
|
|
e94bbe7e0a | ||
|
|
501f09307c | ||
|
|
e7afc8baf3 | ||
|
|
11e9173a09 | ||
|
|
91f888a254 | ||
|
|
f7a7e57807 | ||
|
|
01a288ff35 | ||
|
|
0ef54bbbef | ||
|
|
a965414ceb | ||
|
|
b394546e55 | ||
|
|
6f9dabe49c |
10
.travis.yml
10
.travis.yml
@@ -3,7 +3,15 @@ language: cpp
|
||||
|
||||
before_install:
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq && sudo apt-get install cmake && sudo apt-get install cmake python3 && sudo apt-get install -qq freeglut3-dev libxmu-dev libxi-dev ; echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- ; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install cmake python3 homebrew/x11/freeglut; fi
|
||||
- 'if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
if brew ls --versions cmake > /dev/null; then
|
||||
echo cmake already installed.;
|
||||
else
|
||||
brew install cmake;
|
||||
fi;
|
||||
brew install python3;
|
||||
brew install homebrew/x11/freeglut;
|
||||
fi'
|
||||
- echo -e "#ifndef A_R_H_INC\n#define A_R_H_INC\n#define GitVersion ${TRAVIS_JOB_ID}\n#define GitBranch \"${TRAVIS_BRANCH}\"\n#endif // A_R_H_INC" > revision.h
|
||||
# install latest LCOV (1.9 was failing)
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd ${TRAVIS_BUILD_DIR} && wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz && tar xf lcov_1.11.orig.tar.gz && sudo make -C lcov-1.11/ install && gem install coveralls-lcov && lcov --version && g++ --version ; fi
|
||||
|
||||
12
CHANGES
12
CHANGES
@@ -1,6 +1,18 @@
|
||||
----------------------------------------------------------------------
|
||||
CHANGELOG
|
||||
----------------------------------------------------------------------
|
||||
4.0.1 (2017-07-28)
|
||||
- FIXES/HOUSEKEEPING:
|
||||
- fix version test.
|
||||
- Not compiling when using ASSIMP_DOUBLE_PRECISION
|
||||
- Added support for python3
|
||||
- Check if cmake is installed with brew
|
||||
- Low performance in OptimizeMeshesProcess::ProcessNode with huge numbers of meshes
|
||||
- Elapsed seconds not shown correctly
|
||||
- StreamReader: fix out-of-range exception
|
||||
- PPdPmdParser: fix compilation for clang
|
||||
|
||||
|
||||
4.0.0 (2017-07-18)
|
||||
|
||||
FEATURES:
|
||||
|
||||
@@ -106,7 +106,7 @@ ENDIF(NOT BUILD_SHARED_LIBS)
|
||||
# Define here the needed parameters
|
||||
SET (ASSIMP_VERSION_MAJOR 4)
|
||||
SET (ASSIMP_VERSION_MINOR 0)
|
||||
SET (ASSIMP_VERSION_PATCH 0) # subversion revision?
|
||||
SET (ASSIMP_VERSION_PATCH 1) # subversion revision?
|
||||
SET (ASSIMP_VERSION ${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH})
|
||||
SET (ASSIMP_SOVERSION 4)
|
||||
SET (PROJECT_VERSION "${ASSIMP_VERSION}")
|
||||
|
||||
@@ -50,12 +50,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "FBXDocument.h"
|
||||
#include "FBXImporter.h"
|
||||
#include "FBXDocumentUtil.h"
|
||||
#include "FBXProperties.h"
|
||||
|
||||
namespace Assimp {
|
||||
namespace FBX {
|
||||
|
||||
using namespace Util;
|
||||
using namespace Util;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
AnimationCurve::AnimationCurve(uint64_t id, const Element& element, const std::string& name, const Document& /*doc*/)
|
||||
|
||||
@@ -284,11 +284,17 @@ bool IOStreamBuffer<T>::getNextDataLine( std::vector<T> &buffer, T continuationT
|
||||
return true;
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
bool isEndOfCache( size_t pos, size_t cacheSize ) {
|
||||
return ( pos == cacheSize );
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool IOStreamBuffer<T>::getNextLine(std::vector<T> &buffer) {
|
||||
buffer.resize(m_cacheSize);
|
||||
if (m_cachePos == m_cacheSize || 0 == m_filePos) {
|
||||
if ( isEndOfCache( m_cachePos, m_cacheSize ) || 0 == m_filePos) {
|
||||
if (!readNextBlock()) {
|
||||
return false;
|
||||
}
|
||||
@@ -300,11 +306,16 @@ bool IOStreamBuffer<T>::getNextLine(std::vector<T> &buffer) {
|
||||
++m_cachePos;
|
||||
}
|
||||
++m_cachePos;
|
||||
if ( isEndOfCache( m_cachePos, m_cacheSize ) ) {
|
||||
if ( !readNextBlock() ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
size_t i = 0;
|
||||
while (!IsLineEnd(m_cache[m_cachePos])) {
|
||||
buffer[i] = m_cache[m_cachePos];
|
||||
while (!IsLineEnd(m_cache[ m_cachePos ])) {
|
||||
buffer[i] = m_cache[ m_cachePos ];
|
||||
m_cachePos++;
|
||||
i++;
|
||||
if (m_cachePos >= m_cacheSize) {
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace pmd
|
||||
sphere_filename.clear();
|
||||
}
|
||||
else {
|
||||
*pstar = (char)NULL;
|
||||
*pstar = 0;
|
||||
texture_filename = std::string(buffer);
|
||||
sphere_filename = std::string(pstar+1);
|
||||
}
|
||||
|
||||
@@ -181,11 +181,8 @@ void OptimizeMeshesProcess::ProcessNode( aiNode* pNode)
|
||||
verts += mScene->mMeshes[am]->mNumVertices;
|
||||
faces += mScene->mMeshes[am]->mNumFaces;
|
||||
|
||||
pNode->mMeshes[a] = pNode->mMeshes[pNode->mNumMeshes - 1];
|
||||
--pNode->mNumMeshes;
|
||||
for( unsigned int n = a; n < pNode->mNumMeshes; ++n ) {
|
||||
pNode->mMeshes[ n ] = pNode->mMeshes[ n + 1 ];
|
||||
}
|
||||
|
||||
--a;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,21 +52,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <map>
|
||||
|
||||
namespace Assimp {
|
||||
namespace Profiling {
|
||||
|
||||
using namespace Formatter;
|
||||
namespace Profiling {
|
||||
|
||||
using namespace Formatter;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
/** Simple wrapper around boost::timer to simplify reporting. Timings are automatically
|
||||
* dumped to the log file.
|
||||
*/
|
||||
class Profiler
|
||||
{
|
||||
|
||||
class Profiler {
|
||||
public:
|
||||
|
||||
Profiler() {}
|
||||
Profiler() {
|
||||
// empty
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
@@ -84,17 +82,17 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
auto elapsedSeconds = std::chrono::system_clock::now() - regions[region];
|
||||
std::chrono::duration<double> elapsedSeconds = std::chrono::system_clock::now() - regions[region];
|
||||
DefaultLogger::get()->debug((format("END `"),region,"`, dt= ", elapsedSeconds.count()," s"));
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
typedef std::map<std::string,std::chrono::time_point<std::chrono::system_clock>> RegionMap;
|
||||
RegionMap regions;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -107,8 +107,7 @@ ASSIMP_API unsigned int aiGetCompileFlags () {
|
||||
#include "revision.h"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
ASSIMP_API unsigned int aiGetVersionRevision ()
|
||||
{
|
||||
ASSIMP_API unsigned int aiGetVersionRevision() {
|
||||
return GitVersion;
|
||||
}
|
||||
|
||||
@@ -133,8 +132,7 @@ ASSIMP_API aiScene::aiScene()
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
ASSIMP_API aiScene::~aiScene()
|
||||
{
|
||||
ASSIMP_API aiScene::~aiScene() {
|
||||
// delete all sub-objects recursively
|
||||
delete mRootNode;
|
||||
|
||||
@@ -173,3 +171,4 @@ ASSIMP_API aiScene::~aiScene()
|
||||
|
||||
delete static_cast<Assimp::ScenePrivateData*>( mPrivate );
|
||||
}
|
||||
|
||||
|
||||
@@ -64,12 +64,11 @@ class ASSIMP_API LogStream
|
||||
{
|
||||
protected:
|
||||
/** @brief Default constructor */
|
||||
LogStream() {
|
||||
}
|
||||
LogStream();
|
||||
|
||||
public:
|
||||
/** @brief Virtual destructor */
|
||||
virtual ~LogStream() {
|
||||
}
|
||||
virtual ~LogStream();
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
/** @brief Overwrite this for your own output methods
|
||||
@@ -94,6 +93,17 @@ public:
|
||||
IOSystem* io = NULL);
|
||||
|
||||
}; // !class LogStream
|
||||
|
||||
inline
|
||||
LogStream::LogStream() {
|
||||
// empty
|
||||
}
|
||||
|
||||
inline
|
||||
LogStream::~LogStream() {
|
||||
// empty
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
} // Namespace Assimp
|
||||
|
||||
|
||||
@@ -417,7 +417,7 @@ ASSIMP_API void aiSetImportPropertyInteger(
|
||||
ASSIMP_API void aiSetImportPropertyFloat(
|
||||
C_STRUCT aiPropertyStore* store,
|
||||
const char* szName,
|
||||
float value);
|
||||
ai_real value);
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
/** Set a string property.
|
||||
|
||||
@@ -105,3 +105,4 @@ ASSIMP_API unsigned int aiGetCompileFlags (void);
|
||||
#endif
|
||||
|
||||
#endif // !! #ifndef AI_VERSION_H_INC
|
||||
|
||||
|
||||
@@ -119,7 +119,10 @@ def _init(self, target = None, parent = None):
|
||||
|
||||
if m == 'mName':
|
||||
obj = self.mName
|
||||
uni = unicode(obj.data, errors='ignore')
|
||||
try:
|
||||
uni = unicode(obj.data, errors='ignore')
|
||||
except:
|
||||
uni = str(obj.data, errors='ignore')
|
||||
target.name = str( uni )
|
||||
target.__class__.__repr__ = lambda x: str(x.__class__) + "(" + x.name + ")"
|
||||
target.__class__.__str__ = lambda x: x.name
|
||||
@@ -440,7 +443,10 @@ def _get_properties(properties, length):
|
||||
for p in [properties[i] for i in range(length)]:
|
||||
#the name
|
||||
p = p.contents
|
||||
uni = unicode(p.mKey.data, errors='ignore')
|
||||
try:
|
||||
uni = unicode(p.mKey.data, errors='ignore')
|
||||
except:
|
||||
uni = str(p.mKey.data, errors='ignore')
|
||||
key = (str(uni).split('.')[1], p.mSemantic)
|
||||
|
||||
#the data
|
||||
@@ -449,7 +455,10 @@ def _get_properties(properties, length):
|
||||
arr = cast(p.mData, POINTER(c_float * int(p.mDataLength/sizeof(c_float)) )).contents
|
||||
value = [x for x in arr]
|
||||
elif p.mType == 3: #string can't be an array
|
||||
uni = unicode(cast(p.mData, POINTER(structs.MaterialPropertyString)).contents.data, errors='ignore')
|
||||
try:
|
||||
uni = unicode(cast(p.mData, POINTER(structs.MaterialPropertyString)).contents.data, errors='ignore')
|
||||
except:
|
||||
uni = str(cast(p.mData, POINTER(structs.MaterialPropertyString)).contents.data, errors='ignore')
|
||||
value = uni
|
||||
|
||||
elif p.mType == 4:
|
||||
@@ -476,3 +485,4 @@ def decompose_matrix(matrix):
|
||||
from ctypes import byref, pointer
|
||||
_assimp_lib.dll.aiDecomposeMatrix(pointer(matrix), byref(scaling), byref(rotation), byref(position))
|
||||
return scaling._init(), rotation._init(), position._init()
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ SOURCE_GROUP( unit FILES
|
||||
)
|
||||
|
||||
SET( TEST_SRCS
|
||||
unit/UTLogStream.h
|
||||
unit/AbstractImportExportBase.cpp
|
||||
unit/TestIOSystem.h
|
||||
unit/TestModelFactory.h
|
||||
@@ -129,6 +130,7 @@ SET( TEST_SRCS
|
||||
unit/utVector3.cpp
|
||||
unit/utXImporterExporter.cpp
|
||||
unit/utD3MFImportExport.cpp
|
||||
unit/utProfiler.cpp
|
||||
)
|
||||
|
||||
SOURCE_GROUP( tests FILES ${TEST_SRCS} )
|
||||
|
||||
63
test/unit/UTLogStream.h
Normal file
63
test/unit/UTLogStream.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <assimp/LogStream.hpp>
|
||||
|
||||
class UTLogStream : public Assimp::LogStream {
|
||||
public:
|
||||
UTLogStream()
|
||||
: LogStream() {
|
||||
// empty
|
||||
}
|
||||
|
||||
virtual ~UTLogStream() {
|
||||
// empty
|
||||
}
|
||||
|
||||
virtual void write(const char* message) {
|
||||
if ( nullptr != message ) {
|
||||
m_messages.push_back( std::string( message ) );
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> m_messages;
|
||||
};
|
||||
@@ -1,8 +1,44 @@
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
// #ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
// # include <boost/thread.hpp>
|
||||
// #endif
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// We need to be sure to have the same STL settings as Assimp
|
||||
|
||||
@@ -10,6 +46,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <memory>
|
||||
#include <math.h>
|
||||
#include "UTLogStream.h"
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
76
test/unit/utProfiler.cpp
Normal file
76
test/unit/utProfiler.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "UnitTestPCH.h"
|
||||
#include "UTLogStream.h"
|
||||
#include "code/Profiler.h"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
using namespace ::Assimp;
|
||||
using namespace ::Assimp::Profiling;
|
||||
|
||||
class utProfiler : public ::testing::Test {
|
||||
public:
|
||||
LogStream *m_stream;
|
||||
|
||||
/*virtual void SetUp() {
|
||||
m_stream = new UTLogStream;
|
||||
DefaultLogger::create();
|
||||
DefaultLogger::get()->attachStream( m_stream );
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
DefaultLogger::get()->detatchStream( m_stream );
|
||||
m_stream = nullptr;
|
||||
}*/
|
||||
};
|
||||
|
||||
TEST_F( utProfiler, addRegion_success ) {
|
||||
Profiler myProfiler;
|
||||
myProfiler.BeginRegion( "t1" );
|
||||
for ( int i=0; i<10; i++ ) {
|
||||
volatile int j=0;
|
||||
j++;
|
||||
}
|
||||
myProfiler.EndRegion( "t1" );
|
||||
//UTLogStream *stream( (UTLogStream*) m_stream );
|
||||
//EXPECT_FALSE( stream->m_messages.empty() );
|
||||
}
|
||||
@@ -54,11 +54,11 @@ TEST_F( utVersion, aiGetLegalStringTest ) {
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetVersionMinorTest ) {
|
||||
EXPECT_EQ( aiGetVersionMinor(), 3U );
|
||||
EXPECT_EQ( aiGetVersionMinor(), 0U );
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetVersionMajorTest ) {
|
||||
EXPECT_EQ( aiGetVersionMajor(), 3U );
|
||||
EXPECT_EQ( aiGetVersionMajor(), 4U );
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetCompileFlagsTest ) {
|
||||
|
||||
Reference in New Issue
Block a user