1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-30 09:49:59 +02:00

change dir

This commit is contained in:
Justin Lin
2021-03-06 15:58:56 +08:00
parent 5c4c0b1e08
commit 2b2beb873e
20 changed files with 41 additions and 40 deletions

View File

@@ -0,0 +1,23 @@
use <util/set/hashset.scad>;
use <util/set/hashset_list.scad>;
use <util/set/hashset_add.scad>;
use <util/set/hashset_del.scad>;
use <util/set/hashset_has.scad>;
use <util/set/hashset_len.scad>;
module test_hashset() {
echo("==== test_hashset ====");
s = hashset([1, 2, 3, 4, 5, 2, 3, 5]);
assert(hashset_list(s) == [1, 2, 3, 4, 5]);
assert(hashset_len(s) == 5);
s2 = hashset_add(s, 9);
assert(hashset_list(s2) == [1, 2, 3, 4, 5, 9]);
assert(!hashset_has(s2, 13));
assert(hashset_list(hashset_del(s2, 2)) == [1, 3, 4, 5, 9]);
}
test_hashset();