/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/python/special_variable_macros_runme.py
28 строк
1 KB
William S Fulton
Add support for $n special variable expansion in the names of typemap local variables
19 фев 2025, 23:44
19 фев 2025, 23:44
26b0911
Код
Авторство
О чём код?
import special_variable_macros cvar = special_variable_macros.cvar name = special_variable_macros.Name() if special_variable_macros.testFred(name) != "none": raise "test failed" if cvar.accessed_examplekw != 0: raise "Precondition failed" if special_variable_macros.testJack(name) != "$specialname": raise "test failed" if cvar.accessed_examplekw != 1: raise "Postcondition failed" if special_variable_macros.testJill(name) != "jilly": raise "test failed" if special_variable_macros.testMary(name) != "SWIGTYPE_p_NameWrap": raise "test failed" if special_variable_macros.testJames(name) != "SWIGTYPE_Name": raise "test failed" if special_variable_macros.testJim(name) != "multiname num": raise "test failed" if special_variable_macros.testJohn(special_variable_macros.PairIntBool(10, False)) != 123: raise "test failed" if special_variable_macros.makeStringInt("stringint", 999) != "stringint": raise "test failed" if special_variable_macros.provideStringInt(999) != "1000": raise "test failed" if special_variable_macros.shortFunction(1, 1) != (200*2 + 200*3): raise "test failed"