awtk/tests/fscripts/demo_array1.fs
2021-07-14 10:28:54 +08:00

12 lines
301 B
GLSL

a = array_create(1, 2, 3)
assert(array_push(a,"a","b","c") == 3)
assert(array_pop(a), "c")
assert(array_pop(a), "b")
assert(array_pop(a), "a")
assert(array_pop(a), "3")
assert(array_pop(a), "2")
assert(array_pop(a), "1")
assert(value_is_valid(array_pop(a)))
assert(array_clear(a))
assert(a.size == 0)