/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/lua/cpp_namespace_runme.lua
20 строк
424 B
Erez Geva
Remove Lua 5.0 and Lua 5.1 and Lua options
30 май 2026, 19:24
30 май 2026, 19:24
74ff929
Код
Авторство
О чём код?
cn=require("cpp_namespace") catch_undef_globs() -- catch "undefined" global variables assert(cn.fact(4) == 24) assert(cn.Foo == 42) t1 = cn.Test() assert(t1:method() == "Test::method") cn.weird("t1", 4) assert(cn.do_method(t1) == "Test::method") assert(cn.do_method2(t1) == "Test::method") t2 = cn.Test2() assert(t2:method() == "Test2::method") assert(cn.foo3(5) == 5) assert(cn.do_method3(t2, 7) == "Test2::method")