From 1a8b23712ef27ef4ca0f96fbd63e90d2b11d3438 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 19 Apr 2017 19:57:20 +0200 Subject: [PATCH] Unittests: add validation for TestIOSystem parameters. --- test/unit/TestIOSystem.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/unit/TestIOSystem.h b/test/unit/TestIOSystem.h index e7ed193b8..a821c29ec 100644 --- a/test/unit/TestIOSystem.h +++ b/test/unit/TestIOSystem.h @@ -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 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