PageRenderTime 39ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Java | 30 lines | 23 code | 7 blank | 0 comment | 6 complexity | a209bb33233865a72c225de6cc5f17f7 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. import template_nested.*;
  2. public class template_nested_runme {
  3. static {
  4. try {
  5. System.loadLibrary("template_nested");
  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. new T_NormalTemplateNormalClass().tmethod(new NormalClass());
  13. new OuterClass().T_OuterTMethodNormalClass(new NormalClass());
  14. TemplateFuncs tf = new TemplateFuncs();
  15. if (tf.T_TemplateFuncs1Int(-10) != -10)
  16. throw new RuntimeException("it failed");
  17. if (tf.T_TemplateFuncs2Double(-12.3) != -12.3)
  18. throw new RuntimeException("it failed");
  19. T_NestedOuterTemplateDouble tn = new T_NestedOuterTemplateDouble();
  20. if (tn.hohum(-12.3) != -12.3)
  21. throw new RuntimeException("it failed");
  22. }
  23. }