Crossfire Server, Branch 1.12
R12190
|
00001 /* 00002 * static char *rcsid_check_timers_c = 00003 * "$Id: check_timers.c 11578 2009-02-23 22:02:27Z lalo $"; 00004 */ 00005 00006 /* 00007 * CrossFire, A Multiplayer game for X-windows 00008 * 00009 * Copyright (C) 2002 Mark Wedel & Crossfire Development Team 00010 * Copyright (C) 1992 Frank Tore Johansen 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation; either version 2 of the License, or 00015 * (at your option) any later version. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with this program; if not, write to the Free Software 00024 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00025 * 00026 * The authors can be reached via e-mail at crossfire-devel@real-time.com 00027 */ 00028 00029 /* 00030 * This is the unit tests file for server/timers.c 00031 */ 00032 00033 #include <stdlib.h> 00034 #include <check.h> 00035 00036 00037 void setup(void) { 00038 /* put any initialisation steps here, they will be run before each testcase */ 00039 } 00040 00041 void teardown(void) { 00042 /* put any cleanup steps here, they will be run after each testcase */ 00043 } 00044 00045 START_TEST(test_empty) { 00046 /*TESTME test not yet developped*/ 00047 } 00048 END_TEST 00049 00050 Suite *timers_suite(void) { 00051 Suite *s = suite_create("timers"); 00052 TCase *tc_core = tcase_create("Core"); 00053 00054 /*setup and teardown will be called before each test in testcase 'tc_core' */ 00055 tcase_add_checked_fixture(tc_core, setup, teardown); 00056 00057 suite_add_tcase(s, tc_core); 00058 tcase_add_test(tc_core, test_empty); 00059 00060 return s; 00061 } 00062 00063 int main(void) { 00064 int nf; 00065 Suite *s = timers_suite(); 00066 SRunner *sr = srunner_create(s); 00067 00068 srunner_set_xml(sr, LOGDIR "/unit/server/timers.xml"); 00069 srunner_set_log(sr, LOGDIR "/unit/server/timers.out"); 00070 srunner_run_all(sr, CK_ENV); /*verbosity from env variable*/ 00071 nf = srunner_ntests_failed(sr); 00072 srunner_free(sr); 00073 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 00074 }