3 ---@diagnostic disable: redefined-local
4 package
.path
= arg
[0]:sub(0, -arg
[0]:match("([^/\\]*)$"):len() - 1) .. "?.lua;" .. package
.path
5 local test
= require("test")
6 local a
= require("liba")
7 test
.dir(getmetatable(a
.tf
))
9 local num
= { 6.59492796e-05, 6.54019884e-05 }
10 local den
= { -1.97530991, 0.97530991 }
12 local ctx
= a
.tf
.new(num
, den
)
13 test
.dir(getmetatable(ctx
))
14 assert(type(a
.tf
.iter(ctx
, 1)) == "number")
15 assert(type(a
.tf
.zero(ctx
)) == "userdata")
16 assert(type(ctx
.iter(ctx
, 1)) == "number")
17 assert(type(ctx
.zero(ctx
)) == "userdata")
18 assert(type(ctx
:iter(1)) == "number")
19 assert(type(ctx
:zero()) == "userdata")
25 assert(type(ctx
.num
) == "table")
27 assert(type(ctx
.den
) == "table")
35 assert(ctx
.__newindex
)
37 ---@field __name string
38 ---@field __call function
39 ---@field __index table
40 ---@field __newindex table