diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
commit | ff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch) | |
tree | 729bbcb92231538fa61dab6c3d890b025484b7f5 /test/unit/api | |
parent | 376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff) | |
parent | 28c04948a1c887a1cc0cb64de79fa32631700466 (diff) | |
download | rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2 rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/unit/api')
-rw-r--r-- | test/unit/api/private_helpers_spec.lua | 42 | ||||
-rw-r--r-- | test/unit/api/testutil.lua (renamed from test/unit/api/helpers.lua) | 31 |
2 files changed, 35 insertions, 38 deletions
diff --git a/test/unit/api/private_helpers_spec.lua b/test/unit/api/private_helpers_spec.lua index 9843bd5c9e..a31374bd70 100644 --- a/test/unit/api/private_helpers_spec.lua +++ b/test/unit/api/private_helpers_spec.lua @@ -1,24 +1,24 @@ -local helpers = require('test.unit.helpers')(after_each) -local itp = helpers.gen_itp(it) -local eval_helpers = require('test.unit.eval.helpers') -local api_helpers = require('test.unit.api.helpers') - -local cimport = helpers.cimport -local NULL = helpers.NULL -local eq = helpers.eq - -local lua2typvalt = eval_helpers.lua2typvalt -local typvalt2lua = eval_helpers.typvalt2lua -local typvalt = eval_helpers.typvalt - -local nil_value = api_helpers.nil_value -local list_type = api_helpers.list_type -local int_type = api_helpers.int_type -local type_key = api_helpers.type_key -local obj2lua = api_helpers.obj2lua -local func_type = api_helpers.func_type - -local api = cimport('./src/nvim/api/private/helpers.h', './src/nvim/api/private/converter.h') +local t = require('test.unit.testutil') +local itp = t.gen_itp(it) +local t_eval = require('test.unit.eval.testutil') +local api_t = require('test.unit.api.testutil') + +local cimport = t.cimport +local NULL = t.NULL +local eq = t.eq + +local lua2typvalt = t_eval.lua2typvalt +local typvalt2lua = t_eval.typvalt2lua +local typvalt = t_eval.typvalt + +local nil_value = api_t.nil_value +local list_type = api_t.list_type +local int_type = api_t.int_type +local type_key = api_t.type_key +local obj2lua = api_t.obj2lua +local func_type = api_t.func_type + +local api = cimport('./src/nvim/api/private/t.h', './src/nvim/api/private/converter.h') describe('vim_to_object', function() local vim_to_object = function(l) diff --git a/test/unit/api/helpers.lua b/test/unit/api/testutil.lua index 23c5db43f7..0946ef194c 100644 --- a/test/unit/api/helpers.lua +++ b/test/unit/api/testutil.lua @@ -1,23 +1,20 @@ -local helpers = require('test.unit.helpers')(nil) -local eval_helpers = require('test.unit.eval.helpers') +local t = require('test.unit.testutil') +local t_eval = require('test.unit.eval.testutil') -local cimport = helpers.cimport -local to_cstr = helpers.to_cstr -local ffi = helpers.ffi +local cimport = t.cimport +local to_cstr = t.to_cstr +local ffi = t.ffi -local list_type = eval_helpers.list_type -local dict_type = eval_helpers.dict_type -local func_type = eval_helpers.func_type -local nil_value = eval_helpers.nil_value -local int_type = eval_helpers.int_type -local flt_type = eval_helpers.flt_type -local type_key = eval_helpers.type_key +local list_type = t_eval.list_type +local dict_type = t_eval.dict_type +local func_type = t_eval.func_type +local nil_value = t_eval.nil_value +local int_type = t_eval.int_type +local flt_type = t_eval.flt_type +local type_key = t_eval.type_key -local api = cimport( - './src/nvim/api/private/defs.h', - './src/nvim/api/private/helpers.h', - './src/nvim/memory.h' -) +local api = + cimport('./src/nvim/api/private/defs.h', './src/nvim/api/private/t.h', './src/nvim/memory.h') local obj2lua |