/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/lua/li_std_except_runme.lua
15 строк
824 B
Erez Geva
Improve Lua test syntax (#3463)
02 июн 2026, 01:23
Не верифицирован
02 июн 2026, 01:23
d483ae4
Код
Авторство
О чём код?
require("li_std_except") test = li_std_except.Test() -- under lua, all the std::exceptions are just turned to strings, so we are only checking that is fails assert(not pcall(function() test:throw_bad_exception() end)) assert(not pcall(function() test:throw_domain_error() end)) assert(not pcall(function() test:throw_exception() end)) assert(not pcall(function() test:throw_invalid_argument() end)) assert(not pcall(function() test:throw_length_error() end)) assert(not pcall(function() test:throw_logic_error() end)) assert(not pcall(function() test:throw_out_of_range() end)) assert(not pcall(function() test:throw_overflow_error() end)) assert(not pcall(function() test:throw_range_error() end)) assert(not pcall(function() test:throw_runtime_error() end)) assert(not pcall(function() test:throw_underflow_error() end))