/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/lua/extend_placement_runme.lua
30 строк
620 B
Erez Geva
Remove Lua 5.0 and Lua 5.1 and Lua options
30 май 2026, 19:24
30 май 2026, 19:24
74ff929
Код
Авторство
О чём код?
ep=require("extend_placement") catch_undef_globs() -- catch "undefined" global variables function test_obj(main, suppl) assert(main:spam() == 1) assert(main:spam("this_is_string") == 2) assert(main:spam(5) == 5) assert(main:spam(5,6) == 11) assert(main:spam(7,8,9) == 15) assert(main:spam(suppl,12.0) == 0) assert(main:spam(suppl) == 0) end foo1 = ep.Foo(0) foo2 = ep.Foo(1,2) foo3 = ep.Foo() test_obj(foo1,foo2) bar1 = ep.Bar() bar2 = ep.Bar(5) test_obj(bar1,bar2) fti1 = ep.FooTi(0) fti2 = ep.FooTi(1,2) fti3 = ep.FooTi() test_obj(fti1,foo1) bti1 = ep.BarTi() bti2 = ep.BarTi(5) test_obj(bti1,bar1)