PageRenderTime 48ms CodeModel.GetById 15ms app.highlight 27ms RepoModel.GetById 1ms app.codeStats 1ms

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

#
Java | 86 lines | 75 code | 11 blank | 0 comment | 0 complexity | 9dc07404fb4d1a49831b67d0811d142a MD5 | raw file
 1
 2
 3import template_default_class_parms_typedef.*;
 4
 5public class template_default_class_parms_typedef_runme {
 6
 7  static {
 8    try {
 9	System.loadLibrary("template_default_class_parms_typedef");
10    } catch (UnsatisfiedLinkError e) {
11      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);
12      System.exit(1);
13    }
14  }
15
16  public static void main(String argv[]) {
17    {
18      DefaultBar bar = new DefaultBar(20.0, new SomeType(), 10);
19      double d = bar.getCType();
20      bar.setCType(d);
21      SomeType s = bar.getDType();
22      bar.setDType(s);
23      int i = bar.getEType();
24      bar.setEType(i);
25      d = bar.method(d, s, i);
26      d = bar.method_1(d, s, i);
27      d = bar.method_2(d, s, i);
28      d = bar.method_3(d, s, i);
29
30      bar = new DefaultBar(true, 20.0, new SomeType(), 10);
31      bar = new DefaultBar(true, true, 20.0, new SomeType(), 10);
32      bar = new DefaultBar(true, true, true, 20.0, new SomeType(), 10);
33    }
34    {
35      DefaultFoo foo = new DefaultFoo(new SomeType());
36      SomeType s = foo.getTType();
37      s = foo.method(s);
38      s = foo.method_A(s);
39      s = foo.method_B(s);
40      s = foo.method_C(s);
41
42      foo = new DefaultFoo(new SomeType(), new SomeType());
43      foo = new DefaultFoo(new SomeType(), new SomeType(), new SomeType());
44      foo = new DefaultFoo(new SomeType(), new SomeType(), new SomeType(), new SomeType());
45    }
46    {
47      BarAnotherTypeBool bar = new BarAnotherTypeBool(new AnotherType(), true, 10);
48      AnotherType a = bar.getCType();
49      bar.setCType(a);
50      boolean b = bar.getDType();
51      bar.setDType(b);
52      int i = bar.getEType();
53      bar.setEType(i);
54
55      a = bar.method(a, b, i);
56      a = bar.method_1(a, b, i);
57      a = bar.method_2(a, b, i);
58      a = bar.method_3(a, b, i);
59
60      bar = new BarAnotherTypeBool(true, new AnotherType(), true, 10);
61      bar = new BarAnotherTypeBool(true, true, new AnotherType(), true, 10);
62      bar = new BarAnotherTypeBool(true, true, true, new AnotherType(), true, 10);
63    }
64    {
65      FooAnotherType foo = new FooAnotherType(new AnotherType());
66      AnotherType a = foo.getTType();
67      foo.setTType(a);
68      a = foo.method(a);
69      a = foo.method_A(a);
70      a = foo.method_B(a);
71      a = foo.method_C(a);
72
73      foo = new FooAnotherType(new AnotherType(), new AnotherType());
74      foo = new FooAnotherType(new AnotherType(), new AnotherType(), new AnotherType());
75      foo = new FooAnotherType(new AnotherType(), new AnotherType(), new AnotherType(), new AnotherType());
76    }
77    {
78      UsesBarDouble u = new UsesBarDouble();
79      u.use_A(10.1, new SomeType(), 10);
80      u.use_B(10.1, new SomeType(), 10);
81      u.use_C(10.1, new SomeType(), 10);
82      u.use_D(10.1, new SomeType(), 10);
83    }
84  }
85}
86