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.

47 lines
1.1 KiB

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