1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-31 02:10:28 +02:00
This commit is contained in:
Justin Lin
2021-03-06 15:42:25 +08:00
parent 19a02d8f2b
commit 7158cb36fa
4 changed files with 11 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
use <unittest.scad>;
use <collection/hashmap.scad>;
use <collection/hashmap_list.scad>;
use <collection/hashmap_add.scad>;
use <collection/hashmap_put.scad>;
use <collection/hashmap_len.scad>;
use <collection/hashmap_del.scad>;
use <collection/hashmap_get.scad>;
@@ -20,10 +20,10 @@ module test_hashmap() {
assert(hashmap_list(s) == [["k9876", 3], ["k4444", 3], ["k1234", 1], ["k5678", 2]]);
s2 = hashmap_add(s, "k1357", 100);
s2 = hashmap_put(s, "k1357", 100);
assert(hashmap_list(s2) == [["k9876", 3], ["k4444", 3], ["k1234", 1], ["k5678", 2], ["k1357", 100]]);
s3 = hashmap_add(s2, "k5678", 200);
s3 = hashmap_put(s2, "k5678", 200);
assert(hashmap_list(s3) == [["k9876", 3], ["k4444", 3], ["k1234", 1], ["k5678", 200], ["k1357", 100]]);
s4 = hashmap_del(s3, "k4444");