test_routing.c

Go to the documentation of this file.
00001 
00005 /*
00006 Copyright (C) 2002-2010 UFO: Alien Invasion.
00007 
00008 This program is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU General Public License
00010 as published by the Free Software Foundation; either version 2
00011 of the License, or (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016 
00017 See the GNU General Public License for more details.
00018 
00019 You should have received a copy of the GNU General Public License
00020 along with this program; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
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     /* add a suite to the registry */
00068     CU_pSuite routingSuite = CU_add_suite("RoutingTests", UFO_InitSuiteRouting, UFO_CleanSuiteRouting);
00069     if (routingSuite == NULL)
00070         return CU_get_error();
00071 
00072     /* add the tests to the suite */
00073     if (CU_ADD_TEST(routingSuite, testConnection) == NULL)
00074         return CU_get_error();
00075 
00076     return CUE_SUCCESS;
00077 }

Generated by  doxygen 1.6.2