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

# · Java · 40 lines · 34 code · 5 blank · 1 comment · 4 complexity · 6aec4371a7ce94a1722a3458ecb63210 MD5 · raw file

  1. import director_ignore.*;
  2. public class director_ignore_runme {
  3. static {
  4. try {
  5. System.loadLibrary("director_ignore");
  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. {
  13. // Just check the classes can be instantiated and other methods work as expected
  14. DIgnoresDerived a = new DIgnoresDerived();
  15. if (a.Triple(5) != 15)
  16. throw new RuntimeException("Triple failed");
  17. DAbstractIgnoresDerived b = new DAbstractIgnoresDerived();
  18. if (b.Quadruple(5) != 20)
  19. throw new RuntimeException("Quadruple failed");
  20. }
  21. }
  22. class DIgnoresDerived extends DIgnores
  23. {
  24. public DIgnoresDerived()
  25. {
  26. super();
  27. }
  28. }
  29. class DAbstractIgnoresDerived extends DAbstractIgnores
  30. {
  31. public DAbstractIgnoresDerived()
  32. {
  33. super();
  34. }
  35. }