swig/Examples/test-suite/lua/ret_by_value_runme.lua
2005-08-15 20:58:56 +00:00

9 lines
289 B
Lua

require("import") -- the import fn
import("ret_by_value") -- import code
-- catch "undefined" global variables
setmetatable(getfenv(),{__index=function (t,i) error("undefined global variable `"..i.."'",2) end})
a = ret_by_value.get_test()
assert(a.myInt == 100)
assert(a.myShort == 200)