mirror of
https://github.com/sagiegurari/duckscript
synced 2024-09-15 22:19:51 +00:00
36 lines
622 B
Plaintext
36 lines
622 B
Plaintext
|
|
fn test_size_empty
|
|
handle = map
|
|
|
|
result = map_is_empty ${handle}
|
|
assert ${result}
|
|
|
|
release ${handle}
|
|
end
|
|
|
|
fn test_size_emptied
|
|
handle = map
|
|
|
|
result = map_put ${handle} key value
|
|
assert_eq ${result} true
|
|
map_remove ${handle} key
|
|
|
|
result = map_is_empty ${handle}
|
|
assert ${result}
|
|
release ${handle}
|
|
end
|
|
|
|
fn test_size_not_empty
|
|
handle = map
|
|
|
|
result = map_put ${handle} a 1
|
|
result = map_put ${handle} b 2
|
|
result = map_put ${handle} c 3
|
|
result = map_put ${handle} a 4
|
|
|
|
result = map_is_empty ${handle}
|
|
assert_false ${result}
|
|
|
|
release ${handle}
|
|
end
|