/trunk/Examples/test-suite/java/typemap_arrays_runme.java

# · Java · 19 lines · 15 code · 4 blank · 0 comment · 2 complexity · d12cb0802786e84e16444455f18f8df1 MD5 · raw file

  1. import typemap_arrays.*;
  2. public class typemap_arrays_runme {
  3. static {
  4. try {
  5. System.loadLibrary("typemap_arrays");
  6. } catch (UnsatisfiedLinkError e) {
  7. 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);
  8. System.exit(1);
  9. }
  10. }
  11. public static void main(String argv[]) {
  12. if (typemap_arrays.sumA(null) != 60)
  13. throw new RuntimeException("Sum is wrong");
  14. }
  15. }