[Tarantool-patches] [PATCH v2 luajit 19/26] test: enable <ffi_parse_basic.lua> in LuaJIT-tests
Maxim Kokryashkin
m.kokryashkin at tarantool.org
Thu Feb 1 12:03:10 MSK 2024
Hi, Sergey!
Thanks for the patch!
Please consider my comments below.
On Mon, Jan 29, 2024 at 01:45:19PM +0300, Sergey Kaplun wrote:
> This patch changes `dofile()` (which uses an unreliable relative file
> path and mutates `_G` with global functions to be defined) to the
> corresponding `require()` of the helper functions. It adds groups with
> the names of subtests and enables the test in <index>.
>
> Part of tarantool/tarantool#9398
> ---
> test/LuaJIT-tests/lib/ffi/ffi_parse_basic.lua | 251 +++++++++---------
> test/LuaJIT-tests/lib/ffi/index | 1 +
> 2 files changed, 132 insertions(+), 120 deletions(-)
>
> diff --git a/test/LuaJIT-tests/lib/ffi/ffi_parse_basic.lua b/test/LuaJIT-tests/lib/ffi/ffi_parse_basic.lua
> index c054bcfb..3b49648c 100644
> --- a/test/LuaJIT-tests/lib/ffi/ffi_parse_basic.lua
> +++ b/test/LuaJIT-tests/lib/ffi/ffi_parse_basic.lua
> @@ -1,131 +1,142 @@
> local ffi = require("ffi")
>
> -dofile("../common/ffi_util.inc")
> +local checkfail = require("common.ffi.checkfail")
> +local checktypes = require("common.ffi.checktypes")
>
> -checkfail{
> - "",
> - " ",
> - "\n",
> - "1",
> - ".",
> - ";",
> - ",",
> - "*",
> - "[]",
> - "()",
> - "(*)",
> - "//",
> - "/*",
> - "xyz",
> - "const",
> - "volatile",
> - "typedef",
> - "extern",
> - "static",
> - "auto",
> - "register",
> - "struct",
> - "union",
> - "sizeof",
> - "int int",
> - "int char",
> - "int double",
> - "int;",
> -}
> +do --- checkfail
I would prefer a more elaborate name here.
> + checkfail{
> + "",
> + " ",
> + "\n",
> + "1",
> + ".",
> + ";",
> + ",",
> + "*",
> + "[]",
> + "()",
> + "(*)",
> + "//",
> + "/*",
> + "xyz",
> + "const",
> + "volatile",
> + "typedef",
> + "extern",
> + "static",
> + "auto",
> + "register",
> + "struct",
> + "union",
> + "sizeof",
> + "int int",
> + "int char",
> + "int double",
> + "int;",
> + }
> +end
<snipped>
More information about the Tarantool-patches
mailing list