PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_twkb_in_precision()

static void test_twkb_in_precision ( void  )
static

Definition at line 204 of file cu_in_twkb.c.

205 {
206  /* Try these cases at several different precisions */
207  for ( precision = 1; precision <= 6; precision++ )
208  {
209  cu_twkb_in("MULTILINESTRING((0 0,0 1),EMPTY,(1 1, 10 10))");
210  CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
211 
212  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)))");
213  CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
214 
215  cu_twkb_in("GEOMETRYCOLLECTION(POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1))");
216  CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
217 
218  cu_twkb_in("MULTILINESTRING((0 0 200000,0 1 10),(1 100000000 23, 10 10 45))");
219  // printf("old: %s\nnew: %s\n",hex_a, hex_b);
220  CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
221  }
222 
223  /* Go back to default precision */
224  precision = 0;
225 }
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: