Fixes tests by checking CConfigDB is initialized before using CFG_GET_USER_VAL
This was SVN commit r12946.
This commit is contained in:
parent
f528e58983
commit
186224612c
@ -19,8 +19,6 @@
|
||||
|
||||
#include "graphics/LOSTexture.h"
|
||||
#include "lib/timer.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "scripting/ScriptingHost.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
|
||||
class TestLOSTexture : public CxxTest::TestSuite
|
||||
@ -28,10 +26,6 @@ class TestLOSTexture : public CxxTest::TestSuite
|
||||
public:
|
||||
void test_basic()
|
||||
{
|
||||
// Needed for CFG_GET_USER_VAL
|
||||
new ScriptingHost;
|
||||
new CConfigDB;
|
||||
|
||||
CSimulation2 sim(NULL, NULL);
|
||||
CLOSTexture tex(sim);
|
||||
|
||||
|
@ -69,9 +69,13 @@ public:
|
||||
|
||||
RegisterFileReloadFunc(ReloadChangedFileCB, this);
|
||||
|
||||
// Tests won't have config initialised
|
||||
if (CConfigDB::IsInitialised())
|
||||
{
|
||||
CFG_GET_USER_VAL("ooslog", Bool, m_EnableOOSLog);
|
||||
CFG_GET_USER_VAL("serializationtest", Bool, m_EnableSerializationTest);
|
||||
}
|
||||
}
|
||||
|
||||
~CSimulation2Impl()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user