]> granicus.if.org Git - postgis/commitdiff
Make random brute force test a compile-time option.
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 30 Sep 2009 17:09:35 +0000 (17:09 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 30 Sep 2009 17:09:35 +0000 (17:09 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4559 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_geodetic.c

index e1643eb749bf68ccfeea0d99368ee926e163355b..d1417914c112ce4fd7e37e67e8ffe62e0fbbb8b5 100644 (file)
@@ -12,6 +12,8 @@
 
 #include "cu_geodetic.h"
 
+#define RANDOM_TEST 0
+
 /*
 ** Called from test harness to register the tests in this file.
 */
@@ -27,7 +29,9 @@ CU_pSuite register_geodetic_suite(void)
 
        if (
            (NULL == CU_add_test(pSuite, "test_signum()", test_signum))  ||
+#if RANDOM_TEST
            (NULL == CU_add_test(pSuite, "test_gbox_from_spherical_coordinates()", test_gbox_from_spherical_coordinates))  ||
+#endif
            (NULL == CU_add_test(pSuite, "test_gserialized_get_gbox_geocentric()", test_gserialized_get_gbox_geocentric))  ||
            (NULL == CU_add_test(pSuite, "test_clairaut()", test_clairaut))  || 
            (NULL == CU_add_test(pSuite, "test_edge_intersection()", test_edge_intersection)) 
@@ -65,6 +69,8 @@ void test_signum(void)
        CU_ASSERT_EQUAL(signum(5.0),1);
 }
 
+#if RANDOM_TEST
+
 void test_gbox_from_spherical_coordinates(void)
 {
        const double gtolerance = 0.000001;
@@ -138,6 +144,8 @@ void test_gbox_from_spherical_coordinates(void)
 
 }
 
+#endif /* RANDOM_TEST */
+
 void test_clairaut(void)
 {