duckscript/test/std/collections/map_clear_test.ds
2020-02-01 14:22:11 +00:00

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