Crossfire Server, Trunk
check_rogue_layout.cpp
Go to the documentation of this file.
1 /*
2  * static char *rcsid_check_rogue_layout_c =
3  * "$Id$";
4  */
5 
6 /*
7  * CrossFire, A Multiplayer game for X-windows
8  *
9  * Copyright (C) 2002 Mark Wedel & Crossfire Development Team
10  * Copyright (C) 1992 Frank Tore Johansen
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  *
26  * The authors can be reached via e-mail at crossfire-devel@real-time.com
27  */
28 
29 /*
30  * This is the unit tests file for random_maps/rogue_layout.c
31  */
32 
33 #include <stdlib.h>
34 #include <check.h>
35 
36 
37 void setup(void) {
38  /* put any initialisation steps here, they will be run before each testcase */
39 }
40 
41 void teardown(void) {
42  /* put any cleanup steps here, they will be run after each testcase */
43 }
44 
45 START_TEST(test_empty) {
46  /*TESTME test not yet developped*/
47 }
48 END_TEST
49 
50 Suite *rogue_layout_suite(void) {
51  Suite *s = suite_create("rogue_layout");
52  TCase *tc_core = tcase_create("Core");
53 
54  /*setup and teardown will be called before each test in testcase 'tc_core' */
55  tcase_add_checked_fixture(tc_core, setup, teardown);
56 
57  suite_add_tcase(s, tc_core);
58  tcase_add_test(tc_core, test_empty);
59 
60  return s;
61 }
62 
63 int main(void) {
64  int nf;
65  Suite *s = rogue_layout_suite();
66  SRunner *sr = srunner_create(s);
67 
68  srunner_set_xml(sr, LOGDIR "/unit/random_maps/rogue_layout.xml");
69  srunner_set_log(sr, LOGDIR "/unit/random_maps/rogue_layout.out");
70  srunner_run_all(sr, CK_ENV); /*verbosity from env variable*/
71  nf = srunner_ntests_failed(sr);
72  srunner_free(sr);
73  return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
74 }
setup
void setup(void)
Definition: check_rogue_layout.cpp:37
rogue_layout_suite
END_TEST Suite * rogue_layout_suite(void)
Definition: check_rogue_layout.cpp:50
START_TEST
START_TEST(test_empty)
Definition: check_rogue_layout.cpp:45
teardown
void teardown(void)
Definition: check_rogue_layout.cpp:41
main
int main(void)
Definition: check_rogue_layout.cpp:63