[Tarantool-patches] [PATCH 2/2] test: add regression test for table.clear()

Alexander Turenko alexander.turenko at tarantool.org
Tue Jul 28 19:41:30 MSK 2020


> --- /dev/null
> +++ b/test/box-tap/gh-5210-table-clear.test.lua

I would place it into app-tap, because it is not related to box.

> +t = {a = 1, b = 2}

I would use 'local' here.

> +test:is(table.clear(t), nil, 'table clear')

I would check that the table is cleared: say, using `next(t)`. It must
return `nil` for an empty table.

WBR, Alexander Turenko.


More information about the Tarantool-patches mailing list