Changeset: 5eb02d6ca631 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5eb02d6ca631
Added Files:
geom/sql/functions/Tests/ST_MakeBox2D.SQL.py
Removed Files:
geom/sql/functions/Tests/ST_MakeBox2D.test
Branch: mtest
Log Message:
convert geom/sql/functions/Tests/ST_MakeBox2D
diffs (106 lines):
diff --git a/geom/sql/functions/Tests/ST_MakeBox2D.SQL.py
b/geom/sql/functions/Tests/ST_MakeBox2D.SQL.py
new file mode 100644
--- /dev/null
+++ b/geom/sql/functions/Tests/ST_MakeBox2D.SQL.py
@@ -0,0 +1,9 @@
+from MonetDBtesting.sqltest import SQLTestCase
+
+with SQLTestCase() as tc:
+ # optional or default connection
+ tc.connect()
+ with open('ST_MakeBox2D.sql') as f:
+ tc.execute(query=None, client='mclient', stdin=f)\
+ .assertMatchStableOut(fout='ST_MakeBox2D.stable.out',
ignore_headers=True)\
+ .assertMatchStableError(ferr='ST_MakeBox2D.stable.err')
diff --git a/geom/sql/functions/Tests/ST_MakeBox2D.test
b/geom/sql/functions/Tests/ST_MakeBox2D.test
deleted file mode 100644
--- a/geom/sql/functions/Tests/ST_MakeBox2D.test
+++ /dev/null
@@ -1,87 +0,0 @@
-query T nosort
-select ST_MakeBox2D(ST_Point(-989502.1875, 528439.5625), ST_Point(-987121.375
,529933.1875))
-----
-BOX (-989502.187500 528439.562500, -987121.375000 529933.187500)
-
-query T rowsort
-select ST_MakeBox2D(ST_Point(-989502.1875, 528439.5625), null)
-----
-NULL
-
-statement error
-select ST_MakeBox2D(ST_PointFromText('POINT(-989502.1875 528439.5625)'),
ST_GeomFromText('linestring(-987121.375 529933.1875, 0 0)'))
-
-statement ok
-CREATE TABLE t(geom GEOMETRY(POINT))
-
-statement ok
-INSERT INTO t VALUES(ST_Point(10, 20)), (ST_Point(30, 40)), (ST_Point(50,
60)), (ST_Point(70, 80))
-
-query TT nosort
-SELECT geom AS "P", ST_MakeBox2D(geom, ST_Point(90, 90)) AS "BOX2D" FROM t
-----
-POINT (10 20)
-BOX (10.000000 20.000000, 90.000000 90.000000)
-POINT (30 40)
-BOX (30.000000 40.000000, 90.000000 90.000000)
-POINT (50 60)
-BOX (50.000000 60.000000, 90.000000 90.000000)
-POINT (70 80)
-BOX (70.000000 80.000000, 90.000000 90.000000)
-
-query TTT nosort
-SELECT g1.geom AS "P1", g2.geom AS "P2", ST_MakeBox2D(g1.geom, g2.geom) AS
"BOX2D" FROM t g1, t g2
-----
-POINT (10 20)
-POINT (10 20)
-BOX (10.000000 20.000000, 10.000000 20.000000)
-POINT (10 20)
-POINT (30 40)
-BOX (10.000000 20.000000, 30.000000 40.000000)
-POINT (10 20)
-POINT (50 60)
-BOX (10.000000 20.000000, 50.000000 60.000000)
-POINT (10 20)
-POINT (70 80)
-BOX (10.000000 20.000000, 70.000000 80.000000)
-POINT (30 40)
-POINT (10 20)
-BOX (10.000000 20.000000, 30.000000 40.000000)
-POINT (30 40)
-POINT (30 40)
-BOX (30.000000 40.000000, 30.000000 40.000000)
-POINT (30 40)
-POINT (50 60)
-BOX (30.000000 40.000000, 50.000000 60.000000)
-POINT (30 40)
-POINT (70 80)
-BOX (30.000000 40.000000, 70.000000 80.000000)
-POINT (50 60)
-POINT (10 20)
-BOX (10.000000 20.000000, 50.000000 60.000000)
-POINT (50 60)
-POINT (30 40)
-BOX (30.000000 40.000000, 50.000000 60.000000)
-POINT (50 60)
-POINT (50 60)
-BOX (50.000000 60.000000, 50.000000 60.000000)
-POINT (50 60)
-POINT (70 80)
-BOX (50.000000 60.000000, 70.000000 80.000000)
-POINT (70 80)
-POINT (10 20)
-BOX (10.000000 20.000000, 70.000000 80.000000)
-POINT (70 80)
-POINT (30 40)
-BOX (30.000000 40.000000, 70.000000 80.000000)
-POINT (70 80)
-POINT (50 60)
-BOX (50.000000 60.000000, 70.000000 80.000000)
-POINT (70 80)
-POINT (70 80)
-BOX (70.000000 80.000000, 70.000000 80.000000)
-
-statement ok
-DROP TABLE t
-
-
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list