Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Unit test program for DMX testing
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "unitlib/unitlib.h"
  8. #include "filesystem.h"
  9. #include "datamodel/idatamodel.h"
  10. #include "datamodel/dmelementfactoryhelper.h"
  11. #include "tier3/tier3dm.h"
  12. //-----------------------------------------------------------------------------
  13. // Used to connect/disconnect the DLL
  14. //-----------------------------------------------------------------------------
  15. class CDmxTestAppSystem : public CTier3DmAppSystem< IAppSystem >
  16. {
  17. typedef CTier3DmAppSystem< IAppSystem > BaseClass;
  18. public:
  19. CDmxTestAppSystem()
  20. {
  21. }
  22. virtual bool Connect( CreateInterfaceFn factory )
  23. {
  24. if ( !BaseClass::Connect( factory ) )
  25. return false;
  26. if ( !g_pFullFileSystem || !g_pDataModel || !g_pDmElementFramework )
  27. return false;
  28. return true;
  29. }
  30. virtual InitReturnVal_t Init()
  31. {
  32. MathLib_Init( 2.2f, 2.2f, 0.0f, 2.0f );
  33. return BaseClass::Init();
  34. }
  35. };
  36. USE_UNITTEST_APPSYSTEM( CDmxTestAppSystem )