/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/lua/smart_pointer_not_runme.lua
18 строк
509 B
Erez Geva
Remove Lua 5.0 and Lua 5.1 and Lua options
30 май 2026, 19:24
30 май 2026, 19:24
74ff929
Код
Авторство
О чём код?
spn=require("smart_pointer_not") catch_undef_globs() -- catch "undefined" global variables foo = spn.Foo() foo.x = 7 assert(foo:getx() == 7) bar = spn.Bar(foo) success = pcall(bar.getx, bar) -- Bar is not a smart pointer. Call should fail assert(not success) spam = spn.Spam(foo) success = pcall(spam.getx, spam) -- Spam is not a smart pointer. Call should fail assert(not success) grok = spn.Grok(foo) success = pcall(grok.getx, grok) -- Spam is not a smart pointer. Call should fail assert(not success)