]> granicus.if.org Git - postgis/commitdiff
forgot to add unit tests to git. ticket #2828
authorBborie Park <bkpark at ucdavis.edu>
Tue, 5 Aug 2014 12:24:49 +0000 (12:24 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Tue, 5 Aug 2014 12:24:49 +0000 (12:24 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12859 b70326c6-7e19-0410-871a-916f4a2858ee

raster/test/regress/rt_envelope.sql [new file with mode: 0644]
raster/test/regress/rt_envelope_expected [new file with mode: 0644]

diff --git a/raster/test/regress/rt_envelope.sql b/raster/test/regress/rt_envelope.sql
new file mode 100644 (file)
index 0000000..b1bf241
--- /dev/null
@@ -0,0 +1,14 @@
+-- NULL raster
+SELECT ST_AsText(ST_Envelope(NULL::raster));
+
+-- width and height of zero
+SELECT ST_AsText(ST_Envelope(ST_MakeEmptyRaster(0, 0, 0, 0, 1, -1, 0, 0, 0)));
+
+-- width of zero
+SELECT ST_AsText(ST_Envelope(ST_MakeEmptyRaster(0, 9, 0, 0, 1, -1, 0, 0, 0)));
+
+-- height of zero
+SELECT ST_AsText(ST_Envelope(ST_MakeEmptyRaster(9, 0, 0, 0, 1, -1, 0, 0, 0)));
+
+-- normal raster
+SELECT ST_AsText(ST_Envelope(ST_MakeEmptyRaster(9, 9, 0, 0, 1, -1, 0, 0, 0)));
diff --git a/raster/test/regress/rt_envelope_expected b/raster/test/regress/rt_envelope_expected
new file mode 100644 (file)
index 0000000..704ad22
--- /dev/null
@@ -0,0 +1,4 @@
+POINT(0 0)
+LINESTRING(0 0,0 -9)
+LINESTRING(0 0,9 0)
+POLYGON((0 0,9 0,9 -9,0 -9,0 0))