1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 04:51:26 +02:00
This commit is contained in:
Justin Lin
2021-03-05 20:07:27 +08:00
parent 6ded6738ff
commit f910849b07
13 changed files with 20 additions and 55 deletions

View File

@@ -1,5 +1,4 @@
use <util/dedup.scad>;
use <util/sort.scad>;
module test_dedup() {
echo("==== test_dedup ====");
@@ -16,16 +15,6 @@ module test_dedup() {
dedup([[1, 1, 2], [3, 4, 2], [7, 2, 2], [3, 4, 2], [1, 2, 3]], eq = eq)
== [[1, 1, 2], [3, 4, 2], [7, 2, 2], [1, 2, 3]]
);
sorted = sort([[1, 1, 2], [3, 4, 2], [7, 2, 2], [3, 4, 2], [1, 2, 3]]);
assert(
dedup(sorted, sorted = true) == [[1, 1, 2], [1, 2, 3], [3, 4, 2], [7, 2, 2]]
);
assert(
dedup(sorted, sorted = true, eq = eq) == [[1, 1, 2], [1, 2, 3], [3, 4, 2], [7, 2, 2]]
);
}
test_dedup();