]> granicus.if.org Git - postgis/commitdiff
Added regression test for error case reported in #1638.
authorDavid Zwarg <dzwarg@azavea.com>
Thu, 1 Mar 2012 22:25:12 +0000 (22:25 +0000)
committerDavid Zwarg <dzwarg@azavea.com>
Thu, 1 Mar 2012 22:25:12 +0000 (22:25 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9379 b70326c6-7e19-0410-871a-916f4a2858ee

raster/test/regress/rt_mapalgebraexpr.sql
raster/test/regress/rt_mapalgebraexpr_expected

index 4b29e0f5a7226c078a040879fdd9a7a78811561d..f762a8afc7dbfc9896c5b1e83444259f195b3421 100644 (file)
@@ -44,3 +44,20 @@ WITH op AS ( select rast AS rin,
   ST_MapAlgebraExpr(rast, 1, NULL, 'SELECT g from (select [rast],NULL::double precision as g) as foo', 2)
   AS rout FROM ST_TestRaster(0, 0, 10) rast )
 SELECT 'T11.2', ST_Value(rin, 1, 1), ST_Value(rout, 1, 1) FROM op;
+
+-- Test pracine's new bug #1638
+SELECT 'T12',
+  ST_Value(rast, 1, 2) = 1,
+  ST_Value(rast, 2, 1) = 2,
+  ST_Value(rast, 4, 3) = 4,
+  ST_Value(rast, 3, 4) = 3
+  FROM ST_MapAlgebraExpr(
+    ST_AddBand(
+      ST_MakeEmptyRaster(10, 10, 0, 0, 0.001, 0.001, 0, 0, 4269), 
+      '8BUI'::text, 
+      1, 
+      0
+    ), 
+    '32BUI', 
+    '[rast.x]'
+  ) AS rast; 
index 7d98be1b1039796594f102cb183296e071df37c4..101d50e39dd9ae72afa105a04f0f9d2b8b736c06 100644 (file)
@@ -23,3 +23,4 @@ T10.8.4|10|30
 ERROR:  division by zero
 T11.1|10|2
 T11.2|10|2
+T12|t|t|t|t