| | 27 | -- Repeat all tests with new function names. |
| | 28 | -- Out of range indexes |
| | 29 | SELECT ST_SetPoint('LINESTRING(0 0, 1 1, 2 2)', 3, 'POINT(9 9)'); |
| | 30 | SELECT ST_SetPoint('LINESTRING(0 0, 1 1, 2 2)', -1, 'POINT(9 9)'); |
| | 31 | |
| | 32 | -- Invalid inputs |
| | 33 | SELECT ST_SetPoint('MULTIPOINT(0 0, 1 1, 2 2)', 3, 'POINT(9 9)'); |
| | 34 | SELECT ST_SetPoint('LINESTRING(0 0, 1 1, 2 2)', -1, 'MULTIPOINT(9 9, 0 0)'); |
| | 35 | |
| | 36 | -- Replacing 3dz line with 3dm point |
| | 37 | SELECT ST_asewkt(ST_SetPoint('LINESTRING(-1 -1 -1, 1 1 1, 2 2 2)', 0, 'POINT(90 91 92)')); |
| | 38 | |
| | 39 | -- Replacing 3dm line with 3dz point |
| | 40 | SELECT ST_asewkt(ST_SetPoint('LINESTRINGM(0 0 0, 1 1 1, 2 2 2)', 1, 'POINTM(90 91 92)')); |
| | 41 | |
| | 42 | -- Replacing 3dm line with 4d point |
| | 43 | SELECT ST_asewkt(ST_SetPoint('LINESTRINGM(0 0 0, 1 1 1, 2 2 2)', 2, 'POINT(90 91 92 93)')); |
| | 44 | |
| | 45 | -- Replacing 3dz line with 4d point |
| | 46 | SELECT ST_asewkt(ST_SetPoint('LINESTRING(0 0 0, 1 1 1, 2 2 2)', 1, 'POINT(90 91 92 93)')); |
| | 47 | |
| | 48 | -- Replacing 4d line with 2d/3dm/3dz/4d point |
| | 49 | SELECT ST_asewkt(ST_SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 3, 'POINT(90 91)')); |
| | 50 | SELECT ST_asewkt(ST_SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 2, 'POINT(90 91 92)')); |
| | 51 | SELECT ST_asewkt(ST_SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 1, 'POINTM(90 91 92)')); |
| | 52 | SELECT ST_asewkt(ST_SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 0, 'POINT(90 91 92 93)')); |
| | 53 | |