PostGIS  2.1.10dev-r@@SVN_REVISION@@
loader/cunit/cu_tester.c
Go to the documentation of this file.
1 /**********************************************************************
2  * $Id: cu_tester.c 5675 2010-06-03 07:35:41Z mleslie $
3  *
4  * PostGIS - Spatial Types for PostgreSQL
5  * http://postgis.net
6  * Copyright 2008 Paul Ramsey
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU General Public Licence. See the COPYING file.
10  *
11  **********************************************************************/
12 
13 #include <stdio.h>
14 #include <string.h>
15 #include "CUnit/Basic.h"
16 #include "cu_tester.h"
17 
18 /*
19 ** The main() function for setting up and running the tests.
20 ** Returns a CUE_SUCCESS on successful running, another
21 ** CUnit error code on failure.
22 */
23 int main()
24 {
25 
26  /* initialize the CUnit test registry */
27  if (CUE_SUCCESS != CU_initialize_registry())
28  return CU_get_error();
29 
30  /* Add the shp2pgsql test suite */
31  if (NULL == register_shp2pgsql_suite())
32  {
33  CU_cleanup_registry();
34  return CU_get_error();
35  }
36 
37  /* Add the pgsql2shp test suite */
38  if (NULL == register_pgsql2shp_suite())
39  {
40  CU_cleanup_registry();
41  return CU_get_error();
42  }
43 
44  /* Run all tests using the CUnit Basic interface */
45  CU_basic_set_mode(CU_BRM_VERBOSE);
46  CU_basic_run_tests();
47  CU_cleanup_registry();
48 
49  return CU_get_error();
50 
51 }
CU_pSuite register_shp2pgsql_suite(void)
Definition: cu_shp2pgsql.c:27
int main()
CU_pSuite register_pgsql2shp_suite(void)
Definition: cu_pgsql2shp.c:27