/trunk/Examples/test-suite/java/template_nested_runme.java
Java | 30 lines | 23 code | 7 blank | 0 comment | 6 complexity | a209bb33233865a72c225de6cc5f17f7 MD5 | raw file
1 2import template_nested.*; 3 4public class template_nested_runme { 5 6 static { 7 try { 8 System.loadLibrary("template_nested"); 9 } catch (UnsatisfiedLinkError e) { 10 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); 11 System.exit(1); 12 } 13 } 14 15 public static void main(String argv[]) { 16 new T_NormalTemplateNormalClass().tmethod(new NormalClass()); 17 new OuterClass().T_OuterTMethodNormalClass(new NormalClass()); 18 19 TemplateFuncs tf = new TemplateFuncs(); 20 if (tf.T_TemplateFuncs1Int(-10) != -10) 21 throw new RuntimeException("it failed"); 22 if (tf.T_TemplateFuncs2Double(-12.3) != -12.3) 23 throw new RuntimeException("it failed"); 24 25 T_NestedOuterTemplateDouble tn = new T_NestedOuterTemplateDouble(); 26 if (tn.hohum(-12.3) != -12.3) 27 throw new RuntimeException("it failed"); 28 } 29} 30