PageRenderTime 72ms CodeModel.GetById 13ms app.highlight 51ms RepoModel.GetById 2ms app.codeStats 0ms

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

#
Java | 443 lines | 407 code | 27 blank | 9 comment | 598 complexity | abd5773b5ebc45b131c2dc33012ea408 MD5 | raw file
  1
  2import enum_thorough_simple.*;
  3
  4public class enum_thorough_simple_runme {
  5
  6  static {
  7    try {
  8        System.loadLibrary("enum_thorough_simple");
  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  {
 17    {
 18      // Anonymous enums
 19      int i = enum_thorough_simple.AnonEnum1;
 20      if (enum_thorough_simple.ReallyAnInteger != 200) throw new RuntimeException("Test Anon 1 failed");
 21      int j = enum_thorough_simple.AnonSpaceEnum1;
 22      int k = AnonStruct.AnonStructEnum1;
 23    }
 24    {
 25      int red = enum_thorough_simple.red;
 26      enum_thorough_simple.colourTest1(red);
 27      enum_thorough_simple.colourTest2(red);
 28      enum_thorough_simple.colourTest3(red);
 29      enum_thorough_simple.colourTest4(red);
 30      enum_thorough_simple.setMyColour(red);
 31    }
 32    {
 33      SpeedClass s = new SpeedClass();
 34      int speed = SpeedClass.slow;
 35      if (s.speedTest1(speed) != speed) throw new RuntimeException("speedTest 1 failed");
 36      if (s.speedTest2(speed) != speed) throw new RuntimeException("speedTest 2 failed");
 37      if (s.speedTest3(speed) != speed) throw new RuntimeException("speedTest 3 failed");
 38      if (s.speedTest4(speed) != speed) throw new RuntimeException("speedTest 4 failed");
 39      if (s.speedTest5(speed) != speed) throw new RuntimeException("speedTest 5 failed");
 40      if (s.speedTest6(speed) != speed) throw new RuntimeException("speedTest 6 failed");
 41      if (s.speedTest7(speed) != speed) throw new RuntimeException("speedTest 7 failed");
 42      if (s.speedTest8(speed) != speed) throw new RuntimeException("speedTest 8 failed");
 43
 44      if (enum_thorough_simple.speedTest1(speed) != speed) throw new RuntimeException("speedTest Global 1 failed");
 45      if (enum_thorough_simple.speedTest2(speed) != speed) throw new RuntimeException("speedTest Global 2 failed");
 46      if (enum_thorough_simple.speedTest3(speed) != speed) throw new RuntimeException("speedTest Global 3 failed");
 47      if (enum_thorough_simple.speedTest4(speed) != speed) throw new RuntimeException("speedTest Global 4 failed");
 48      if (enum_thorough_simple.speedTest5(speed) != speed) throw new RuntimeException("speedTest Global 5 failed");
 49    }
 50    {
 51      SpeedClass s = new SpeedClass();
 52      int slow = SpeedClass.slow;
 53      int lightning = SpeedClass.lightning;
 54
 55      if (s.getMySpeedtd1() != slow) throw new RuntimeException("mySpeedtd1 1 failed");
 56      if (s.getMySpeedtd1() != 10) throw new RuntimeException("mySpeedtd1 2 failed");
 57
 58      s.setMySpeedtd1(lightning);
 59      if (s.getMySpeedtd1() != lightning) throw new RuntimeException("mySpeedtd1 3 failed");
 60      if (s.getMySpeedtd1() != 31) throw new RuntimeException("mySpeedtd1 4 failed");
 61    }
 62    {
 63      if (enum_thorough_simple.namedanonTest1(enum_thorough_simple.NamedAnon2) != enum_thorough_simple.NamedAnon2) throw new RuntimeException("namedanonTest 1 failed");
 64    }
 65    {
 66      int val = enum_thorough_simple.TwoNames2;
 67      if (enum_thorough_simple.twonamesTest1(val) != val) throw new RuntimeException("twonamesTest 1 failed");
 68      if (enum_thorough_simple.twonamesTest2(val) != val) throw new RuntimeException("twonamesTest 2 failed");
 69      if (enum_thorough_simple.twonamesTest3(val) != val) throw new RuntimeException("twonamesTest 3 failed");
 70    }
 71    {
 72      TwoNamesStruct t = new TwoNamesStruct();
 73      int val = TwoNamesStruct.TwoNamesStruct1;
 74      if (t.twonamesTest1(val) != val) throw new RuntimeException("twonamesTest 1 failed");
 75      if (t.twonamesTest2(val) != val) throw new RuntimeException("twonamesTest 2 failed");
 76      if (t.twonamesTest3(val) != val) throw new RuntimeException("twonamesTest 3 failed");
 77    }
 78    {
 79      int val = enum_thorough_simple.NamedAnonSpace2;
 80      if (enum_thorough_simple.namedanonspaceTest1(val) != val) throw new RuntimeException("namedanonspaceTest 1 failed");
 81      if (enum_thorough_simple.namedanonspaceTest2(val) != val) throw new RuntimeException("namedanonspaceTest 2 failed");
 82      if (enum_thorough_simple.namedanonspaceTest3(val) != val) throw new RuntimeException("namedanonspaceTest 3 failed");
 83      if (enum_thorough_simple.namedanonspaceTest4(val) != val) throw new RuntimeException("namedanonspaceTest 4 failed");
 84    }
 85    {
 86      TemplateClassInt t = new TemplateClassInt();
 87      int galileo = TemplateClassInt.galileo;
 88
 89      if (t.scientistsTest1(galileo) != galileo) throw new RuntimeException("scientistsTest 1 failed");
 90      if (t.scientistsTest2(galileo) != galileo) throw new RuntimeException("scientistsTest 2 failed");
 91      if (t.scientistsTest3(galileo) != galileo) throw new RuntimeException("scientistsTest 3 failed");
 92      if (t.scientistsTest4(galileo) != galileo) throw new RuntimeException("scientistsTest 4 failed");
 93      if (t.scientistsTest5(galileo) != galileo) throw new RuntimeException("scientistsTest 5 failed");
 94      if (t.scientistsTest6(galileo) != galileo) throw new RuntimeException("scientistsTest 6 failed");
 95      if (t.scientistsTest7(galileo) != galileo) throw new RuntimeException("scientistsTest 7 failed");
 96      if (t.scientistsTest8(galileo) != galileo) throw new RuntimeException("scientistsTest 8 failed");
 97      if (t.scientistsTest9(galileo) != galileo) throw new RuntimeException("scientistsTest 9 failed");
 98//      if (t.scientistsTestA(galileo) != galileo) throw new RuntimeException("scientistsTest A failed");
 99      if (t.scientistsTestB(galileo) != galileo) throw new RuntimeException("scientistsTest B failed");
100//      if (t.scientistsTestC(galileo) != galileo) throw new RuntimeException("scientistsTest C failed");
101      if (t.scientistsTestD(galileo) != galileo) throw new RuntimeException("scientistsTest D failed");
102      if (t.scientistsTestE(galileo) != galileo) throw new RuntimeException("scientistsTest E failed");
103      if (t.scientistsTestF(galileo) != galileo) throw new RuntimeException("scientistsTest F failed");
104      if (t.scientistsTestG(galileo) != galileo) throw new RuntimeException("scientistsTest G failed");
105      if (t.scientistsTestH(galileo) != galileo) throw new RuntimeException("scientistsTest H failed");
106      if (t.scientistsTestI(galileo) != galileo) throw new RuntimeException("scientistsTest I failed");
107      if (t.scientistsTestJ(galileo) != galileo) throw new RuntimeException("scientistsTest J failed");
108
109      if (enum_thorough_simple.scientistsTest1(galileo) != galileo) throw new RuntimeException("scientistsTest Global 1 failed");
110      if (enum_thorough_simple.scientistsTest2(galileo) != galileo) throw new RuntimeException("scientistsTest Global 2 failed");
111      if (enum_thorough_simple.scientistsTest3(galileo) != galileo) throw new RuntimeException("scientistsTest Global 3 failed");
112      if (enum_thorough_simple.scientistsTest4(galileo) != galileo) throw new RuntimeException("scientistsTest Global 4 failed");
113      if (enum_thorough_simple.scientistsTest5(galileo) != galileo) throw new RuntimeException("scientistsTest Global 5 failed");
114      if (enum_thorough_simple.scientistsTest6(galileo) != galileo) throw new RuntimeException("scientistsTest Global 6 failed");
115      if (enum_thorough_simple.scientistsTest7(galileo) != galileo) throw new RuntimeException("scientistsTest Global 7 failed");
116      if (enum_thorough_simple.scientistsTest8(galileo) != galileo) throw new RuntimeException("scientistsTest Global 8 failed");
117    }
118    {
119      TClassInt t = new TClassInt();
120      int bell = TClassInt.bell;
121      int galileo = TemplateClassInt.galileo;
122      if (t.scientistsNameTest1(bell) != bell) throw new RuntimeException("scientistsNameTest 1 failed");
123      if (t.scientistsNameTest2(bell) != bell) throw new RuntimeException("scientistsNameTest 2 failed");
124      if (t.scientistsNameTest3(bell) != bell) throw new RuntimeException("scientistsNameTest 3 failed");
125      if (t.scientistsNameTest4(bell) != bell) throw new RuntimeException("scientistsNameTest 4 failed");
126      if (t.scientistsNameTest5(bell) != bell) throw new RuntimeException("scientistsNameTest 5 failed");
127      if (t.scientistsNameTest6(bell) != bell) throw new RuntimeException("scientistsNameTest 6 failed");
128      if (t.scientistsNameTest7(bell) != bell) throw new RuntimeException("scientistsNameTest 7 failed");
129      if (t.scientistsNameTest8(bell) != bell) throw new RuntimeException("scientistsNameTest 8 failed");
130      if (t.scientistsNameTest9(bell) != bell) throw new RuntimeException("scientistsNameTest 9 failed");
131//      if (t.scientistsNameTestA(bell) != bell) throw new RuntimeException("scientistsNameTest A failed");
132      if (t.scientistsNameTestB(bell) != bell) throw new RuntimeException("scientistsNameTest B failed");
133//      if (t.scientistsNameTestC(bell) != bell) throw new RuntimeException("scientistsNameTest C failed");
134      if (t.scientistsNameTestD(bell) != bell) throw new RuntimeException("scientistsNameTest D failed");
135      if (t.scientistsNameTestE(bell) != bell) throw new RuntimeException("scientistsNameTest E failed");
136      if (t.scientistsNameTestF(bell) != bell) throw new RuntimeException("scientistsNameTest F failed");
137      if (t.scientistsNameTestG(bell) != bell) throw new RuntimeException("scientistsNameTest G failed");
138      if (t.scientistsNameTestH(bell) != bell) throw new RuntimeException("scientistsNameTest H failed");
139      if (t.scientistsNameTestI(bell) != bell) throw new RuntimeException("scientistsNameTest I failed");
140
141      if (t.scientistsNameSpaceTest1(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest 1 failed");
142      if (t.scientistsNameSpaceTest2(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest 2 failed");
143      if (t.scientistsNameSpaceTest3(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest 3 failed");
144      if (t.scientistsNameSpaceTest4(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest 4 failed");
145      if (t.scientistsNameSpaceTest5(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest 5 failed");
146      if (t.scientistsNameSpaceTest6(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest 6 failed");
147      if (t.scientistsNameSpaceTest7(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest 7 failed");
148
149      if (t.scientistsOtherTest1(galileo) != galileo) throw new RuntimeException("scientistsOtherTest 1 failed");
150      if (t.scientistsOtherTest2(galileo) != galileo) throw new RuntimeException("scientistsOtherTest 2 failed");
151      if (t.scientistsOtherTest3(galileo) != galileo) throw new RuntimeException("scientistsOtherTest 3 failed");
152      if (t.scientistsOtherTest4(galileo) != galileo) throw new RuntimeException("scientistsOtherTest 4 failed");
153      if (t.scientistsOtherTest5(galileo) != galileo) throw new RuntimeException("scientistsOtherTest 5 failed");
154      if (t.scientistsOtherTest6(galileo) != galileo) throw new RuntimeException("scientistsOtherTest 6 failed");
155      if (t.scientistsOtherTest7(galileo) != galileo) throw new RuntimeException("scientistsOtherTest 7 failed");
156
157      if (enum_thorough_simple.scientistsNameTest1(bell) != bell) throw new RuntimeException("scientistsNameTest Global 1 failed");
158      if (enum_thorough_simple.scientistsNameTest2(bell) != bell) throw new RuntimeException("scientistsNameTest Global 2 failed");
159      if (enum_thorough_simple.scientistsNameTest3(bell) != bell) throw new RuntimeException("scientistsNameTest Global 3 failed");
160      if (enum_thorough_simple.scientistsNameTest4(bell) != bell) throw new RuntimeException("scientistsNameTest Global 4 failed");
161      if (enum_thorough_simple.scientistsNameTest5(bell) != bell) throw new RuntimeException("scientistsNameTest Global 5 failed");
162      if (enum_thorough_simple.scientistsNameTest6(bell) != bell) throw new RuntimeException("scientistsNameTest Global 6 failed");
163      if (enum_thorough_simple.scientistsNameTest7(bell) != bell) throw new RuntimeException("scientistsNameTest Global 7 failed");
164
165      if (enum_thorough_simple.scientistsNameSpaceTest1(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global 1 failed");
166      if (enum_thorough_simple.scientistsNameSpaceTest2(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global 2 failed");
167      if (enum_thorough_simple.scientistsNameSpaceTest3(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global 3 failed");
168      if (enum_thorough_simple.scientistsNameSpaceTest4(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global 4 failed");
169      if (enum_thorough_simple.scientistsNameSpaceTest5(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global 5 failed");
170      if (enum_thorough_simple.scientistsNameSpaceTest6(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global 6 failed");
171      if (enum_thorough_simple.scientistsNameSpaceTest7(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global 7 failed");
172
173      if (enum_thorough_simple.scientistsNameSpaceTest8(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global 8 failed");
174      if (enum_thorough_simple.scientistsNameSpaceTest9(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global 9 failed");
175      if (enum_thorough_simple.scientistsNameSpaceTestA(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global A failed");
176      if (enum_thorough_simple.scientistsNameSpaceTestB(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global B failed");
177      if (enum_thorough_simple.scientistsNameSpaceTestC(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global C failed");
178      if (enum_thorough_simple.scientistsNameSpaceTestD(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global D failed");
179      if (enum_thorough_simple.scientistsNameSpaceTestE(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global E failed");
180
181      if (enum_thorough_simple.scientistsNameSpaceTestF(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global F failed");
182      if (enum_thorough_simple.scientistsNameSpaceTestG(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global G failed");
183      if (enum_thorough_simple.scientistsNameSpaceTestH(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global H failed");
184      if (enum_thorough_simple.scientistsNameSpaceTestI(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global I failed");
185      if (enum_thorough_simple.scientistsNameSpaceTestJ(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global J failed");
186      if (enum_thorough_simple.scientistsNameSpaceTestK(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global K failed");
187      if (enum_thorough_simple.scientistsNameSpaceTestL(bell) != bell) throw new RuntimeException("scientistsNameSpaceTest Global L failed");
188    }
189    {
190      int val = enum_thorough_simple.argh;
191      if (enum_thorough_simple.renameTest1(val) != val) throw new RuntimeException("renameTest Global 1 failed");
192      if (enum_thorough_simple.renameTest2(val) != val) throw new RuntimeException("renameTest Global 2 failed");
193    }
194    {
195      NewNameStruct n = new NewNameStruct();
196      if (n.renameTest1(NewNameStruct.bang) != NewNameStruct.bang) throw new RuntimeException("renameTest 1 failed");
197      if (n.renameTest2(NewNameStruct.bang) != NewNameStruct.bang) throw new RuntimeException("renameTest 2 failed");
198      if (n.renameTest3(NewNameStruct.simple1) != NewNameStruct.simple1) throw new RuntimeException("renameTest 3 failed");
199      if (n.renameTest4(NewNameStruct.doublename1) != NewNameStruct.doublename1) throw new RuntimeException("renameTest 4 failed");
200      if (n.renameTest5(NewNameStruct.doublename1) != NewNameStruct.doublename1) throw new RuntimeException("renameTest 5 failed");
201      if (n.renameTest6(NewNameStruct.singlename1) != NewNameStruct.singlename1) throw new RuntimeException("renameTest 6 failed");
202    }
203    {
204      if (enum_thorough_simple.renameTest3(NewNameStruct.bang) != NewNameStruct.bang) throw new RuntimeException("renameTest Global 3 failed");
205      if (enum_thorough_simple.renameTest4(NewNameStruct.simple1) != NewNameStruct.simple1) throw new RuntimeException("renameTest Global 4 failed");
206      if (enum_thorough_simple.renameTest5(NewNameStruct.doublename1) != NewNameStruct.doublename1) throw new RuntimeException("renameTest Global 5 failed");
207      if (enum_thorough_simple.renameTest6(NewNameStruct.doublename1) != NewNameStruct.doublename1) throw new RuntimeException("renameTest Global 6 failed");
208      if (enum_thorough_simple.renameTest7(NewNameStruct.singlename1) != NewNameStruct.singlename1) throw new RuntimeException("renameTest Global 7 failed");
209    }
210    {
211      TreesClass t = new TreesClass();
212      int pine = TreesClass.pine;
213
214      if (t.treesTest1(pine) != pine) throw new RuntimeException("treesTest 1 failed");
215      if (t.treesTest2(pine) != pine) throw new RuntimeException("treesTest 2 failed");
216      if (t.treesTest3(pine) != pine) throw new RuntimeException("treesTest 3 failed");
217      if (t.treesTest4(pine) != pine) throw new RuntimeException("treesTest 4 failed");
218      if (t.treesTest5(pine) != pine) throw new RuntimeException("treesTest 5 failed");
219      if (t.treesTest6(pine) != pine) throw new RuntimeException("treesTest 6 failed");
220      if (t.treesTest7(pine) != pine) throw new RuntimeException("treesTest 7 failed");
221      if (t.treesTest8(pine) != pine) throw new RuntimeException("treesTest 8 failed");
222      if (t.treesTest9(pine) != pine) throw new RuntimeException("treesTest 9 failed");
223      if (t.treesTestA(pine) != pine) throw new RuntimeException("treesTest A failed");
224      if (t.treesTestB(pine) != pine) throw new RuntimeException("treesTest B failed");
225      if (t.treesTestC(pine) != pine) throw new RuntimeException("treesTest C failed");
226      if (t.treesTestD(pine) != pine) throw new RuntimeException("treesTest D failed");
227      if (t.treesTestE(pine) != pine) throw new RuntimeException("treesTest E failed");
228      if (t.treesTestF(pine) != pine) throw new RuntimeException("treesTest F failed");
229      if (t.treesTestG(pine) != pine) throw new RuntimeException("treesTest G failed");
230      if (t.treesTestH(pine) != pine) throw new RuntimeException("treesTest H failed");
231      if (t.treesTestI(pine) != pine) throw new RuntimeException("treesTest I failed");
232      if (t.treesTestJ(pine) != pine) throw new RuntimeException("treesTest J failed");
233      if (t.treesTestK(pine) != pine) throw new RuntimeException("treesTest K failed");
234      if (t.treesTestL(pine) != pine) throw new RuntimeException("treesTest L failed");
235      if (t.treesTestM(pine) != pine) throw new RuntimeException("treesTest M failed");
236      if (t.treesTestN(pine) != pine) throw new RuntimeException("treesTest N failed");
237      if (t.treesTestO(pine) != pine) throw new RuntimeException("treesTest O failed");
238
239      if (enum_thorough_simple.treesTest1(pine) != pine) throw new RuntimeException("treesTest Global 1 failed");
240      if (enum_thorough_simple.treesTest2(pine) != pine) throw new RuntimeException("treesTest Global 2 failed");
241      if (enum_thorough_simple.treesTest3(pine) != pine) throw new RuntimeException("treesTest Global 3 failed");
242      if (enum_thorough_simple.treesTest4(pine) != pine) throw new RuntimeException("treesTest Global 4 failed");
243      if (enum_thorough_simple.treesTest5(pine) != pine) throw new RuntimeException("treesTest Global 5 failed");
244      if (enum_thorough_simple.treesTest6(pine) != pine) throw new RuntimeException("treesTest Global 6 failed");
245      if (enum_thorough_simple.treesTest7(pine) != pine) throw new RuntimeException("treesTest Global 7 failed");
246      if (enum_thorough_simple.treesTest8(pine) != pine) throw new RuntimeException("treesTest Global 8 failed");
247      if (enum_thorough_simple.treesTest9(pine) != pine) throw new RuntimeException("treesTest Global 9 failed");
248      if (enum_thorough_simple.treesTestA(pine) != pine) throw new RuntimeException("treesTest Global A failed");
249      if (enum_thorough_simple.treesTestB(pine) != pine) throw new RuntimeException("treesTest Global B failed");
250      if (enum_thorough_simple.treesTestC(pine) != pine) throw new RuntimeException("treesTest Global C failed");
251      if (enum_thorough_simple.treesTestD(pine) != pine) throw new RuntimeException("treesTest Global D failed");
252      if (enum_thorough_simple.treesTestE(pine) != pine) throw new RuntimeException("treesTest Global E failed");
253      if (enum_thorough_simple.treesTestF(pine) != pine) throw new RuntimeException("treesTest Global F failed");
254      if (enum_thorough_simple.treesTestG(pine) != pine) throw new RuntimeException("treesTest Global G failed");
255      if (enum_thorough_simple.treesTestH(pine) != pine) throw new RuntimeException("treesTest Global H failed");
256      if (enum_thorough_simple.treesTestI(pine) != pine) throw new RuntimeException("treesTest Global I failed");
257      if (enum_thorough_simple.treesTestJ(pine) != pine) throw new RuntimeException("treesTest Global J failed");
258      if (enum_thorough_simple.treesTestK(pine) != pine) throw new RuntimeException("treesTest Global K failed");
259      if (enum_thorough_simple.treesTestL(pine) != pine) throw new RuntimeException("treesTest Global L failed");
260      if (enum_thorough_simple.treesTestM(pine) != pine) throw new RuntimeException("treesTest Global M failed");
261//      if (enum_thorough_simple.treesTestN(pine) != pine) throw new RuntimeException("treesTest Global N failed");
262      if (enum_thorough_simple.treesTestO(pine) != pine) throw new RuntimeException("treesTest Global O failed");
263      if (enum_thorough_simple.treesTestP(pine) != pine) throw new RuntimeException("treesTest Global P failed");
264      if (enum_thorough_simple.treesTestQ(pine) != pine) throw new RuntimeException("treesTest Global Q failed");
265      if (enum_thorough_simple.treesTestR(pine) != pine) throw new RuntimeException("treesTest Global R failed");
266    }
267    {
268      HairStruct h = new HairStruct();
269      int ginger = HairStruct.ginger;
270
271      if (h.hairTest1(ginger) != ginger) throw new RuntimeException("hairTest 1 failed");
272      if (h.hairTest2(ginger) != ginger) throw new RuntimeException("hairTest 2 failed");
273      if (h.hairTest3(ginger) != ginger) throw new RuntimeException("hairTest 3 failed");
274      if (h.hairTest4(ginger) != ginger) throw new RuntimeException("hairTest 4 failed");
275      if (h.hairTest5(ginger) != ginger) throw new RuntimeException("hairTest 5 failed");
276      if (h.hairTest6(ginger) != ginger) throw new RuntimeException("hairTest 6 failed");
277      if (h.hairTest7(ginger) != ginger) throw new RuntimeException("hairTest 7 failed");
278      if (h.hairTest8(ginger) != ginger) throw new RuntimeException("hairTest 8 failed");
279      if (h.hairTest9(ginger) != ginger) throw new RuntimeException("hairTest 9 failed");
280      if (h.hairTestA(ginger) != ginger) throw new RuntimeException("hairTest A failed");
281      if (h.hairTestB(ginger) != ginger) throw new RuntimeException("hairTest B failed");
282
283      int red = enum_thorough_simple.red;
284      if (h.colourTest1(red) != red) throw new RuntimeException("colourTest HairStruct 1 failed");
285      if (h.colourTest2(red) != red) throw new RuntimeException("colourTest HairStruct 2 failed");
286      if (h.namedanonTest1(enum_thorough_simple.NamedAnon2) != enum_thorough_simple.NamedAnon2) throw new RuntimeException("namedanonTest HairStruct 1 failed");
287      if (h.namedanonspaceTest1(enum_thorough_simple.NamedAnonSpace2) != enum_thorough_simple.NamedAnonSpace2) throw new RuntimeException("namedanonspaceTest HairStruct 1 failed");
288
289      int fir = TreesClass.fir;
290      if (h.treesGlobalTest1(fir) != fir) throw new RuntimeException("treesGlobalTest1 HairStruct 1 failed");
291      if (h.treesGlobalTest2(fir) != fir) throw new RuntimeException("treesGlobalTest1 HairStruct 2 failed");
292      if (h.treesGlobalTest3(fir) != fir) throw new RuntimeException("treesGlobalTest1 HairStruct 3 failed");
293      if (h.treesGlobalTest4(fir) != fir) throw new RuntimeException("treesGlobalTest1 HairStruct 4 failed");
294    }
295    {
296      int blonde = HairStruct.blonde;
297      if (enum_thorough_simple.hairTest1(blonde) != blonde) throw new RuntimeException("hairTest Global 1 failed");
298      if (enum_thorough_simple.hairTest2(blonde) != blonde) throw new RuntimeException("hairTest Global 2 failed");
299      if (enum_thorough_simple.hairTest3(blonde) != blonde) throw new RuntimeException("hairTest Global 3 failed");
300      if (enum_thorough_simple.hairTest4(blonde) != blonde) throw new RuntimeException("hairTest Global 4 failed");
301      if (enum_thorough_simple.hairTest5(blonde) != blonde) throw new RuntimeException("hairTest Global 5 failed");
302      if (enum_thorough_simple.hairTest6(blonde) != blonde) throw new RuntimeException("hairTest Global 6 failed");
303      if (enum_thorough_simple.hairTest7(blonde) != blonde) throw new RuntimeException("hairTest Global 7 failed");
304      if (enum_thorough_simple.hairTest8(blonde) != blonde) throw new RuntimeException("hairTest Global 8 failed");
305      if (enum_thorough_simple.hairTest9(blonde) != blonde) throw new RuntimeException("hairTest Global 9 failed");
306      if (enum_thorough_simple.hairTestA(blonde) != blonde) throw new RuntimeException("hairTest Global A failed");
307      if (enum_thorough_simple.hairTestB(blonde) != blonde) throw new RuntimeException("hairTest Global B failed");
308      if (enum_thorough_simple.hairTestC(blonde) != blonde) throw new RuntimeException("hairTest Global C failed");
309
310      if (enum_thorough_simple.hairTestA1(blonde) != blonde) throw new RuntimeException("hairTest Global A1 failed");
311      if (enum_thorough_simple.hairTestA2(blonde) != blonde) throw new RuntimeException("hairTest Global A2 failed");
312      if (enum_thorough_simple.hairTestA3(blonde) != blonde) throw new RuntimeException("hairTest Global A3 failed");
313      if (enum_thorough_simple.hairTestA4(blonde) != blonde) throw new RuntimeException("hairTest Global A4 failed");
314      if (enum_thorough_simple.hairTestA5(blonde) != blonde) throw new RuntimeException("hairTest Global A5 failed");
315      if (enum_thorough_simple.hairTestA6(blonde) != blonde) throw new RuntimeException("hairTest Global A6 failed");
316      if (enum_thorough_simple.hairTestA7(blonde) != blonde) throw new RuntimeException("hairTest Global A7 failed");
317      if (enum_thorough_simple.hairTestA8(blonde) != blonde) throw new RuntimeException("hairTest Global A8 failed");
318      if (enum_thorough_simple.hairTestA9(blonde) != blonde) throw new RuntimeException("hairTest Global A9 failed");
319      if (enum_thorough_simple.hairTestAA(blonde) != blonde) throw new RuntimeException("hairTest Global AA failed");
320      if (enum_thorough_simple.hairTestAB(blonde) != blonde) throw new RuntimeException("hairTest Global AB failed");
321      if (enum_thorough_simple.hairTestAC(blonde) != blonde) throw new RuntimeException("hairTest Global AC failed");
322
323      if (enum_thorough_simple.hairTestB1(blonde) != blonde) throw new RuntimeException("hairTest Global B1 failed");
324      if (enum_thorough_simple.hairTestB2(blonde) != blonde) throw new RuntimeException("hairTest Global B2 failed");
325      if (enum_thorough_simple.hairTestB3(blonde) != blonde) throw new RuntimeException("hairTest Global B3 failed");
326      if (enum_thorough_simple.hairTestB4(blonde) != blonde) throw new RuntimeException("hairTest Global B4 failed");
327      if (enum_thorough_simple.hairTestB5(blonde) != blonde) throw new RuntimeException("hairTest Global B5 failed");
328      if (enum_thorough_simple.hairTestB6(blonde) != blonde) throw new RuntimeException("hairTest Global B6 failed");
329      if (enum_thorough_simple.hairTestB7(blonde) != blonde) throw new RuntimeException("hairTest Global B7 failed");
330      if (enum_thorough_simple.hairTestB8(blonde) != blonde) throw new RuntimeException("hairTest Global B8 failed");
331      if (enum_thorough_simple.hairTestB9(blonde) != blonde) throw new RuntimeException("hairTest Global B9 failed");
332      if (enum_thorough_simple.hairTestBA(blonde) != blonde) throw new RuntimeException("hairTest Global BA failed");
333      if (enum_thorough_simple.hairTestBB(blonde) != blonde) throw new RuntimeException("hairTest Global BB failed");
334      if (enum_thorough_simple.hairTestBC(blonde) != blonde) throw new RuntimeException("hairTest Global BC failed");
335
336      if (enum_thorough_simple.hairTestC1(blonde) != blonde) throw new RuntimeException("hairTest Global C1 failed");
337      if (enum_thorough_simple.hairTestC2(blonde) != blonde) throw new RuntimeException("hairTest Global C2 failed");
338      if (enum_thorough_simple.hairTestC3(blonde) != blonde) throw new RuntimeException("hairTest Global C3 failed");
339      if (enum_thorough_simple.hairTestC4(blonde) != blonde) throw new RuntimeException("hairTest Global C4 failed");
340      if (enum_thorough_simple.hairTestC5(blonde) != blonde) throw new RuntimeException("hairTest Global C5 failed");
341      if (enum_thorough_simple.hairTestC6(blonde) != blonde) throw new RuntimeException("hairTest Global C6 failed");
342      if (enum_thorough_simple.hairTestC7(blonde) != blonde) throw new RuntimeException("hairTest Global C7 failed");
343      if (enum_thorough_simple.hairTestC8(blonde) != blonde) throw new RuntimeException("hairTest Global C8 failed");
344      if (enum_thorough_simple.hairTestC9(blonde) != blonde) throw new RuntimeException("hairTest Global C9 failed");
345      if (enum_thorough_simple.hairTestCA(blonde) != blonde) throw new RuntimeException("hairTest Global CA failed");
346      if (enum_thorough_simple.hairTestCB(blonde) != blonde) throw new RuntimeException("hairTest Global CB failed");
347      if (enum_thorough_simple.hairTestCC(blonde) != blonde) throw new RuntimeException("hairTest Global CC failed");
348    }
349    {
350      FirStruct f = new FirStruct();
351      int blonde = HairStruct.blonde;
352
353      if (f.hairTestFir1(blonde) != blonde) throw new RuntimeException("hairTestFir 1 failed");
354      if (f.hairTestFir2(blonde) != blonde) throw new RuntimeException("hairTestFir 2 failed");
355      if (f.hairTestFir3(blonde) != blonde) throw new RuntimeException("hairTestFir 3 failed");
356      if (f.hairTestFir4(blonde) != blonde) throw new RuntimeException("hairTestFir 4 failed");
357      if (f.hairTestFir5(blonde) != blonde) throw new RuntimeException("hairTestFir 5 failed");
358      if (f.hairTestFir6(blonde) != blonde) throw new RuntimeException("hairTestFir 6 failed");
359      if (f.hairTestFir7(blonde) != blonde) throw new RuntimeException("hairTestFir 7 failed");
360      if (f.hairTestFir8(blonde) != blonde) throw new RuntimeException("hairTestFir 8 failed");
361      if (f.hairTestFir9(blonde) != blonde) throw new RuntimeException("hairTestFir 9 failed");
362      if (f.hairTestFirA(blonde) != blonde) throw new RuntimeException("hairTestFir A failed");
363    }
364    {
365      enum_thorough_simple.setGlobalInstance(enum_thorough_simple.globalinstance2);
366      if (enum_thorough_simple.getGlobalInstance() != enum_thorough_simple.globalinstance2) throw new RuntimeException("GlobalInstance 1 failed");
367
368      Instances i = new Instances();
369      i.setMemberInstance(Instances.memberinstance3);
370      if (i.getMemberInstance() != Instances.memberinstance3) throw new RuntimeException("MemberInstance 1 failed");
371    }
372    // ignore enum item tests start
373    {
374      if (enum_thorough_simple.ignoreATest(IgnoreTest.ignoreA_zero) != 0) throw new RuntimeException("ignoreATest 0 failed");
375      if (enum_thorough_simple.ignoreATest(IgnoreTest.ignoreA_three) != 3) throw new RuntimeException("ignoreATest 3 failed");
376      if (enum_thorough_simple.ignoreATest(IgnoreTest.ignoreA_ten) != 10) throw new RuntimeException("ignoreATest 10 failed");
377      if (enum_thorough_simple.ignoreATest(IgnoreTest.ignoreA_eleven) != 11) throw new RuntimeException("ignoreATest 11 failed");
378      if (enum_thorough_simple.ignoreATest(IgnoreTest.ignoreA_thirteen) != 13) throw new RuntimeException("ignoreATest 13 failed");
379      if (enum_thorough_simple.ignoreATest(IgnoreTest.ignoreA_fourteen) != 14) throw new RuntimeException("ignoreATest 14 failed");
380      if (enum_thorough_simple.ignoreATest(IgnoreTest.ignoreA_twenty) != 20) throw new RuntimeException("ignoreATest 20 failed");
381      if (enum_thorough_simple.ignoreATest(IgnoreTest.ignoreA_thirty) != 30) throw new RuntimeException("ignoreATest 30 failed");
382      if (enum_thorough_simple.ignoreATest(IgnoreTest.ignoreA_thirty_two) != 32) throw new RuntimeException("ignoreATest 32 failed");
383      if (enum_thorough_simple.ignoreATest(IgnoreTest.ignoreA_thirty_three) != 33) throw new RuntimeException("ignoreATest 33 failed");
384    }
385    {
386      if (enum_thorough_simple.ignoreBTest(IgnoreTest.ignoreB_eleven) != 11) throw new RuntimeException("ignoreBTest 11 failed");
387      if (enum_thorough_simple.ignoreBTest(IgnoreTest.ignoreB_twelve) != 12) throw new RuntimeException("ignoreBTest 12 failed");
388      if (enum_thorough_simple.ignoreBTest(IgnoreTest.ignoreB_thirty_one) != 31) throw new RuntimeException("ignoreBTest 31 failed");
389      if (enum_thorough_simple.ignoreBTest(IgnoreTest.ignoreB_thirty_two) != 32) throw new RuntimeException("ignoreBTest 32 failed");
390      if (enum_thorough_simple.ignoreBTest(IgnoreTest.ignoreB_forty_one) != 41) throw new RuntimeException("ignoreBTest 41 failed");
391      if (enum_thorough_simple.ignoreBTest(IgnoreTest.ignoreB_forty_two) != 42) throw new RuntimeException("ignoreBTest 42 failed");
392    }
393    {
394      if (enum_thorough_simple.ignoreCTest(IgnoreTest.ignoreC_ten) != 10) throw new RuntimeException("ignoreCTest 10 failed");
395      if (enum_thorough_simple.ignoreCTest(IgnoreTest.ignoreC_twelve) != 12) throw new RuntimeException("ignoreCTest 12 failed");
396      if (enum_thorough_simple.ignoreCTest(IgnoreTest.ignoreC_thirty) != 30) throw new RuntimeException("ignoreCTest 30 failed");
397      if (enum_thorough_simple.ignoreCTest(IgnoreTest.ignoreC_thirty_two) != 32) throw new RuntimeException("ignoreCTest 32 failed");
398      if (enum_thorough_simple.ignoreCTest(IgnoreTest.ignoreC_forty) != 40) throw new RuntimeException("ignoreCTest 40 failed");
399      if (enum_thorough_simple.ignoreCTest(IgnoreTest.ignoreC_forty_two) != 42) throw new RuntimeException("ignoreCTest 42 failed");
400    }
401    {
402      if (enum_thorough_simple.ignoreDTest(IgnoreTest.ignoreD_twenty_one) != 21) throw new RuntimeException("ignoreDTest 21 failed");
403      if (enum_thorough_simple.ignoreDTest(IgnoreTest.ignoreD_twenty_two) != 22) throw new RuntimeException("ignoreDTest 22 failed");
404    }
405    {
406      if (enum_thorough_simple.ignoreETest(IgnoreTest.ignoreE_zero) != 0) throw new RuntimeException("ignoreETest 0 failed");
407      if (enum_thorough_simple.ignoreETest(IgnoreTest.ignoreE_twenty_one) != 21) throw new RuntimeException("ignoreETest 21 failed");
408      if (enum_thorough_simple.ignoreETest(IgnoreTest.ignoreE_twenty_two) != 22) throw new RuntimeException("ignoreETest 22 failed");
409    }
410    // ignore enum item tests end
411    {
412      if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.one) != 1) throw new RuntimeException("repeatTest 1 failed");
413      if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.initial) != 1) throw new RuntimeException("repeatTest 2 failed");
414      if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.two) != 2) throw new RuntimeException("repeatTest 3 failed");
415      if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.three) != 3) throw new RuntimeException("repeatTest 4 failed");
416      if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.llast) != 3) throw new RuntimeException("repeatTest 5 failed");
417      if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.end) != 3) throw new RuntimeException("repeatTest 6 failed");
418    }
419    // different types
420    {
421      if (enum_thorough_simple.differentTypesTest(enum_thorough_simpleConstants.typeint) != 10) throw new RuntimeException("differentTypes 1 failed");
422      if (enum_thorough_simple.differentTypesTest(enum_thorough_simpleConstants.typeboolfalse) != 0) throw new RuntimeException("differentTypes 2 failed");
423      if (enum_thorough_simple.differentTypesTest(enum_thorough_simpleConstants.typebooltrue) != 1) throw new RuntimeException("differentTypes 3 failed");
424      if (enum_thorough_simple.differentTypesTest(enum_thorough_simpleConstants.typebooltwo) != 2) throw new RuntimeException("differentTypes 4 failed");
425      if (enum_thorough_simple.differentTypesTest(enum_thorough_simpleConstants.typechar) != 'C') throw new RuntimeException("differentTypes 5 failed");
426      if (enum_thorough_simple.differentTypesTest(enum_thorough_simpleConstants.typedefaultint) != 'D') throw new RuntimeException("differentTypes 6 failed");
427
428      int global_enum = enum_thorough_simple.global_typeint;
429      if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 10) throw new RuntimeException("global differentTypes 1 failed");
430      global_enum = enum_thorough_simple.global_typeboolfalse;
431      if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 0) throw new RuntimeException("global differentTypes 2 failed");
432      global_enum = enum_thorough_simple.global_typebooltrue;
433      if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 1) throw new RuntimeException("global differentTypes 3 failed");
434      global_enum = enum_thorough_simple.global_typebooltwo;
435      if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 2) throw new RuntimeException("global differentTypes 4 failed");
436      global_enum = enum_thorough_simple.global_typechar;
437      if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 'C') throw new RuntimeException("global differentTypes 5 failed");
438      global_enum = enum_thorough_simple.global_typedefaultint;
439      if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 'D') throw new RuntimeException("global differentTypes 6 failed");
440    }
441  }
442}
443