/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/lua/smart_pointer_extend_runme.lua
28 строк
522 B
Erez Geva
Remove Lua 5.0 and Lua 5.1 and Lua options
30 май 2026, 19:24
30 май 2026, 19:24
74ff929
Код
Авторство
О чём код?
spe=require("smart_pointer_extend") catch_undef_globs() -- catch "undefined" global variables assert(spe.CBase.hello() == 1) assert(spe.CBase.z == 1) base1 = spe.CBase() base1.x = 7 p1 = spe.CPtr() assert(spe.get_hello(p1) == 1) assert(p1:foo() == 1) assert(p1:bar() == 2) assert(p1:boo(5) == 5) foo = spe.Foo() bar = spe.Bar(foo) assert(bar:extension(5,7) == 5) assert(bar:extension(7) == 7) assert(bar:extension() == 1) dfoo = spe.DFoo() dptr = spe.DPtrFoo(dfoo) assert(dptr:Ext() == 2) assert(dptr:Ext(5) == 5)