Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit05d1910

Browse files
committed
regression tests: remove polygon diagrams
The diagrams were inaccurate.Report by Emre Hasegeli
1 parent788e799 commit05d1910

File tree

2 files changed

+0
-126
lines changed

2 files changed

+0
-126
lines changed

‎src/test/regress/expected/polygon.out

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@
33
--
44
-- polygon logic
55
--
6-
-- 3 o
7-
-- |
8-
-- 2 + |
9-
-- / |
10-
-- 1 # +
11-
-- / o |
12-
-- 0 #-----o-+
13-
--
14-
-- 0 1 2 3 4
15-
--
166
CREATE TABLE POLYGON_TBL(f1 polygon);
177
INSERT INTO POLYGON_TBL(f1) VALUES ('(2.0,0.0),(2.0,4.0),(0.0,0.0)');
188
INSERT INTO POLYGON_TBL(f1) VALUES ('(3.0,1.0),(3.0,3.0),(1.0,0.0)');
@@ -128,17 +118,6 @@ SELECT '' AS one, p.*
128118
--
129119
-- polygon logic
130120
--
131-
-- 3 o
132-
-- /|
133-
-- 2 + |
134-
-- / |
135-
-- 1 / o +
136-
-- / |
137-
-- 0 +-----o-+
138-
--
139-
-- 0 1 2 3 4
140-
--
141-
--
142121
-- left of
143122
SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' << polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS false;
144123
false
@@ -181,53 +160,24 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' @> polygon '(3.0,1.0),(3.0,3.0),(
181160
f
182161
(1 row)
183162

184-
-- +------------------------+
185-
-- | *---* 1
186-
-- | + | |
187-
-- | 2 *---*
188-
-- +------------------------+
189-
-- 3
190-
-- endpoints '+' is ofr one polygon, '*' - for another
191-
-- Edges 1-2, 2-3 are not shown on picture
192163
SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "false";
193164
false
194165
-------
195166
f
196167
(1 row)
197168

198-
-- +-----------+
199-
-- | *---* /
200-
-- | | |/
201-
-- | | +
202-
-- | | |\
203-
-- | *---* \
204-
-- +-----------+
205169
SELECT '((0,4),(6,4),(3,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true";
206170
true
207171
------
208172
t
209173
(1 row)
210174

211-
-- +-----------------+
212-
-- | |
213-
-- | +---*---*-----+
214-
-- | | | |
215-
-- | +---*---*-----+
216-
-- | |
217-
-- +-----------------+
218175
SELECT '((1,1),(1,4),(5,4),(5,3),(2,3),(2,2),(5,2),(5,1))'::polygon @> '((3,2),(3,3),(4,3),(4,2))'::polygon AS "false";
219176
false
220177
-------
221178
f
222179
(1 row)
223180

224-
-- +---------+
225-
-- | |
226-
-- | *----*
227-
-- | | |
228-
-- | *----*
229-
-- | |
230-
-- +---------+
231181
SELECT '((0,0),(0,3),(3,3),(3,0))'::polygon @> '((2,1),(2,2),(3,2),(3,1))'::polygon AS "true";
232182
true
233183
------
@@ -248,25 +198,12 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' && polygon '(3.0,1.0),(3.0,3.0),(
248198
t
249199
(1 row)
250200

251-
-- +--------------------+
252-
-- | *---* 1
253-
-- | + | |
254-
-- | 2 *---*
255-
-- +--------------------+
256-
-- 3
257-
-- Edges 1-2, 2-3 are not shown on picture
258201
SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon && '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true";
259202
true
260203
------
261204
t
262205
(1 row)
263206

264-
-- +--+ *--*
265-
-- | | | |
266-
-- | | *--*
267-
-- | +----+
268-
-- | |
269-
-- +-------+
270207
SELECT '((1,4),(1,1),(4,1),(4,2),(2,2),(2,4),(1,4))'::polygon && '((3,3),(4,3),(4,4),(3,4),(3,3))'::polygon AS "false";
271208
false
272209
-------

‎src/test/regress/sql/polygon.sql

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@
33
--
44
-- polygon logic
55
--
6-
-- 3 o
7-
-- |
8-
-- 2 + |
9-
-- / |
10-
-- 1 # +
11-
-- / o |
12-
-- 0 #-----o-+
13-
--
14-
-- 0 1 2 3 4
15-
--
166

177
CREATETABLEPOLYGON_TBL(f1polygon);
188

@@ -83,17 +73,6 @@ SELECT '' AS one, p.*
8373
--
8474
-- polygon logic
8575
--
86-
-- 3 o
87-
-- /|
88-
-- 2 + |
89-
-- / |
90-
-- 1 / o +
91-
-- / |
92-
-- 0 +-----o-+
93-
--
94-
-- 0 1 2 3 4
95-
--
96-
--
9776
-- left of
9877
SELECTpolygon'(2.0,0.0),(2.0,4.0),(0.0,0.0)'<<polygon'(3.0,1.0),(3.0,3.0),(1.0,0.0)'AS false;
9978

@@ -112,41 +91,12 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' <@ polygon '(3.0,1.0),(3.0,3.0),(
11291
-- contains
11392
SELECTpolygon'(2.0,0.0),(2.0,4.0),(0.0,0.0)' @>polygon'(3.0,1.0),(3.0,3.0),(1.0,0.0)'AS false;
11493

115-
-- +------------------------+
116-
-- | *---* 1
117-
-- | + | |
118-
-- | 2 *---*
119-
-- +------------------------+
120-
-- 3
121-
-- endpoints '+' is ofr one polygon, '*' - for another
122-
-- Edges 1-2, 2-3 are not shown on picture
12394
SELECT'((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon @>'((2,1),(2,3),(3,3),(3,1))'::polygonAS"false";
12495

125-
-- +-----------+
126-
-- | *---* /
127-
-- | | |/
128-
-- | | +
129-
-- | | |\
130-
-- | *---* \
131-
-- +-----------+
13296
SELECT'((0,4),(6,4),(3,2),(6,0),(0,0))'::polygon @>'((2,1),(2,3),(3,3),(3,1))'::polygonAS"true";
13397

134-
-- +-----------------+
135-
-- | |
136-
-- | +---*---*-----+
137-
-- | | | |
138-
-- | +---*---*-----+
139-
-- | |
140-
-- +-----------------+
14198
SELECT'((1,1),(1,4),(5,4),(5,3),(2,3),(2,2),(5,2),(5,1))'::polygon @>'((3,2),(3,3),(4,3),(4,2))'::polygonAS"false";
14299

143-
-- +---------+
144-
-- | |
145-
-- | *----*
146-
-- | | |
147-
-- | *----*
148-
-- | |
149-
-- +---------+
150100
SELECT'((0,0),(0,3),(3,3),(3,0))'::polygon @>'((2,1),(2,2),(3,2),(3,1))'::polygonAS"true";
151101

152102
-- same
@@ -155,21 +105,8 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' ~= polygon '(3.0,1.0),(3.0,3.0),(
155105
-- overlap
156106
SELECTpolygon'(2.0,0.0),(2.0,4.0),(0.0,0.0)' &&polygon'(3.0,1.0),(3.0,3.0),(1.0,0.0)'AS true;
157107

158-
-- +--------------------+
159-
-- | *---* 1
160-
-- | + | |
161-
-- | 2 *---*
162-
-- +--------------------+
163-
-- 3
164-
-- Edges 1-2, 2-3 are not shown on picture
165108
SELECT'((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon &&'((2,1),(2,3),(3,3),(3,1))'::polygonAS"true";
166109

167-
-- +--+ *--*
168-
-- | | | |
169-
-- | | *--*
170-
-- | +----+
171-
-- | |
172-
-- +-------+
173110
SELECT'((1,4),(1,1),(4,1),(4,2),(2,2),(2,4),(1,4))'::polygon &&'((3,3),(4,3),(4,4),(3,4),(3,3))'::polygonAS"false";
174111
SELECT'((200,800),(800,800),(800,200),(200,200))' &&'(1000,1000,0,0)'::polygonAS"true";
175112

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp