/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/java/cpp14_variable_templates_runme.java
23 строки
856 B
William S Fulton
Add cpp14_variable_templates testcase and document the support
10 май 2026, 19:37
10 май 2026, 19:37
2851c9b
Код
Авторство
О чём код?
import cpp14_variable_templates.*; public class cpp14_variable_templates_runme { static { try { System.loadLibrary("cpp14_variable_templates"); } catch (UnsatisfiedLinkError e) { System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e); System.exit(1); } } public static void main(String argv[]) { // Variable template instantiations are wrapped as read only variables holding the value if (cpp14_variable_templates.getBits_in_char() != 8) throw new RuntimeException("bits_in_char"); if (cpp14_variable_templates.getFactorial_5() != 120) throw new RuntimeException("factorial_5"); if (cpp14_variable_templates.getFactorial_10() != 3628800) throw new RuntimeException("factorial_10"); } }