The following commit has been merged in the master branch: commit 6553baf2a16e67aff39ee764ed5078dfeb424f01 Author: Markus Wanner <mar...@bluegap.ch> Date: Tue Aug 6 20:16:11 2013 +0200
Add patch fix-tests-on-big-endian to fix unit tests on big endian. diff --git a/debian/patches/fix-tests-on-big-endian b/debian/patches/fix-tests-on-big-endian new file mode 100644 index 0000000..aceae31 --- /dev/null +++ b/debian/patches/fix-tests-on-big-endian @@ -0,0 +1,36 @@ +Description: Fix an endianness issue in unit tests +Author: Regina Obe <l...@pcorp.us> +Last-Update: 2013-08-06 +Origin: http://trac.osgeo.org/postgis/changeset/11738 + +--- a/liblwgeom/cunit/cu_libgeom.c ++++ b/liblwgeom/cunit/cu_libgeom.c +@@ -693,6 +693,7 @@ + static void test_lwgeom_force_clockwise(void) + { + LWGEOM *geom; ++ LWGEOM *geom2; + char *in_ewkt, *out_ewkt; + + /* counterclockwise, must be reversed */ +@@ -743,13 +744,14 @@ + /* NOTE: this is a narrow ring, see ticket #1302 */ + in_ewkt = "0103000000010000000500000000917E9BA468294100917E9B8AEA2841C976BE1FA4682941C976BE9F8AEA2841B39ABE1FA46829415ACCC29F8AEA284137894120A4682941C976BE9F8AEA284100917E9BA468294100917E9B8AEA2841"; + geom = lwgeom_from_hexwkb(in_ewkt, LW_PARSER_CHECK_NONE); +- lwgeom_force_clockwise(geom); +- out_ewkt = lwgeom_to_hexwkb(geom, WKB_ISO, NULL); +- if (strcmp(in_ewkt, out_ewkt)) +- fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt); +- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt); +- lwfree(out_ewkt); ++ geom2 = lwgeom_from_hexwkb(in_ewkt, LW_PARSER_CHECK_NONE); ++ lwgeom_force_clockwise(geom2); ++ ++ /** use same check instead of strcmp to account ++ for difference in endianness **/ ++ CU_ASSERT( lwgeom_same(geom, geom2) ); + lwgeom_free(geom); ++ lwgeom_free(geom2); + } + + /* diff --git a/debian/patches/series b/debian/patches/series index 0cd3661..17a0a48 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,4 @@ fix-manpages honor-build-flags fix-test-case-for-i386 fix-kfreebsd +fix-tests-on-big-endian -- PostGIS for PostgreSQL _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel