summaryrefslogtreecommitdiff
path: root/unittests/dmxtest/dmxtest.cpp
blob: 55261d64e7920ce15ff231be113f9d0662368b37 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 )