]> granicus.if.org Git - postgis/commitdiff
Move ST_EstimatedExtent tests in their own file
authorSandro Santilli <strk@keybit.net>
Thu, 10 Dec 2015 10:15:14 +0000 (10:15 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 10 Dec 2015 10:15:14 +0000 (10:15 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@14480 b70326c6-7e19-0410-871a-916f4a2858ee

regress/Makefile.in
regress/estimatedextent.sql [new file with mode: 0644]
regress/estimatedextent_expected [new file with mode: 0644]
regress/tickets.sql
regress/tickets_expected

index 3a400cb1450325dd014115fb55f8b64454b3ec4c..71304ffef8de6f806b5a76d250b26a1ca077cbc3 100644 (file)
@@ -84,6 +84,7 @@ TESTS = \
        dump \
        dumppoints \
        empty \
+       estimatedextent \
        forcecurve \
        geography \
        in_geohash \
diff --git a/regress/estimatedextent.sql b/regress/estimatedextent.sql
new file mode 100644 (file)
index 0000000..b331078
--- /dev/null
@@ -0,0 +1,29 @@
+-- #877, #818
+create table t(g geometry);
+select '#877.1', ST_EstimatedExtent('t','g');
+analyze t;
+select '#877.2', ST_EstimatedExtent('public', 't','g');
+SET client_min_messages TO DEBUG;
+select '#877.2.deprecated', ST_Estimated_Extent('public', 't','g');
+SET client_min_messages TO NOTICE;
+insert into t(g) values ('LINESTRING(-10 -50, 20 30)');
+
+-- #877.3
+with e as ( select ST_EstimatedExtent('t','g') as e )
+select '#877.3', round(st_xmin(e.e)::numeric, 5), round(st_xmax(e.e)::numeric, 5),
+round(st_ymin(e.e)::numeric, 5), round(st_ymax(e.e)::numeric, 5) from e;
+
+-- #877.4
+analyze t;
+with e as ( select ST_EstimatedExtent('t','g') as e )
+select '#877.4', round(st_xmin(e.e)::numeric, 5), round(st_xmax(e.e)::numeric, 5),
+round(st_ymin(e.e)::numeric, 5), round(st_ymax(e.e)::numeric, 5) from e;
+
+-- #877.5
+truncate t;
+with e as ( select ST_EstimatedExtent('t','g') as e )
+select '#877.5', round(st_xmin(e.e)::numeric, 5), round(st_xmax(e.e)::numeric, 5),
+round(st_ymin(e.e)::numeric, 5), round(st_ymax(e.e)::numeric, 5) from e;
+drop table t;
+
+
diff --git a/regress/estimatedextent_expected b/regress/estimatedextent_expected
new file mode 100644 (file)
index 0000000..bc65afc
--- /dev/null
@@ -0,0 +1,7 @@
+ERROR:  stats for "t.g" do not exist
+ERROR:  stats for "t.g" do not exist
+WARNING:  ST_Estimated_Extent signature was deprecated in 2.1.0. Please use ST_EstimatedExtent
+ERROR:  stats for "t.g" do not exist
+ERROR:  stats for "t.g" do not exist
+#877.4|-10.15000|20.15000|-50.40000|30.40000
+#877.5|-10.15000|20.15000|-50.40000|30.40000
index a9ced6e8a53c6fda9aba903aebdc593f731e589e..37022881597beae29e5e0f35cf5cd67dff5cefc0 100644 (file)
@@ -449,34 +449,6 @@ SELECT '#1273', st_equals(p.g, postgis_addbbox(p.g)) from p;
 WITH p AS ( SELECT 'MULTIPOINT((832694.188 816254.625))'::geometry as g ) 
 SELECT '#1273.1', st_equals(p.g, postgis_dropbbox(p.g)) from p;
 
--- #877, #818
-create table t(g geometry);
-select '#877.1', ST_EstimatedExtent('t','g');
-analyze t;
-select '#877.2', ST_EstimatedExtent('public', 't','g');
-SET client_min_messages TO DEBUG;
-select '#877.2.deprecated', ST_Estimated_Extent('public', 't','g');
-SET client_min_messages TO NOTICE;
-insert into t(g) values ('LINESTRING(-10 -50, 20 30)');
-
--- #877.3
-with e as ( select ST_EstimatedExtent('t','g') as e )
-select '#877.3', round(st_xmin(e.e)::numeric, 5), round(st_xmax(e.e)::numeric, 5),
-round(st_ymin(e.e)::numeric, 5), round(st_ymax(e.e)::numeric, 5) from e;
-
--- #877.4
-analyze t;
-with e as ( select ST_EstimatedExtent('t','g') as e )
-select '#877.4', round(st_xmin(e.e)::numeric, 5), round(st_xmax(e.e)::numeric, 5),
-round(st_ymin(e.e)::numeric, 5), round(st_ymax(e.e)::numeric, 5) from e;
-
--- #877.5
-truncate t;
-with e as ( select ST_EstimatedExtent('t','g') as e )
-select '#877.5', round(st_xmin(e.e)::numeric, 5), round(st_xmax(e.e)::numeric, 5),
-round(st_ymin(e.e)::numeric, 5), round(st_ymax(e.e)::numeric, 5) from e;
-drop table t;
-
 -- #1292
 SELECT '#1292', ST_AsText(ST_SnapToGrid(ST_GeomFromText(
        'GEOMETRYCOLLECTION(POINT(180 90),POLYGON((140 50,150 50,180 50,140 50),(140 60,150 60,180 60,140 60)))'
index 8a83aeb71fe6682e88b97bdc3e8202e2e2d6bc2a..b4e83b24f98618dea9d45a3febdcc0ea42913cf8 100644 (file)
@@ -144,13 +144,6 @@ ERROR:  First argument must be a LINESTRING
 #1060|FFFFFFFF2
 #1273|t
 #1273.1|t
-ERROR:  stats for "t.g" do not exist
-ERROR:  stats for "t.g" do not exist
-WARNING:  ST_Estimated_Extent signature was deprecated in 2.1.0. Please use ST_EstimatedExtent
-ERROR:  stats for "t.g" do not exist
-ERROR:  stats for "t.g" do not exist
-#877.4|-10.15000|20.15000|-50.40000|30.40000
-#877.5|-10.15000|20.15000|-50.40000|30.40000
 #1292|GEOMETRYCOLLECTION(POINT(180 90),POLYGON((140 50,150 50,180 50,140 50),(140 60,150 60,180 60,140 60)))
 NOTICE:  Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY
 NOTICE:  Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY