PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ test_twkb_in_precision()

static void test_twkb_in_precision ( void  )
static

Definition at line 202 of file cu_in_twkb.c.

203 {
204  /* Try these cases at several different precisions */
205  for ( precision = 1; precision <= 6; precision++ )
206  {
207  cu_twkb_in("MULTILINESTRING((0 0,0 1),EMPTY,(1 1, 10 10))");
208  CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
209 
210  cu_twkb_in("MULTIPOLYGON(((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((-1 -1 0,-1 2 0,2 2 0,2 -1 0,-1 -1 0),(0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)))");
211  CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
212 
213  cu_twkb_in("GEOMETRYCOLLECTION(POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1))");
214  CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
215 
216  cu_twkb_in("MULTILINESTRING((0 0 200000,0 1 10),(1 100000000 23, 10 10 45))");
217  // printf("old: %s\nnew: %s\n",hex_a, hex_b);
218  CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
219  }
220 
221  /* Go back to default precision */
222  precision = 0;
223 }
static char * hex_a
Definition: cu_in_twkb.c:23
static uint8_t precision
Definition: cu_in_twkb.c:25
static void cu_twkb_in(char *wkt)
Definition: cu_in_twkb.c:53
static char * hex_b
Definition: cu_in_twkb.c:24

References cu_twkb_in(), hex_a, hex_b, and precision.

Referenced by twkb_in_suite_setup().

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