mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 17:24:20 +02:00
update test
This commit is contained in:
@@ -9,14 +9,15 @@ 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_list(s) == [3, 1, 4, 2, 5]);
|
||||
|
||||
s2 = hashset_add(s, 9);
|
||||
assert(hashset_list(s2) == [1, 9, 2, 3, 4, 5]);
|
||||
assert(hashset_list(s2) == [3, 9, 1, 4, 2, 5]);
|
||||
|
||||
assert(!hashset_has(s2, 13));
|
||||
|
||||
assert(hashset_list(hashset_del(s2, 2)) == [1, 9, 3, 4, 5]);
|
||||
|
||||
assert(hashset_list(hashset_del(s2, 2)) == [3, 9, 1, 4, 5]);
|
||||
}
|
||||
|
||||
test_hashset();
|
@@ -80,3 +80,6 @@ include <voxel/test_vx_circle.scad>;
|
||||
include <voxel/test_vx_cylinder.scad>;
|
||||
include <voxel/test_vx_sphere.scad>;
|
||||
include <voxel/test_vx_polygon.scad>;
|
||||
|
||||
// Collection
|
||||
include <collection/test_hashset.scad>;
|
||||
|
Reference in New Issue
Block a user