]> granicus.if.org Git - postgis/commitdiff
Move single-test data tables within the testfiles, cleanup after run
authorSandro Santilli <strk@keybit.net>
Sat, 24 Dec 2011 09:58:39 +0000 (09:58 +0000)
committerSandro Santilli <strk@keybit.net>
Sat, 24 Dec 2011 09:58:39 +0000 (09:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8548 b70326c6-7e19-0410-871a-916f4a2858ee

raster/test/regress/Makefile.in
raster/test/regress/box3d.sql
raster/test/regress/create_box3d_test.sql [deleted file]
raster/test/regress/create_box3d_test_expected [deleted file]
raster/test/regress/create_rt_bytea_test.sql [deleted file]
raster/test/regress/create_rt_bytea_test_expected [deleted file]
raster/test/regress/rt_bytea.sql

index ca5db8ff0b9f5160000c75639c8cdb06be2207e5..58b34fd19f0656127407d81ec5d4f69a4a5f21d6 100644 (file)
@@ -38,9 +38,7 @@ TEST_IO = \
        $(NULL)
 
 TEST_FUNC = \
-       create_rt_bytea_test.sql \
        rt_bytea.sql \
-       create_box3d_test.sql \
        box3d.sql \
        rt_addband.sql \
        rt_band.sql \
index e3c5a90680214fdc99500fccc7ead43705a1a580..3b24f68de3fbb7098e4d06c1ce6e5af073c16db1 100644 (file)
@@ -7,6 +7,104 @@
 -- the terms of the GNU General Public Licence. See the COPYING file.
 -----------------------------------------------------------------------
 
+CREATE TABLE rt_box3d_test (
+    id numeric,
+    name text,
+    rast raster,
+    env box3d
+);
+
+-- 10x20, ip:0.5,0.5 scale:2,3
+INSERT INTO rt_box3d_test 
+VALUES ( 0, '10x20, ip:0.5,0.5 scale:2,3 skew:0,0',
+(
+'01' -- little endian (uint8 ndr)
+|| 
+'0000' -- version (uint16 0)
+||
+'0000' -- nBands (uint16 0)
+||
+'0000000000000040' -- scaleX (float64 2)
+||
+'0000000000000840' -- scaleY (float64 3)
+||
+'000000000000E03F' -- ipX (float64 0.5)
+||
+'000000000000E03F' -- ipY (float64 0.5)
+||
+'0000000000000000' -- skewX (float64 0)
+||
+'0000000000000000' -- skewY (float64 0)
+||
+'0A000000' -- SRID (int32 10)
+||
+'0A00' -- width (uint16 10)
+||
+'1400' -- height (uint16 20)
+)::raster
+,'BOX3D(0.5 0.5,20.5 60.5 0)' -- expected envelope (20x60) == (10*2 x 20*3)
+);
+
+INSERT INTO rt_box3d_test 
+VALUES ( 1, '1x1, ip:2.5,2.5 scale:5,5 skew:0,0',
+(
+'01' -- little endian (uint8 ndr)
+|| 
+'0000' -- version (uint16 0)
+||
+'0000' -- nBands (uint16 0)
+||
+'0000000000001440' -- scaleX (float64 5)
+||
+'0000000000001440' -- scaleY (float64 5)
+||
+'0000000000000440' -- ipX (float64 2.5)
+||
+'0000000000000440' -- ipY (float64 2.5)
+||
+'0000000000000000' -- skewX (float64 0)
+||
+'0000000000000000' -- skewY (float64 0)
+||
+'00000000' -- SRID (int32 0)
+||
+'0100' -- width (uint16 1)
+||
+'0100' -- height (uint16 1)
+)::raster
+,'BOX3D(2.5 2.5,7.5 7.5 0)' -- expected envelope 
+);
+
+INSERT INTO rt_box3d_test 
+VALUES ( 2, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0',
+(
+'01' -- little endian (uint8 ndr)
+|| 
+'0000' -- version (uint16 0)
+||
+'0000' -- nBands (uint16 0)
+||
+'0000000000001440' -- scaleX (float64 5)
+||
+'0000000000001440' -- scaleY (float64 5)
+||
+'0000000000001E40' -- ipX (float64 7.5)
+||
+'0000000000000440' -- ipY (float64 2.5)
+||
+'0000000000000000' -- skewX (float64 0)
+||
+'0000000000000000' -- skewY (float64 0)
+||
+'00000000' -- SRID (int32 0)
+||
+'0100' -- width (uint16 1)
+||
+'0100' -- height (uint16 1)
+)::raster
+,'BOX3D(7.5 2.5,12.5 7.5 0)' -- expected envelope 
+);
+
 -----------------------------------------------------------------------
 -- test bounding box (2D)
 -----------------------------------------------------------------------
@@ -41,3 +139,6 @@ SELECT
 FROM rt_box3d_test
 WHERE
        box3d(st_envelope(rast))::text != env::text;
+
+-- Cleanup
+DROP TABLE rt_box3d_test;
diff --git a/raster/test/regress/create_box3d_test.sql b/raster/test/regress/create_box3d_test.sql
deleted file mode 100644 (file)
index c5dda8c..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
------------------------------------------------------------------------
--- $Id$
---
--- Copyright (c) 2009 Sandro Santilli <strk@keybit.net>
---
--- This is free software; you can redistribute and/or modify it under
--- the terms of the GNU General Public Licence. See the COPYING file.
------------------------------------------------------------------------
-
-CREATE TABLE rt_box3d_test (
-    id numeric,
-    name text,
-    rast raster,
-    env box3d
-);
-
--- 10x20, ip:0.5,0.5 scale:2,3
-INSERT INTO rt_box3d_test 
-VALUES ( 0, '10x20, ip:0.5,0.5 scale:2,3 skew:0,0',
-(
-'01' -- little endian (uint8 ndr)
-|| 
-'0000' -- version (uint16 0)
-||
-'0000' -- nBands (uint16 0)
-||
-'0000000000000040' -- scaleX (float64 2)
-||
-'0000000000000840' -- scaleY (float64 3)
-||
-'000000000000E03F' -- ipX (float64 0.5)
-||
-'000000000000E03F' -- ipY (float64 0.5)
-||
-'0000000000000000' -- skewX (float64 0)
-||
-'0000000000000000' -- skewY (float64 0)
-||
-'0A000000' -- SRID (int32 10)
-||
-'0A00' -- width (uint16 10)
-||
-'1400' -- height (uint16 20)
-)::raster
-,'BOX3D(0.5 0.5,20.5 60.5 0)' -- expected envelope (20x60) == (10*2 x 20*3)
-);
-
-INSERT INTO rt_box3d_test 
-VALUES ( 1, '1x1, ip:2.5,2.5 scale:5,5 skew:0,0',
-(
-'01' -- little endian (uint8 ndr)
-|| 
-'0000' -- version (uint16 0)
-||
-'0000' -- nBands (uint16 0)
-||
-'0000000000001440' -- scaleX (float64 5)
-||
-'0000000000001440' -- scaleY (float64 5)
-||
-'0000000000000440' -- ipX (float64 2.5)
-||
-'0000000000000440' -- ipY (float64 2.5)
-||
-'0000000000000000' -- skewX (float64 0)
-||
-'0000000000000000' -- skewY (float64 0)
-||
-'00000000' -- SRID (int32 0)
-||
-'0100' -- width (uint16 1)
-||
-'0100' -- height (uint16 1)
-)::raster
-,'BOX3D(2.5 2.5,7.5 7.5 0)' -- expected envelope 
-);
-
-INSERT INTO rt_box3d_test 
-VALUES ( 2, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0',
-(
-'01' -- little endian (uint8 ndr)
-|| 
-'0000' -- version (uint16 0)
-||
-'0000' -- nBands (uint16 0)
-||
-'0000000000001440' -- scaleX (float64 5)
-||
-'0000000000001440' -- scaleY (float64 5)
-||
-'0000000000001E40' -- ipX (float64 7.5)
-||
-'0000000000000440' -- ipY (float64 2.5)
-||
-'0000000000000000' -- skewX (float64 0)
-||
-'0000000000000000' -- skewY (float64 0)
-||
-'00000000' -- SRID (int32 0)
-||
-'0100' -- width (uint16 1)
-||
-'0100' -- height (uint16 1)
-)::raster
-,'BOX3D(7.5 2.5,12.5 7.5 0)' -- expected envelope 
-);
diff --git a/raster/test/regress/create_box3d_test_expected b/raster/test/regress/create_box3d_test_expected
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/raster/test/regress/create_rt_bytea_test.sql b/raster/test/regress/create_rt_bytea_test.sql
deleted file mode 100644 (file)
index 3ea70f9..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
------------------------------------------------------------------------
--- $Id$
---
--- Copyright (c) 2009 Mateusz Loskot <mateusz@loskot.net>
---
--- This is free software; you can redistribute and/or modify it under
--- the terms of the GNU General Public Licence. See the COPYING file.
------------------------------------------------------------------------
-
-CREATE TABLE rt_bytea_test (
-        id numeric,
-        name text,
-        rast raster
-    );
-
-INSERT INTO rt_bytea_test 
-VALUES ( 0, '10x20, ip:0.5,0.5 scale:2,3 skew:0,0 srid:10 width:10 height:20',
-(
-'01' -- little endian (uint8 ndr)
-|| 
-'0000' -- version (uint16 0)
-||
-'0000' -- nBands (uint16 0)
-||
-'0000000000000040' -- scaleX (float64 2)
-||
-'0000000000000840' -- scaleY (float64 3)
-||
-'000000000000E03F' -- ipX (float64 0.5)
-||
-'000000000000E03F' -- ipY (float64 0.5)
-||
-'0000000000000000' -- skewX (float64 0)
-||
-'0000000000000000' -- skewY (float64 0)
-||
-'0A000000' -- SRID (int32 10)
-||
-'0A00' -- width (uint16 10)
-||
-'1400' -- height (uint16 20)
-)::raster
-);
-
-INSERT INTO rt_bytea_test 
-VALUES ( 1, '1x1, ip:2.5,2.5 scale:5,5 skew:0,0, srid:1, width:1, height:1',
-(
-'01' -- little endian (uint8 ndr)
-|| 
-'0000' -- version (uint16 0)
-||
-'0000' -- nBands (uint16 0)
-||
-'0000000000001440' -- scaleX (float64 5)
-||
-'0000000000001440' -- scaleY (float64 5)
-||
-'0000000000000440' -- ipX (float64 2.5)
-||
-'0000000000000440' -- ipY (float64 2.5)
-||
-'0000000000000000' -- skewX (float64 0)
-||
-'0000000000000000' -- skewY (float64 0)
-||
-'0C000000' -- SRID (int32 12)
-||
-'0100' -- width (uint16 1)
-||
-'0100' -- height (uint16 1)
-)::raster
-);
-
-INSERT INTO rt_bytea_test 
-VALUES ( 2, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:0, width:1, height:1',
-(
-'01' -- little endian (uint8 ndr)
-|| 
-'0000' -- version (uint16 0)
-||
-'0000' -- nBands (uint16 0)
-||
-'0000000000001440' -- scaleX (float64 5)
-||
-'0000000000001440' -- scaleY (float64 5)
-||
-'0000000000001E40' -- ipX (float64 2.5)
-||
-'0000000000000440' -- ipY (float64 2.5)
-||
-'0000000000000000' -- skewX (float64 0)
-||
-'0000000000000000' -- skewY (float64 0)
-||
-'00000000' -- SRID (int32 0)
-||
-'0100' -- width (uint16 1)
-||
-'0100' -- height (uint16 1)
-)::raster
-);
-
-INSERT INTO rt_bytea_test 
-VALUES ( 3, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:-1, width:1, height:1',
-(
-'01' -- little endian (uint8 ndr)
-|| 
-'0000' -- version (uint16 0)
-||
-'0000' -- nBands (uint16 0)
-||
-'0000000000001440' -- scaleX (float64 5)
-||
-'0000000000001440' -- scaleY (float64 5)
-||
-'0000000000001E40' -- ipX (float64 2.5)
-||
-'0000000000000440' -- ipY (float64 2.5)
-||
-'0000000000000000' -- skewX (float64 0)
-||
-'0000000000000000' -- skewY (float64 0)
-||
-'FFFFFFFF' -- SRID (int32 -1)
-||
-'0100' -- width (uint16 1)
-||
-'0100' -- height (uint16 1)
-)::raster
-); 
diff --git a/raster/test/regress/create_rt_bytea_test_expected b/raster/test/regress/create_rt_bytea_test_expected
deleted file mode 100644 (file)
index e69de29..0000000
index 08458d13d11b391e877ea1adddcf0070213bce19..85aebaa60cb493404bbd4531c58cf3310efb02c5 100644 (file)
@@ -7,6 +7,128 @@
 -- the terms of the GNU General Public Licence. See the COPYING file.
 -----------------------------------------------------------------------
 
+CREATE TABLE rt_bytea_test (
+        id numeric,
+        name text,
+        rast raster
+    );
+
+INSERT INTO rt_bytea_test 
+VALUES ( 0, '10x20, ip:0.5,0.5 scale:2,3 skew:0,0 srid:10 width:10 height:20',
+(
+'01' -- little endian (uint8 ndr)
+|| 
+'0000' -- version (uint16 0)
+||
+'0000' -- nBands (uint16 0)
+||
+'0000000000000040' -- scaleX (float64 2)
+||
+'0000000000000840' -- scaleY (float64 3)
+||
+'000000000000E03F' -- ipX (float64 0.5)
+||
+'000000000000E03F' -- ipY (float64 0.5)
+||
+'0000000000000000' -- skewX (float64 0)
+||
+'0000000000000000' -- skewY (float64 0)
+||
+'0A000000' -- SRID (int32 10)
+||
+'0A00' -- width (uint16 10)
+||
+'1400' -- height (uint16 20)
+)::raster
+);
+
+INSERT INTO rt_bytea_test 
+VALUES ( 1, '1x1, ip:2.5,2.5 scale:5,5 skew:0,0, srid:1, width:1, height:1',
+(
+'01' -- little endian (uint8 ndr)
+|| 
+'0000' -- version (uint16 0)
+||
+'0000' -- nBands (uint16 0)
+||
+'0000000000001440' -- scaleX (float64 5)
+||
+'0000000000001440' -- scaleY (float64 5)
+||
+'0000000000000440' -- ipX (float64 2.5)
+||
+'0000000000000440' -- ipY (float64 2.5)
+||
+'0000000000000000' -- skewX (float64 0)
+||
+'0000000000000000' -- skewY (float64 0)
+||
+'0C000000' -- SRID (int32 12)
+||
+'0100' -- width (uint16 1)
+||
+'0100' -- height (uint16 1)
+)::raster
+);
+
+INSERT INTO rt_bytea_test 
+VALUES ( 2, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:0, width:1, height:1',
+(
+'01' -- little endian (uint8 ndr)
+|| 
+'0000' -- version (uint16 0)
+||
+'0000' -- nBands (uint16 0)
+||
+'0000000000001440' -- scaleX (float64 5)
+||
+'0000000000001440' -- scaleY (float64 5)
+||
+'0000000000001E40' -- ipX (float64 2.5)
+||
+'0000000000000440' -- ipY (float64 2.5)
+||
+'0000000000000000' -- skewX (float64 0)
+||
+'0000000000000000' -- skewY (float64 0)
+||
+'00000000' -- SRID (int32 0)
+||
+'0100' -- width (uint16 1)
+||
+'0100' -- height (uint16 1)
+)::raster
+);
+
+INSERT INTO rt_bytea_test 
+VALUES ( 3, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:-1, width:1, height:1',
+(
+'01' -- little endian (uint8 ndr)
+|| 
+'0000' -- version (uint16 0)
+||
+'0000' -- nBands (uint16 0)
+||
+'0000000000001440' -- scaleX (float64 5)
+||
+'0000000000001440' -- scaleY (float64 5)
+||
+'0000000000001E40' -- ipX (float64 2.5)
+||
+'0000000000000440' -- ipY (float64 2.5)
+||
+'0000000000000000' -- skewX (float64 0)
+||
+'0000000000000000' -- skewY (float64 0)
+||
+'FFFFFFFF' -- SRID (int32 -1)
+||
+'0100' -- width (uint16 1)
+||
+'0100' -- height (uint16 1)
+)::raster
+); 
+
 -----------------------------------------------------------------------
 --- Test HEX
 -----------------------------------------------------------------------
@@ -48,3 +170,6 @@ WHERE
     OR
     encode(st_asbinary(rast), 'base64') != encode(rast, 'base64')
     ;
+
+-- Cleanup
+DROP TABLE rt_bytea_test;