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.

44 lines
1.1 KiB

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