1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-22 22:35:18 +02:00

refactor: use hashset

This commit is contained in:
Justin Lin
2022-04-15 08:51:52 +08:00
parent 4c3dca538d
commit a6a2b9d3f5
3 changed files with 19 additions and 14 deletions

View File

@@ -4,8 +4,9 @@ use <voxel/vx_contour.scad>;
module test_vx_contour() {
echo("==== test_vx_contour ====");
expected = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [7, 1], [7, 2], [7, 3], [7, 4], [7, 5], [7, 6], [7, 7], [6, 7], [5, 7], [4, 7], [4, 6], [4, 5], [3, 5], [2, 5], [1, 5], [1, 4], [0, 4], [0, 3], [0, 2], [0, 1], [1, 1]];
expected = [[0, 1], [1, 1], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [7, 1], [7, 2], [7, 3], [7, 4], [7, 5], [7, 6], [7, 7], [6, 7], [5, 7], [4, 7], [4, 6], [4, 5], [3, 5], [2, 5], [1, 5], [1, 4], [0, 4], [0, 3], [0, 2]];
actual = vx_contour(vx_ascii("d"));
assert(expected == actual);
}