mirror of
https://github.com/sagiegurari/duckscript
synced 2024-09-15 22:19:51 +00:00
30 lines
478 B
Plaintext
30 lines
478 B
Plaintext
|
|
fn clear_not_empty
|
|
handle = map
|
|
|
|
result = map_put ${handle} a 1
|
|
|
|
result = map_is_empty ${handle}
|
|
assert_false ${result}
|
|
|
|
result map_clear ${handle}
|
|
assert ${result}
|
|
|
|
result = map_is_empty ${handle}
|
|
assert ${result}
|
|
|
|
release ${handle}
|
|
end
|
|
|
|
fn clear_empty
|
|
handle = map
|
|
|
|
result map_clear ${handle}
|
|
assert ${result}
|
|
|
|
result = map_is_empty ${handle}
|
|
assert ${result}
|
|
|
|
release ${handle}
|
|
end
|