summaryrefslogtreecommitdiffstats
path: root/Tests/TestApp/include/TestCreateObjFromNativeRes.h
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-02-17 20:58:17 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-02-17 20:58:17 +0000
commitec3e81b7a7be77836ac52dc6168aa5ac4c498217 (patch)
tree6feacc63f6f2cfa51463831a1ea7399f8de9be81 /Tests/TestApp/include/TestCreateObjFromNativeRes.h
parentFixed few compiler warnings (diff)
downloadDiligentEngine-ec3e81b7a7be77836ac52dc6168aa5ac4c498217.tar.gz
DiligentEngine-ec3e81b7a7be77836ac52dc6168aa5ac4c498217.zip
Added test result reporting
Diffstat (limited to 'Tests/TestApp/include/TestCreateObjFromNativeRes.h')
-rw-r--r--Tests/TestApp/include/TestCreateObjFromNativeRes.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/Tests/TestApp/include/TestCreateObjFromNativeRes.h b/Tests/TestApp/include/TestCreateObjFromNativeRes.h
index a0b1e8e..1e9b335 100644
--- a/Tests/TestApp/include/TestCreateObjFromNativeRes.h
+++ b/Tests/TestApp/include/TestCreateObjFromNativeRes.h
@@ -23,10 +23,26 @@
#pragma once
-class TestCreateObjFromNativeRes
+#include "UnitTestBase.h"
+
+class TestCreateObjFromNativeRes : public UnitTestBase
{
public:
- virtual ~TestCreateObjFromNativeRes() {}
+ TestCreateObjFromNativeRes() : UnitTestBase("Object initialization from native resource handle test") {}
+ virtual ~TestCreateObjFromNativeRes()
+ {
+ if(m_NumTexturesCreated != 0 || m_NumBuffersCreated != 0 )
+ {
+ std::stringstream infoss;
+ infoss << "Textures crated: " << m_NumTexturesCreated <<" Buffers created: " << m_NumBuffersCreated;
+ SetStatus(TestResult::Succeeded, infoss.str().c_str());
+ }
+ else
+ SetStatus(TestResult::Skipped);
+ }
virtual void CreateTexture(Diligent::ITexture *pTexture) = 0;
virtual void CreateBuffer(Diligent::IBuffer *pBuffer) = 0;
+protected:
+ int m_NumTexturesCreated = 0;
+ int m_NumBuffersCreated = 0;
};