/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/java/kwargs_feature_runme.java
23 строки
723 B
William S Fulton
The kwargs feature no longer turns on compactdefaultargs for languages that don't support kwargs.
21 окт 2014, 10:34
21 окт 2014, 10:34
bfde148
Код
Авторство
О чём код?
import kwargs_feature.*; public class kwargs_feature_runme { static { try { System.loadLibrary("kwargs_feature"); } 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[]) { // Check normal overloading still works (no compactdefaultargs) if the kwargs feature is used, // as the kwargs feature is not supported Foo f = new Foo(99); if (f.foo() != 1) throw new RuntimeException("It went wrong"); if (Foo.statfoo(2) != 2) throw new RuntimeException("It went wrong"); } }