27 #include "../client/client.h"
28 #include "../client/cl_shared.h"
29 #include "../client/cl_lua.h"
30 #include "../client/renderer/r_state.h"
31 #include "../client/ui/ui_main.h"
32 #include "../common/routing.h"
33 #include "../server/server.h"
34 #include "../server/sv_rma.h"
36 #define RMA_HIGHEST_SUPPORTED_SEED 50
82 if (filterId && !
Q_streq(filterId, md->
id))
90 seed = (
unsigned int) time(
nullptr);
94 Com_Printf(
"testMapDefsSingleplayer: Mapdef %s (seed %u)\n", md->
id, seed);
96 std::cout <<
"[ ] testing mapdef: " << md->
id << std::endl;
101 Com_Printf(
"testMapDefsSingleplayer: Mapdef %s (param %s)\n", md->
id, param);
102 std::cout <<
"[ ] testing mapdef: " << md->
id <<
", assembly: "
103 << param << std::endl;
124 if (filterId && !
Q_streq(filterId, md->
id))
135 seed = (
unsigned int) time(
nullptr);
139 Com_Printf(
"testMapDefsMultiplayer: Mapdef %s (seed %u)\n", md->
id, seed);
141 std::cout <<
"[ ] testing mapdef: " << md->
id << std::endl;
146 ASSERT_TRUE(
svs.
ge->ClientConnect(player, userinfo,
sizeof(userinfo)));
151 Com_Printf(
"testMapDefsMultiplayer: Mapdef %s (param %s)\n", md->
id, param);
153 std::cout <<
"[ ] testing mapdef: " << md->
id <<
", assembly: "
154 << param << std::endl;
157 ASSERT_TRUE(
svs.
ge->ClientConnect(player, userinfo,
sizeof(userinfo)));
static void SetUpTestCase()
memPool_t * sv_genericPool
void SV_Map(bool day, const char *levelstring, const char *assembly, bool verbose=true)
Change the server to a new map, taking all connected clients along with it.
void Com_ParseScripts(bool onlyServer)
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
void Com_Printf(const char *const fmt,...)
gltexunit_t texunits[MAX_GL_TEXUNITS]
cvar_t * masterserver_url
memPool_t * cl_genericPool
gltexunit_t * active_texunit
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
#define MapDef_ForeachCondition(var, condition)
void CL_InitLua(void)
Initializes the ui-lua interfacing environment.
static void TearDownTestCase()
#define Mem_CreatePool(name)
const linkedList_t * LIST_ContainsString(const linkedList_t *list, const char *string)
Searches for the first occurrence of a given string.
void Info_SetValueForKey(char *s, const size_t size, const char *key, const char *value)
Adds a new entry into string with given value.
bool TEST_ExistsProperty(const char *name)
long TEST_GetLongProperty(const char *name)
memPool_t * com_networkPool
const char * TEST_GetStringProperty(const char *name)
#define LIST_Foreach(list, type, var)
Iterates over a linked list, it's safe to delete the returned entry from the list while looping over ...
memPool_t * vid_imagePool
#define MapDef_Foreach(var)
cvar_t * Cvar_Set(const char *varName, const char *value,...)
Sets a cvar value.
bool LIST_IsEmpty(const linkedList_t *list)
Checks whether the given list is empty.
void SV_ShutdownGameProgs(void)
Called when either the entire server is being killed, or it is changing to a different game directory...
cvar_t * sv_dumpmapassembly
serverInstanceStatic_t svs
TEST_F(MapDefTest, MapDefsSingleplayer)
This test cycles through the list of map definitions found in the maps.ufo script and tries to load (...