#include "test.h"
+#include "client/sound.h"
#include "nodedef.h"
#include "itemdef.h"
#include "gamedef.h"
#include "modchannels.h"
-#include "mods.h"
+#include "content/mods.h"
#include "util/numeric.h"
+#include "porting.h"
content_t t_CONTENT_STONE;
content_t t_CONTENT_GRASS;
ITextureSource *getTextureSource() { return m_texturesrc; }
IShaderSource *getShaderSource() { return m_shadersrc; }
ISoundManager *getSoundManager() { return m_soundmgr; }
- MtEventManager *getEventManager() { return m_eventmgr; }
scene::ISceneManager *getSceneManager() { return m_scenemgr; }
IRollbackManager *getRollbackManager() { return m_rollbackmgr; }
EmergeManager *getEmergeManager() { return m_emergemgr; }
ITextureSource *m_texturesrc = nullptr;
IShaderSource *m_shadersrc = nullptr;
ISoundManager *m_soundmgr = nullptr;
- MtEventManager *m_eventmgr = nullptr;
scene::ISceneManager *m_scenemgr = nullptr;
IRollbackManager *m_rollbackmgr = nullptr;
EmergeManager *m_emergemgr = nullptr;
return m_test_dir;
char buf[32];
- snprintf(buf, sizeof(buf), "%08X", myrand());
+ porting::mt_snprintf(buf, sizeof(buf), "%08X", myrand());
m_test_dir = fs::TempPath() + DIR_DELIM "mttest_" + buf;
if (!fs::CreateDir(m_test_dir))
std::string TestBase::getTestTempFile()
{
char buf[32];
- snprintf(buf, sizeof(buf), "%08X", myrand());
+ porting::mt_snprintf(buf, sizeof(buf), "%08X", myrand());
return getTestTempDirectory() + DIR_DELIM + buf + ".tmp";
}
// Create one with no heightmaps
ServerMapSector sector(&parent, v2s16(1,1));
- UASSERT(sector.getBlockNoCreateNoEx(0) == 0);
- UASSERT(sector.getBlockNoCreateNoEx(1) == 0);
+ UASSERT(sector.getBlockNoCreateNoEx(0) == nullptr);
+ UASSERT(sector.getBlockNoCreateNoEx(1) == nullptr);
MapBlock * bref = sector.createBlankBlock(-2);
- UASSERT(sector.getBlockNoCreateNoEx(0) == 0);
+ UASSERT(sector.getBlockNoCreateNoEx(0) == nullptr);
UASSERT(sector.getBlockNoCreateNoEx(-2) == bref);
//TODO: Check for AlreadyExistsException