diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /unittests/dmxtest/dmxtest.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'unittests/dmxtest/dmxtest.cpp')
| -rw-r--r-- | unittests/dmxtest/dmxtest.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/unittests/dmxtest/dmxtest.cpp b/unittests/dmxtest/dmxtest.cpp new file mode 100644 index 0000000..55261d6 --- /dev/null +++ b/unittests/dmxtest/dmxtest.cpp @@ -0,0 +1,45 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Unit test program for DMX testing +// +// $NoKeywords: $ +//=============================================================================// + +#include "unitlib/unitlib.h" +#include "filesystem.h" +#include "datamodel/idatamodel.h" +#include "datamodel/dmelementfactoryhelper.h" +#include "tier3/tier3dm.h" + + +//----------------------------------------------------------------------------- +// Used to connect/disconnect the DLL +//----------------------------------------------------------------------------- +class CDmxTestAppSystem : public CTier3DmAppSystem< IAppSystem > +{ + typedef CTier3DmAppSystem< IAppSystem > BaseClass; + +public: + CDmxTestAppSystem() + { + } + + virtual bool Connect( CreateInterfaceFn factory ) + { + if ( !BaseClass::Connect( factory ) ) + return false; + + if ( !g_pFullFileSystem || !g_pDataModel || !g_pDmElementFramework ) + return false; + + return true; + } + + virtual InitReturnVal_t Init() + { + MathLib_Init( 2.2f, 2.2f, 0.0f, 2.0f ); + return BaseClass::Init(); + } +}; + +USE_UNITTEST_APPSYSTEM( CDmxTestAppSystem ) |