PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_clone()

static void test_clone ( void  )
static

Definition at line 205 of file liblwgeom/cunit/cu_misc.c.

206 {
207  static char *wkt = "GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0))),POINT(1 1),LINESTRING(2 3,4 5))";
209  LWGEOM *geom2;
210 
211  /* Free in "backwards" order */
212  geom2 = lwgeom_clone(geom1);
213  lwgeom_free(geom1);
214  lwgeom_free(geom2);
215 
216  /* Free in "forewards" order */
217  geom1 = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_ALL);
218  geom2 = lwgeom_clone(geom1);
219  lwgeom_free(geom2);
220  lwgeom_free(geom1);
221 }
#define LW_PARSER_CHECK_ALL
Definition: liblwgeom.h:2006
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:482
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904

References LW_PARSER_CHECK_ALL, lwgeom_clone(), lwgeom_free(), and lwgeom_from_wkt().

Referenced by misc_suite_setup().

Here is the call graph for this function:
Here is the caller graph for this function: