Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/graphics/tests/test_MapGenerator.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | if (!VfsDirectoryExists(L"maps/random/tests/")) | ||||
return; | return; | ||||
} | } | ||||
VfsPaths paths; | VfsPaths paths; | ||||
TS_ASSERT_OK(vfs::GetPathnames(g_VFS, L"maps/random/tests/", L"test_*.js", paths)); | TS_ASSERT_OK(vfs::GetPathnames(g_VFS, L"maps/random/tests/", L"test_*.js", paths)); | ||||
for (const VfsPath& path : paths) | for (const VfsPath& path : paths) | ||||
{ | { | ||||
ScriptInterface scriptInterface("Engine", "MapGenerator", g_ScriptRuntime); | ScriptInterface scriptInterface("Engine", "MapGenerator", g_ScriptContext); | ||||
ScriptTestSetup(scriptInterface); | ScriptTestSetup(scriptInterface); | ||||
CMapGeneratorWorker worker(&scriptInterface); | CMapGeneratorWorker worker(&scriptInterface); | ||||
worker.InitScriptInterface(0); | worker.InitScriptInterface(0); | ||||
scriptInterface.LoadGlobalScriptFile(path); | scriptInterface.LoadGlobalScriptFile(path); | ||||
} | } | ||||
} | } | ||||
}; | }; |
Wildfire Games · Phabricator