/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/java/cpp11_lambda_functions_runme.java
28 строк
936 B
William S Fulton
Rename all C++0x to C++11 and cpp0x to cpp11
07 окт 2013, 23:37
07 окт 2013, 23:37
738cc36
Код
Авторство
О чём код?
import cpp11_lambda_functions.*; public class cpp11_lambda_functions_runme { static { try { System.loadLibrary("cpp11_lambda_functions"); } 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); } } private static void check(int received, int expected) { if (expected != received) throw new RuntimeException("check failed, expected: " + expected + " received: " + received); } public static void main(String argv[]) { check(cpp11_lambda_functions.runLambda1(), 11); check(cpp11_lambda_functions.runLambda2(), 11); check(cpp11_lambda_functions.runLambda3(), 11); check(cpp11_lambda_functions.runLambda4(), 11); check(cpp11_lambda_functions.runLambda5(), 1); check(cpp11_lambda_functions.runLambda5(), 2); } }