From 24a08960c79f052f3c60dc620df5a60c084e1c21 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sat, 6 Mar 2021 22:32:31 +0800 Subject: [PATCH] rename --- src/util/set/{hashset_list.scad => hashset_elems.scad} | 2 +- test/util/set/test_hashset.scad | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename src/util/set/{hashset_list.scad => hashset_elems.scad} (68%) diff --git a/src/util/set/hashset_list.scad b/src/util/set/hashset_elems.scad similarity index 68% rename from src/util/set/hashset_list.scad rename to src/util/set/hashset_elems.scad index 9baf73e8..191d1386 100644 --- a/src/util/set/hashset_list.scad +++ b/src/util/set/hashset_elems.scad @@ -1,4 +1,4 @@ -function hashset_list(set) = [ +function hashset_elems(set) = [ for(bucket = set) for(elem = bucket) elem diff --git a/test/util/set/test_hashset.scad b/test/util/set/test_hashset.scad index 34dc99d6..aa48664d 100644 --- a/test/util/set/test_hashset.scad +++ b/test/util/set/test_hashset.scad @@ -1,5 +1,5 @@ use ; -use ; +use ; use ; use ; use ; @@ -9,15 +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_elems(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_elems(s2) == [1, 2, 3, 4, 5, 9]); assert(!hashset_has(s2, 13)); - assert(hashset_list(hashset_del(s2, 2)) == [1, 3, 4, 5, 9]); + assert(hashset_elems(hashset_del(s2, 2)) == [1, 3, 4, 5, 9]); } test_hashset(); \ No newline at end of file