test_routing.c
Go to the documentation of this file.00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "CUnit/Basic.h"
00026 #include "test_routing.h"
00027 #include "test_shared.h"
00028
00029 #include "../common/common.h"
00030 #include "../common/cmodel.h"
00031
00036 static int UFO_InitSuiteRouting (void)
00037 {
00038 TEST_Init();
00039 return 0;
00040 }
00041
00046 static int UFO_CleanSuiteRouting (void)
00047 {
00048 TEST_Shutdown();
00049 return 0;
00050 }
00051
00052 static mapData_t mapData;
00053 static mapTiles_t mapTiles;
00054
00055 static void testConnection (void)
00056 {
00061 CM_LoadMap("fueldump", qtrue, "", &mapData, &mapTiles);
00062 CM_LoadMap("fueldump", qtrue, "", &mapData, &mapTiles);
00063 }
00064
00065 int UFO_AddRoutingTests (void)
00066 {
00067
00068 CU_pSuite routingSuite = CU_add_suite("RoutingTests", UFO_InitSuiteRouting, UFO_CleanSuiteRouting);
00069 if (routingSuite == NULL)
00070 return CU_get_error();
00071
00072
00073 if (CU_ADD_TEST(routingSuite, testConnection) == NULL)
00074 return CU_get_error();
00075
00076 return CUE_SUCCESS;
00077 }