PostGIS  3.4.0dev-r@@SVN_REVISION@@
loader/cunit/cu_tester.c
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * PostGIS - Spatial Types for PostgreSQL
4  * http://postgis.net
5  * Copyright 2008 Paul Ramsey
6  *
7  * This is free software; you can redistribute and/or modify it under
8  * the terms of the GNU General Public Licence. See the COPYING file.
9  *
10  **********************************************************************/
11 
12 #include <stdio.h>
13 #include <string.h>
14 #include "CUnit/Basic.h"
15 #include "cu_tester.h"
16 #include "../postgis_config.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 #ifdef POSTGIS_PGSQL_VERSION
38  /* Add the pgsql2shp test suite */
39  if (NULL == register_pgsql2shp_suite())
40  {
41  CU_cleanup_registry();
42  return CU_get_error();
43  }
44 #endif
45 
46  /* Run all tests using the CUnit Basic interface */
47  CU_basic_set_mode(CU_BRM_VERBOSE);
48  CU_basic_run_tests();
49  CU_cleanup_registry();
50 
51  return CU_get_error();
52 
53 }
CU_pSuite register_pgsql2shp_suite(void)
Definition: cu_pgsql2shp.c:26
CU_pSuite register_shp2pgsql_suite(void)
Definition: cu_shp2pgsql.c:26
int main()