PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches
cu_pgsql2shp.c
Go to the documentation of this file.
1/**********************************************************************
2 *
3 * PostGIS - Spatial Types for PostgreSQL
4 * http://postgis.net
5 * Copyright 2010 LISAsoft Pty Ltd
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 "cu_pgsql2shp.h"
13#include "cu_tester.h"
14#include "../pgsql2shp-core.h"
15
16/* Test functions */
17void test_ShpDumperCreate(void);
18void test_ShpDumperDestroy(void);
19
22
23/*
24** Called from test harness to register the tests in this file.
25*/
27{
28 CU_pSuite pSuite;
29 pSuite = CU_add_suite("Shapefile Loader File pgsql2shp Test", init_pgsql2shp_suite, clean_pgsql2shp_suite);
30 if (NULL == pSuite)
31 {
32 CU_cleanup_registry();
33 return NULL;
34 }
35
36 if (
37 (NULL == CU_add_test(pSuite, "test_ShpDumperCreate()", test_ShpDumperCreate)) ||
38 (NULL == CU_add_test(pSuite, "test_ShpDumperDestroy()", test_ShpDumperDestroy))
39 )
40 {
41 CU_cleanup_registry();
42 return NULL;
43 }
44 return pSuite;
45}
46
47/*
48** The suite initialization function.
49** Create any reused objects.
50*/
52{
53 return 0;
54}
55
56/*
57** The suite cleanup function.
58** Frees any global objects.
59*/
61{
62 return 0;
63}
64
66{
67 dumper_config = (SHPDUMPERCONFIG*)calloc(1, sizeof(SHPDUMPERCONFIG));
70 CU_ASSERT_PTR_NOT_NULL(dumper_state);
71 CU_ASSERT_EQUAL(dumper_state->config->fetchsize, 100);
72}
73
void test_ShpDumperCreate(void)
CU_pSuite register_pgsql2shp_suite(void)
void test_ShpDumperDestroy(void)
int clean_pgsql2shp_suite(void)
SHPDUMPERCONFIG * dumper_config
int init_pgsql2shp_suite(void)
SHPDUMPERSTATE * dumper_state
void set_dumper_config_defaults(SHPDUMPERCONFIG *config)
void ShpDumperDestroy(SHPDUMPERSTATE *state)
SHPDUMPERSTATE * ShpDumperCreate(SHPDUMPERCONFIG *config)
SHPDUMPERCONFIG * config