commit 6970081fbdfe51511ccf0ceb499a6e14dc7507c7
parent efaad32a88ee0b8c4d239117cc6d871e3abd0507
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Wed, 1 Mar 2023 15:40:23 +0100
Remove an offset test that causes problems
Diffstat:
1 file changed, 1 insertion(+), 71 deletions(-)
diff --git a/src/test_scpr_offset.c b/src/test_scpr_offset.c
@@ -47,68 +47,10 @@ test_single(void)
1.0, 1000000000000, /* To be replaced */
0.0, 1.0
};
- double coords3[112] = {
- 1454.65, 1289.72,
- 1455.91, 1303.38,
- 1449.01, 1304.09,
- 1449.82, 1316.24,
- 1450.17, 1321.71,
- 1447.09, 1322.02,
- 1447.46, 1327.61,
- 1447.90, 1333.96,
- 1448.08, 1336.94,
- 1448.34, 1341.45,
- 1449.84, 1364.03,
- 1450.32, 1371.41,
- 1450.68, 1376.57,
- 1450.96, 1381.84,
- 1451.19, 1385.23,
- 1451.32, 1387.00,
- 1457.16, 1386.79,
- 1456.88, 1381.42,
- 1464.75, 1380.91,
- 1464.39, 1375.95,
- 1467.66, 1375.64,
- 1470.14, 1375.43,
- 1470.05, 1372.20,
- 1467.48, 1372.41,
- 1467.30, 1370.27,
- 1467.48, 1370.27,
- 1465.33, 1340.27,
- 1478.67, 1339.29,
- 1478.40, 1337.46,
- 1472.30, 1337.88,
- 1472.22, 1337.17,
- 1469.30, 1337.38,
- 1469.11, 1335.14,
- 1454.35, 1336.08,
- 1454.17, 1333.45,
- 1459.21, 1333.14,
- 1460.72, 1333.03,
- 1460.45, 1330.30,
- 1458.94, 1330.40,
- 1458.50, 1324.54,
- 1460.17, 1324.33,
- 1459.91, 1320.99,
- 1461.94, 1320.78,
- 1461.66, 1315.12,
- 1461.48, 1312.48,
- 1460.34, 1312.59,
- 1459.17, 1298.72,
- 1525.39, 1290.04,
- 1528.51, 1314.63,
- 1543.99, 1312.59,
- 1540.24, 1281.82,
- 1528.96, 1283.36,
- 1524.59, 1283.96,
- 1524.86, 1286.19,
- 1522.73, 1286.50,
- 1521.85, 1280.52
- };
double** coords;
double range[2];
size_t nverts[] = { 4 };
- size_t count, ncomps = 1;
+ size_t ncomps = 1;
struct mem_allocator allocator;
struct polygon_context ctx;
struct scpr_polygon* polygon;
@@ -206,18 +148,6 @@ test_single(void)
/* Check out of range after offset being detected */
BAD(scpr_offset_polygon(polygon, 1, SCPR_JOIN_MITER));
- /* Check a polygon that used to produce a wrong result */
- ctx.nverts[0] = 56;
- coords[0] = (double*)MEM_REALLOC(&allocator, coords[0], nverts[0]*2*sizeof(**coords));
- memcpy(*coords, coords3, 2 * ctx.nverts[0] * sizeof(**coords));
- OK(scpr_polygon_setup_indexed_vertices(polygon, ncomps, pget_nverts, pget_pos, &ctx));
- OK(scpr_offset_polygon(polygon, -0.2, SCPR_JOIN_MITER));
- OK(scpr_polygon_get_components_count(polygon, &count));
- CHK(count == 1);
- OK(scpr_polygon_get_vertices_count(polygon, 0, &count));
- /* Vertice count should remain unchanged */
- CHK(count == ctx.nverts[0]);
-
/* Cleanup */
OK(scpr_polygon_ref_put(polygon));
OK(scpr_device_ref_put(dev));