duckscript/test/std/collections/set_put_test.ds
2020-05-06 07:42:26 +00:00

21 lines
370 B
Plaintext

fn test_set_with_data
handle = set_new a
counter = range 1 4
for index in ${counter}
set_put ${handle} ${index}
end
size = set_size ${handle}
assert_eq ${size} 4
result = set_remove ${handle} 1
assert ${result}
size = set_size ${handle}
assert_eq ${size} 3
released = release ${handle}
assert ${released}
end