1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 22:28:16 +01:00

refactor testcase

This commit is contained in:
Justin Lin 2020-01-27 14:57:04 +08:00
parent b125336ae4
commit 1e97f09092

View File

@ -1,4 +1,14 @@
include <unittest.scad>;
include <hull_polyline2d.scad>;
module test_hull_polyline2d_line_segment(index, point1, point2, radius) {
points = [[1, 2], [-5, -4], [-5, 3], [5, 5]];
line_width = 1;
assertEqualPoint(points[index - 1], point1);
assertEqualPoint(points[index], point2);
assertEqualNum(line_width, radius * 2);
}
module test_hull_polyline2d() {
echo("==== test_hull_polyline2d ====");
@ -6,14 +16,6 @@ module test_hull_polyline2d() {
$fn = 4;
points = [[1, 2], [-5, -4], [-5, 3], [5, 5]];
line_width = 1;
include <hull_polyline2d.scad>;
module test_hull_polyline2d_line_segment(index, point1, point2, radius) {
assertEqualPoint(points[index - 1], point1);
assertEqualPoint(points[index], point2);
assertEqualNum(line_width, radius * 2);
}
hull_polyline2d(
points = [[1, 2], [-5, -4], [-5, 3], [5, 5]],