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

Commit337f73b

Browse files
committed
Revise geometry regression testing to eliminate most cross-platform
variation. To do this, set extra_float_digits to -3 in the geometrytest, and tweak the CIRCLE_TBL dataset to avoid values that sufferfrom severe cancellation error (eg, circles that just touch an axis).We still need two geometry 'expected' files to account for thedifference between platforms that display minus zero as '-0' and thosethat just say '0', but with luck that's all we'll need.
1 parentb26dfbb commit337f73b

19 files changed

+199
-7128
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
-- CIRCLE
33
--
44
CREATE TABLE CIRCLE_TBL (f1 circle);
5-
INSERT INTO CIRCLE_TBL VALUES ('<(0,0),3>');
5+
INSERT INTO CIRCLE_TBL VALUES ('<(5,1),3>');
66
INSERT INTO CIRCLE_TBL VALUES ('<(1,2),100>');
77
INSERT INTO CIRCLE_TBL VALUES ('1,3,5');
88
INSERT INTO CIRCLE_TBL VALUES ('((1,2),3)');
99
INSERT INTO CIRCLE_TBL VALUES ('<(100,200),10>');
10-
INSERT INTO CIRCLE_TBL VALUES ('<(100,0),100>');
10+
INSERT INTO CIRCLE_TBL VALUES ('<(100,1),115>');
1111
-- bad values
1212
INSERT INTO CIRCLE_TBL VALUES ('<(-100,0),-100>');
1313
ERROR: Bad circle external representation '<(-100,0),-100>'
@@ -18,24 +18,24 @@ ERROR: Bad circle external representation '(3,(1,2),3)'
1818
SELECT * FROM CIRCLE_TBL;
1919
f1
2020
----------------
21-
<(0,0),3>
21+
<(5,1),3>
2222
<(1,2),100>
2323
<(1,3),5>
2424
<(1,2),3>
2525
<(100,200),10>
26-
<(100,0),100>
26+
<(100,1),115>
2727
(6 rows)
2828

2929
SELECT '' AS six, center(f1) AS center
3030
FROM CIRCLE_TBL;
3131
six | center
3232
-----+-----------
33-
| (0,0)
33+
| (5,1)
3434
| (1,2)
3535
| (1,3)
3636
| (1,2)
3737
| (100,200)
38-
| (100,0)
38+
| (100,1)
3939
(6 rows)
4040

4141
SELECT '' AS six, radius(f1) AS radius
@@ -47,7 +47,7 @@ SELECT '' AS six, radius(f1) AS radius
4747
| 5
4848
| 3
4949
| 10
50-
|100
50+
|115
5151
(6 rows)
5252

5353
SELECT '' AS six, diameter(f1) AS diameter
@@ -59,13 +59,13 @@ SELECT '' AS six, diameter(f1) AS diameter
5959
| 10
6060
| 6
6161
| 20
62-
|200
62+
|230
6363
(6 rows)
6464

6565
SELECT '' AS two, f1 FROM CIRCLE_TBL WHERE radius(f1) < 5;
6666
two | f1
6767
-----+-----------
68-
| <(0,0),3>
68+
| <(5,1),3>
6969
| <(1,2),3>
7070
(2 rows)
7171

@@ -75,7 +75,7 @@ SELECT '' AS four, f1 FROM CIRCLE_TBL WHERE diameter(f1) >= 10;
7575
| <(1,2),100>
7676
| <(1,3),5>
7777
| <(100,200),10>
78-
| <(100,0),100>
78+
| <(100,1),115>
7979
(4 rows)
8080

8181
SELECT '' as five, c1.f1 AS one, c2.f1 AS two, (c1.f1 <-> c2.f1) AS distance
@@ -84,10 +84,10 @@ SELECT '' as five, c1.f1 AS one, c2.f1 AS two, (c1.f1 <-> c2.f1) AS distance
8484
ORDER BY distance, one, two;
8585
five | one | two | distance
8686
------+----------------+----------------+------------------
87-
| <(100,200),10> | <(100,0),100> |90
87+
| <(100,200),10> | <(100,1),115> |74
8888
| <(100,200),10> | <(1,2),100> | 111.370729772479
8989
| <(1,3),5> | <(100,200),10> | 205.476756144497
90+
| <(5,1),3> | <(100,200),10> | 207.51303816328
9091
| <(1,2),3> | <(100,200),10> | 208.370729772479
91-
| <(0,0),3> | <(100,200),10> | 210.606797749979
9292
(5 rows)
9393

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp