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/tier3test | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'unittests/tier3test')
| -rw-r--r-- | unittests/tier3test/tier3test.cpp | 44 | ||||
| -rw-r--r-- | unittests/tier3test/tier3test.vpc | 41 |
2 files changed, 85 insertions, 0 deletions
diff --git a/unittests/tier3test/tier3test.cpp b/unittests/tier3test/tier3test.cpp new file mode 100644 index 0000000..2ccd66d --- /dev/null +++ b/unittests/tier3test/tier3test.cpp @@ -0,0 +1,44 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Unit test program for tier3 level libraries testing +// +// $NoKeywords: $ +//=============================================================================// + +#include "unitlib/unitlib.h" +#include "filesystem.h" +#include "tier3/tier3.h" +#include "mathlib/mathlib.h" + + +//----------------------------------------------------------------------------- +// Used to connect/disconnect the DLL +//----------------------------------------------------------------------------- +class CTier3TestAppSystem : public CTier3AppSystem< IAppSystem > +{ + typedef CTier3AppSystem< IAppSystem > BaseClass; + +public: + virtual bool Connect( CreateInterfaceFn factory ) + { + if ( !BaseClass::Connect( factory ) ) + return false; + + if ( !g_pFullFileSystem ) + return false; + return true; + } + + virtual InitReturnVal_t Init() + { + MathLib_Init( 2.2f, 2.2f, 0.0f, 2.0f ); + + InitReturnVal_t nRetVal = BaseClass::Init(); + if ( nRetVal != INIT_OK ) + return nRetVal; + + return INIT_OK; + } +}; + +USE_UNITTEST_APPSYSTEM( CTier3TestAppSystem ) diff --git a/unittests/tier3test/tier3test.vpc b/unittests/tier3test/tier3test.vpc new file mode 100644 index 0000000..8cd6d62 --- /dev/null +++ b/unittests/tier3test/tier3test.vpc @@ -0,0 +1,41 @@ +//----------------------------------------------------------------------------- +// TIER3TEST.VPC +// +// Project Script +//----------------------------------------------------------------------------- + +$Macro SRCDIR "..\.." +$Macro OUTBINDIR "$SRCDIR\..\game\bin\unittests" + +$Include "$SRCDIR\vpc_scripts\source_dll_base.vpc" + +$Configuration +{ + $Compiler + { + $PreprocessorDefinitions "$BASE;TIER3TEST_EXPORTS" + } +} + +$Project "tier3test" +{ + $Folder "Source Files" + { + $File "tier3test.cpp" + } + + $Folder "Header Files" + { + $File "$SRCDIR\public\movieobjects\dmx_to_vcd.h" + $File "$SRCDIR\public\interpolatortypes.h" + } + + $Folder "Link Libraries" + { + $Lib mathlib + $Lib unitlib + $Lib bitmap + $Lib tier2 + $Lib tier3 + } +} |