Unittests: add validation for TestIOSystem parameters.
parent
3e4a01ab04
commit
1a8b23712e
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -45,12 +45,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/IOSystem.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
static const string Sep = "/";
|
||||
|
||||
class TestIOSystem : public IOSystem {
|
||||
public:
|
||||
TestIOSystem() : IOSystem() {}
|
||||
TestIOSystem()
|
||||
: IOSystem() {
|
||||
// empty
|
||||
}
|
||||
|
||||
virtual ~TestIOSystem() {}
|
||||
virtual bool Exists( const char* ) const {
|
||||
return true;
|
||||
|
@ -60,10 +66,14 @@ public:
|
|||
}
|
||||
|
||||
virtual IOStream* Open( const char* pFile, const char* pMode = "rb" ) {
|
||||
EXPECT_NE( nullptr, pFile );
|
||||
EXPECT_NE( nullptr, pMode );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virtual void Close( IOStream* pFile ) {
|
||||
// empty
|
||||
EXPECT_NE( nullptr, pFile );
|
||||
}
|
||||
};
|
||||
|
||||
} // Namespace Assimp
|
||||
|
|
Loading…
Reference in New Issue