2010-08-11 09:50:38 +00:00
|
|
|
/**********************************************************************
|
|
|
|
*
|
|
|
|
* PostGIS - Spatial Types for PostgreSQL
|
2014-01-29 17:49:35 +00:00
|
|
|
* http://postgis.net
|
2010-08-11 09:50:38 +00:00
|
|
|
* Copyright 2008 Paul Ramsey
|
|
|
|
*
|
|
|
|
* This is free software; you can redistribute and/or modify it under
|
|
|
|
* the terms of the GNU General Public Licence. See the COPYING file.
|
|
|
|
*
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include "CUnit/Basic.h"
|
|
|
|
#include "cu_tester.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
** The main() function for setting up and running the tests.
|
|
|
|
** Returns a CUE_SUCCESS on successful running, another
|
|
|
|
** CUnit error code on failure.
|
|
|
|
*/
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
|
|
|
|
/* initialize the CUnit test registry */
|
|
|
|
if (CUE_SUCCESS != CU_initialize_registry())
|
|
|
|
return CU_get_error();
|
|
|
|
|
2011-07-02 13:43:35 +00:00
|
|
|
/* Add the shp2pgsql test suite */
|
|
|
|
if (NULL == register_shp2pgsql_suite())
|
|
|
|
{
|
|
|
|
CU_cleanup_registry();
|
|
|
|
return CU_get_error();
|
|
|
|
}
|
|
|
|
|
2011-07-02 12:34:16 +00:00
|
|
|
/* Add the pgsql2shp test suite */
|
2011-04-03 19:19:30 +00:00
|
|
|
if (NULL == register_pgsql2shp_suite())
|
|
|
|
{
|
|
|
|
CU_cleanup_registry();
|
|
|
|
return CU_get_error();
|
|
|
|
}
|
2010-08-11 09:50:38 +00:00
|
|
|
|
|
|
|
/* Run all tests using the CUnit Basic interface */
|
|
|
|
CU_basic_set_mode(CU_BRM_VERBOSE);
|
|
|
|
CU_basic_run_tests();
|
|
|
|
CU_cleanup_registry();
|
|
|
|
|
|
|
|
return CU_get_error();
|
|
|
|
|
|
|
|
}
|