unittests: Add tv_dict_item_{add,remove} tests

This commit is contained in:
ZyX
2017-03-05 01:26:26 +03:00
parent ffaf7c7521
commit 6c622ed08b
2 changed files with 40 additions and 13 deletions

View File

@@ -416,7 +416,10 @@ local alloc_logging_helpers = {
-- lua_…: allocated by this file, not by some Neovim function
lua_pt = function(pt) return {func='calloc', args={1, ffi.sizeof('partial_T')}, ret=void(pt)} end,
lua_tvs = function(argv, argc) return {func='malloc', args={ffi.sizeof('typval_T')*argc}, ret=void(argv)} end,
lua_tvs = function(argv, argc)
argc = alloc_len(argc)
return {func='malloc', args={ffi.sizeof('typval_T')*argc}, ret=void(argv)}
end,
}
local function int(n)
@@ -430,7 +433,7 @@ end
local function dict(d)
return populate_dict(ffi.gc(eval.tv_dict_alloc(), eval.tv_dict_free),
d, {})
d or {}, {})
end
local callback2tbl_type_tab = nil