PostGIS  2.4.9dev-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 
17 /*
18 ** The main() function for setting up and running the tests.
19 ** Returns a CUE_SUCCESS on successful running, another
20 ** CUnit error code on failure.
21 */
22 int main()
23 {
24 
25  /* initialize the CUnit test registry */
26  if (CUE_SUCCESS != CU_initialize_registry())
27  return CU_get_error();
28 
29  /* Add the shp2pgsql test suite */
30  if (NULL == register_shp2pgsql_suite())
31  {
32  CU_cleanup_registry();
33  return CU_get_error();
34  }
35 
36  /* Add the pgsql2shp test suite */
37  if (NULL == register_pgsql2shp_suite())
38  {
39  CU_cleanup_registry();
40  return CU_get_error();
41  }
42 
43  /* Run all tests using the CUnit Basic interface */
44  CU_basic_set_mode(CU_BRM_VERBOSE);
45  CU_basic_run_tests();
46  CU_cleanup_registry();
47 
48  return CU_get_error();
49 
50 }
CU_pSuite register_shp2pgsql_suite(void)
Definition: cu_shp2pgsql.c:26
int main()
CU_pSuite register_pgsql2shp_suite(void)
Definition: cu_pgsql2shp.c:26