23 import java.io.PrintWriter;
25 import java.nio.ByteBuffer;
26 import java.nio.ByteOrder;
27 import java.nio.CharBuffer;
28 import java.nio.ShortBuffer;
29 import java.nio.IntBuffer;
30 import java.nio.LongBuffer;
31 import java.nio.FloatBuffer;
32 import java.nio.DoubleBuffer;
33 import java.nio.ReadOnlyBufferException;
36 import myjapi.MyJapiCtypes;
78 static protected final PrintWriter out =
new PrintWriter(System.out,
true);
80 static protected final PrintWriter err =
new PrintWriter(System.err,
true);
84 boolean assertsEnabled =
false;
85 assert assertsEnabled =
true;
86 if (!assertsEnabled) {
87 throw new RuntimeException(
"Asserts must be enabled for this test to be effective!");
95 out.println(
"--> MyJapiTest.loadSystemLibrary(String)");
98 out.println(
" " + cls +
" <" + cls.getClassLoader() +
">");
101 out.println(
" loading libary " + name +
" ...");
103 System.loadLibrary(name);
104 }
catch (UnsatisfiedLinkError e) {
107 path = System.getProperty(
"java.library.path");
108 }
catch (Exception ex) {
109 path =
"<exception caught: " + ex.getMessage() +
">";
111 err.println(
"failed loading library '"
112 + name +
"'; java.library.path='" + path +
"'");
114 }
catch (SecurityException e) {
115 err.println(
"failed loading library '"
116 + name +
"'; caught exception: " + e);
119 out.println(
" ... loaded " + name);
122 out.println(
"<-- MyJapiTest.loadSystemLibrary(String)");
125 static public void test0() {
126 out.println(
"--> MyJapiTest.test0()");
128 out.println(
"\ncalling most basic function: f0() ...");
132 out.println(
"<-- MyJapiTest.test0()");
135 static public void test1() {
136 out.println(
"--> MyJapiTest.test1()");
138 out.println(
"\ntesting platform-dependent mappings of all primitive types");
139 out.println(
"\ncalling MyJapiCtypes functions: fxx(0) ...");
141 for (
int i = 0;
i < 2;
i++) {
142 out.println(
"\ncalling f11()");
143 final boolean nf11 = MyJapiCtypes.f11(
false);
144 assert (nf11 ==
false);
145 out.println(
"\ncalling f12()");
146 final byte nf12 = MyJapiCtypes.f12((byte)0);
147 assert (nf12 == (byte)0);
148 out.println(
"\ncalling f13()");
149 final byte nf13 = MyJapiCtypes.f13((byte)0);
150 assert (nf13 == (byte)0);
151 out.println(
"\ncalling f14()");
152 final byte nf14 = MyJapiCtypes.f14((byte)0);
153 assert (nf14 == (byte)0);
154 out.println(
"\ncalling f15()");
155 final short nf15 = MyJapiCtypes.f15((
short)0);
156 assert (nf15 == (
short)0);
157 out.println(
"\ncalling f16()");
158 final short nf16 = MyJapiCtypes.f16((
short)0);
159 assert (nf16 == (
short)0);
160 out.println(
"\ncalling f17()");
161 final int nf17 = MyJapiCtypes.f17((
int)0);
162 assert (nf17 == (
int)0);
163 out.println(
"\ncalling f18()");
164 final int nf18 = MyJapiCtypes.f18((
int)0);
165 assert (nf18 == (
int)0);
166 out.println(
"\ncalling f19()");
167 final int nf19 = MyJapiCtypes.f19((
int)0);
168 assert (nf19 == (
int)0);
169 out.println(
"\ncalling f20()");
170 final int nf20 = MyJapiCtypes.f20((
int)0);
171 assert (nf20 == (
int)0);
172 out.println(
"\ncalling f21()");
173 final long nf21 = MyJapiCtypes.f21((
long)0);
174 assert (nf21 == (
long)0);
175 out.println(
"\ncalling f22()");
176 final long nf22 = MyJapiCtypes.f22((
long)0);
177 assert (nf22 == (
long)0);
178 out.println(
"\ncalling f23()");
179 final float nf23 = MyJapiCtypes.f23((
float)0);
180 assert (nf23 == (
float)0);
181 out.println(
"\ncalling f24()");
182 final double nf24 = MyJapiCtypes.f24((
double)0);
183 assert (nf24 == (
double)0);
184 out.println(
"\ncalling f25()");
185 final double nf25 = MyJapiCtypes.f25((
double)0);
186 assert (nf25 == (
double)0);
188 out.println(
"\ncalling f31()");
189 final boolean nf31 = MyJapiCtypes.f31(
false);
190 assert (nf31 ==
false);
191 out.println(
"\ncalling f32()");
192 final byte nf32 = MyJapiCtypes.f32((byte)0);
193 assert (nf32 == (byte)0);
194 out.println(
"\ncalling f33()");
195 final byte nf33 = MyJapiCtypes.f33((byte)0);
196 assert (nf33 == (byte)0);
197 out.println(
"\ncalling f34()");
198 final byte nf34 = MyJapiCtypes.f34((byte)0);
199 assert (nf34 == (byte)0);
200 out.println(
"\ncalling f35()");
201 final short nf35 = MyJapiCtypes.f35((
short)0);
202 assert (nf35 == (
short)0);
203 out.println(
"\ncalling f36()");
204 final short nf36 = MyJapiCtypes.f36((
short)0);
205 assert (nf36 == (
short)0);
206 out.println(
"\ncalling f37()");
207 final int nf37 = MyJapiCtypes.f37((
int)0);
208 assert (nf37 == (
int)0);
209 out.println(
"\ncalling f38()");
210 final int nf38 = MyJapiCtypes.f38((
int)0);
211 assert (nf38 == (
int)0);
212 out.println(
"\ncalling f39()");
213 final int nf39 = MyJapiCtypes.f39((
int)0);
214 assert (nf39 == (
int)0);
215 out.println(
"\ncalling f40()");
216 final int nf40 = MyJapiCtypes.f40((
int)0);
217 assert (nf40 == (
int)0);
218 out.println(
"\ncalling f41()");
219 final long nf41 = MyJapiCtypes.f41((
long)0);
220 assert (nf41 == (
long)0);
221 out.println(
"\ncalling f42()");
222 final long nf42 = MyJapiCtypes.f42((
long)0);
223 assert (nf42 == (
long)0);
224 out.println(
"\ncalling f43()");
225 final float nf43 = MyJapiCtypes.f43((
float)0);
226 assert (nf43 == (
float)0);
227 out.println(
"\ncalling f44()");
228 final double nf44 = MyJapiCtypes.f44((
double)0);
229 assert (nf44 == (
double)0);
230 out.println(
"\ncalling f45()");
231 final double nf45 = MyJapiCtypes.f45((
double)0);
232 assert (nf45 == (
double)0);
236 out.println(
"<-- MyJapiTest.test1()");
239 static public void test2() {
240 out.println(
"--> MyJapiTest.test2()");
242 out.println(
"\ntesting default mappings of primitive types");
243 out.println(
"\ncalling MyJapi functions: f1xx(f0xx()) ...");
245 out.println(
"\ncalling f0()");
248 for (
int i = 0;
i < 2;
i++) {
249 out.println(
"\ncalling f111(f011())");
250 MyJapi.f111(MyJapi.f011());
251 out.println(
"\ncalling f112(f012())");
252 MyJapi.f112(MyJapi.f012());
253 out.println(
"\ncalling f113(f013())");
254 MyJapi.f113(MyJapi.f013());
255 out.println(
"\ncalling f114(f014())");
256 MyJapi.f114(MyJapi.f014());
257 out.println(
"\ncalling f115(f015())");
258 MyJapi.f115(MyJapi.f015());
259 out.println(
"\ncalling f116(f016())");
260 MyJapi.f116(MyJapi.f016());
261 out.println(
"\ncalling f117(f017())");
262 MyJapi.f117(MyJapi.f017());
263 out.println(
"\ncalling f118(f018())");
264 MyJapi.f118(MyJapi.f018());
265 out.println(
"\ncalling f121(f021())");
266 MyJapi.f121(MyJapi.f021());
267 out.println(
"\ncalling f122(f022())");
268 MyJapi.f122(MyJapi.f022());
269 out.println(
"\ncalling f123(f023())");
270 MyJapi.f123(MyJapi.f023());
271 out.println(
"\ncalling f124(f024())");
272 MyJapi.f124(MyJapi.f024());
274 out.println(
"\ncalling f131(f031())");
275 MyJapi.f131(MyJapi.f031());
276 out.println(
"\ncalling f132(f032())");
277 MyJapi.f132(MyJapi.f032());
278 out.println(
"\ncalling f133(f033())");
279 MyJapi.f133(MyJapi.f033());
280 out.println(
"\ncalling f134(f034())");
281 MyJapi.f134(MyJapi.f034());
282 out.println(
"\ncalling f135(f035())");
283 MyJapi.f135(MyJapi.f035());
284 out.println(
"\ncalling f136(f036())");
285 MyJapi.f136(MyJapi.f036());
286 out.println(
"\ncalling f137(f037())");
287 MyJapi.f137(MyJapi.f037());
288 out.println(
"\ncalling f138(f038())");
289 MyJapi.f138(MyJapi.f038());
290 out.println(
"\ncalling f141(f041())");
291 MyJapi.f141(MyJapi.f041());
292 out.println(
"\ncalling f142(f042())");
293 MyJapi.f142(MyJapi.f042());
294 out.println(
"\ncalling f143(f043())");
295 MyJapi.f143(MyJapi.f043());
296 out.println(
"\ncalling f144(f044())");
297 MyJapi.f144(MyJapi.f044());
301 out.println(
"<-- MyJapiTest.test2()");
304 static public void test3bb() {
305 out.println(
"--> MyJapiTest.test3bb()");
307 out.println(
"\ntesting ByteBuffer mappings of references of primitive types");
308 out.println(
"\ncalling MyJapi functions: f3xxbb(f2xxbb()) ...");
316 out.println(
"\ncalling f237bb()");
317 ByteBuffer bb = MyJapi.f237bb();
318 out.println(
"bb = " + bb);
319 bb.order(ByteOrder.nativeOrder());
320 IntBuffer ib = bb.asIntBuffer();
321 out.println(
"ib = " + ib);
322 out.println(
"ib.get() = " + ib.get());
323 out.println(
"\ncalling f337bb()");
327 for (
int i = 0;
i < 2;
i++) {
328 out.println(
"\ncalling f311bb(f211bb())");
329 final ByteBuffer f211bb = MyJapi.f211bb().order(ByteOrder.nativeOrder());
330 final byte nf211bb = f211bb.asReadOnlyBuffer().get();
331 MyJapi.f311bb(f211bb);
332 assert (nf211bb == f211bb.asReadOnlyBuffer().get());
333 MyJapi.f311bb(MyJapi.f211bb());
334 assert (nf211bb != f211bb.asReadOnlyBuffer().get());
336 out.println(
"\ncalling f312bb(f212bb())");
337 final ByteBuffer f212bb = MyJapi.f212bb().order(ByteOrder.nativeOrder());
338 final byte nf212bb = f212bb.asReadOnlyBuffer().get();
339 MyJapi.f312bb(f212bb);
340 assert (nf212bb == f212bb.asReadOnlyBuffer().get());
341 MyJapi.f312bb(MyJapi.f212bb());
342 assert (nf212bb + 1 == f212bb.asReadOnlyBuffer().get());
344 out.println(
"\ncalling f313bb(f213bb())");
345 final ByteBuffer f213bb = MyJapi.f213bb().order(ByteOrder.nativeOrder());
346 final byte nf213bb = f213bb.asReadOnlyBuffer().get();
347 MyJapi.f313bb(f213bb);
348 assert (nf213bb == f213bb.asReadOnlyBuffer().get());
349 MyJapi.f313bb(MyJapi.f213bb());
350 assert (nf213bb + 1 == f213bb.asReadOnlyBuffer().get());
352 out.println(
"\ncalling f314bb(f214bb())");
353 final ByteBuffer f214bb = MyJapi.f214bb().order(ByteOrder.nativeOrder());
354 final byte nf214bb = f214bb.asReadOnlyBuffer().get();
355 MyJapi.f314bb(f214bb);
356 assert (nf214bb == f214bb.asReadOnlyBuffer().get());
357 MyJapi.f314bb(MyJapi.f214bb());
358 assert (nf214bb + 1 == f214bb.asReadOnlyBuffer().get());
360 out.println(
"\ncalling f315bb(f215bb())");
361 final ByteBuffer f215bb = MyJapi.f215bb().order(ByteOrder.nativeOrder());
362 final short nf215bb = f215bb.asShortBuffer().get();
363 MyJapi.f315bb(f215bb);
364 assert (nf215bb == f215bb.asShortBuffer().get());
365 MyJapi.f315bb(MyJapi.f215bb());
366 assert (nf215bb + 1 == f215bb.asShortBuffer().get());
368 out.println(
"\ncalling f316bb(f216bb())");
369 final ByteBuffer f216bb = MyJapi.f216bb().order(ByteOrder.nativeOrder());
370 final short nf216bb = f216bb.asShortBuffer().get();
371 MyJapi.f316bb(f216bb);
372 assert (nf216bb == f216bb.asShortBuffer().get());
373 MyJapi.f316bb(MyJapi.f216bb());
374 assert (nf216bb + 1 == f216bb.asShortBuffer().get());
376 out.println(
"\ncalling f317bb(f217bb())");
377 final ByteBuffer f217bb = MyJapi.f217bb().order(ByteOrder.nativeOrder());
378 final int nf217bb = f217bb.asIntBuffer().get();
379 MyJapi.f317bb(f217bb);
380 assert (nf217bb == f217bb.asIntBuffer().get());
381 MyJapi.f317bb(MyJapi.f217bb());
382 assert (nf217bb + 1 == f217bb.asIntBuffer().get());
384 out.println(
"\ncalling f318bb(f218bb())");
385 final ByteBuffer f218bb = MyJapi.f218bb().order(ByteOrder.nativeOrder());
386 final int nf218bb = f218bb.asIntBuffer().get();
387 MyJapi.f318bb(f218bb);
388 assert (nf218bb == f218bb.asIntBuffer().get());
389 MyJapi.f318bb(MyJapi.f218bb());
390 assert (nf218bb + 1 == f218bb.asIntBuffer().get());
392 out.println(
"\ncalling f321bb(f221bb())");
393 final ByteBuffer f221bb = MyJapi.f221bb().order(ByteOrder.nativeOrder());
394 final long nf221bb = f221bb.asLongBuffer().get();
395 MyJapi.f321bb(f221bb);
396 assert (nf221bb == f221bb.asLongBuffer().get());
397 MyJapi.f321bb(MyJapi.f221bb());
398 assert (nf221bb + 1 == f221bb.asLongBuffer().get());
400 out.println(
"\ncalling f322bb(f222bb())");
401 final ByteBuffer f222bb = MyJapi.f222bb().order(ByteOrder.nativeOrder());
402 final long nf222bb = f222bb.asLongBuffer().get();
403 MyJapi.f322bb(f222bb);
404 assert (nf222bb == f222bb.asLongBuffer().get());
405 MyJapi.f322bb(MyJapi.f222bb());
406 assert (nf222bb + 1 == f222bb.asLongBuffer().get());
408 out.println(
"\ncalling f323bb(f223bb())");
409 final ByteBuffer f223bb = MyJapi.f223bb().order(ByteOrder.nativeOrder());
410 final float nf223bb = f223bb.asFloatBuffer().get();
411 MyJapi.f323bb(f223bb);
412 assert (nf223bb == f223bb.asFloatBuffer().get());
413 MyJapi.f323bb(MyJapi.f223bb());
414 assert (nf223bb + 1 == f223bb.asFloatBuffer().get());
416 out.println(
"\ncalling f324bb(f224bb())");
417 final ByteBuffer f224bb = MyJapi.f224bb().order(ByteOrder.nativeOrder());
418 final double nf224bb = f224bb.asDoubleBuffer().get();
419 MyJapi.f324bb(f224bb);
420 assert (nf224bb == f224bb.asDoubleBuffer().get());
421 MyJapi.f324bb(MyJapi.f224bb());
422 assert (nf224bb + 1 == f224bb.asDoubleBuffer().get());
424 out.println(
"\ncalling f331bb(f231bb())");
425 final ByteBuffer f231bb = MyJapi.f231bb().order(ByteOrder.nativeOrder());
426 final byte nf231bb = f231bb.asReadOnlyBuffer().get();
427 MyJapi.f331bb(f231bb);
428 assert (nf231bb != f231bb.asReadOnlyBuffer().get());
430 out.println(
"\ncalling f332bb(f232bb())");
431 final ByteBuffer f232bb = MyJapi.f232bb().order(ByteOrder.nativeOrder());
432 final byte nf232bb = f232bb.asReadOnlyBuffer().get();
433 MyJapi.f332bb(f232bb);
434 assert (nf232bb + 1 == f232bb.asReadOnlyBuffer().get());
436 out.println(
"\ncalling f333bb(f233bb())");
437 final ByteBuffer f233bb = MyJapi.f233bb().order(ByteOrder.nativeOrder());
438 final byte nf233bb = f233bb.asReadOnlyBuffer().get();
439 MyJapi.f333bb(f233bb);
440 assert (nf233bb + 1 == f233bb.asReadOnlyBuffer().get());
442 out.println(
"\ncalling f334bb(f234bb())");
443 final ByteBuffer f234bb = MyJapi.f234bb().order(ByteOrder.nativeOrder());
444 final byte nf234bb = f234bb.asReadOnlyBuffer().get();
445 MyJapi.f334bb(f234bb);
446 assert (nf234bb + 1 == f234bb.asReadOnlyBuffer().get());
448 out.println(
"\ncalling f335bb(f235bb())");
449 final ByteBuffer f235bb = MyJapi.f235bb().order(ByteOrder.nativeOrder());
450 final short nf235bb = f235bb.asShortBuffer().get();
451 MyJapi.f335bb(f235bb);
452 assert (nf235bb + 1 == f235bb.asShortBuffer().get());
454 out.println(
"\ncalling f336bb(f236bb())");
455 final ByteBuffer f236bb = MyJapi.f236bb().order(ByteOrder.nativeOrder());
456 final short nf236bb = f236bb.asShortBuffer().get();
457 MyJapi.f336bb(f236bb);
458 assert (nf236bb + 1 == f236bb.asShortBuffer().get());
460 out.println(
"\ncalling f337bb(f237bb())");
461 final ByteBuffer f237bb = MyJapi.f237bb().order(ByteOrder.nativeOrder());
462 final int nf237bb = f237bb.asIntBuffer().get();
463 MyJapi.f337bb(f237bb);
464 assert (nf237bb + 1 == f237bb.asIntBuffer().get());
466 out.println(
"\ncalling f338bb(f238bb())");
467 final ByteBuffer f238bb = MyJapi.f238bb().order(ByteOrder.nativeOrder());
468 final int nf238bb = f238bb.asIntBuffer().get();
469 MyJapi.f338bb(f238bb);
470 assert (nf238bb + 1 == f238bb.asIntBuffer().get());
472 out.println(
"\ncalling f341bb(f241bb())");
473 final ByteBuffer f241bb = MyJapi.f241bb().order(ByteOrder.nativeOrder());
474 final long nf241bb = f241bb.asLongBuffer().get();
475 MyJapi.f341bb(f241bb);
476 assert (nf241bb + 1 == f241bb.asLongBuffer().get());
478 out.println(
"\ncalling f342bb(f242bb())");
479 final ByteBuffer f242bb = MyJapi.f242bb().order(ByteOrder.nativeOrder());
480 final long nf242bb = f242bb.asLongBuffer().get();
481 MyJapi.f342bb(f242bb);
482 assert (nf242bb + 1 == f242bb.asLongBuffer().get());
484 out.println(
"\ncalling f343bb(f243bb())");
485 final ByteBuffer f243bb = MyJapi.f243bb().order(ByteOrder.nativeOrder());
486 final float nf243bb = f243bb.asFloatBuffer().get();
487 MyJapi.f343bb(f243bb);
488 assert (nf243bb + 1 == f243bb.asFloatBuffer().get());
490 out.println(
"\ncalling f344bb(f244bb())");
491 final ByteBuffer f244bb = MyJapi.f244bb().order(ByteOrder.nativeOrder());
492 final double nf244bb = f244bb.asDoubleBuffer().get();
493 MyJapi.f344bb(f244bb);
494 assert (nf244bb + 1 == f244bb.asDoubleBuffer().get());
498 out.println(
"<-- MyJapiTest.test3bb()");
501 static public void test3v() {
502 out.println(
"--> MyJapiTest.test3v()");
504 out.println(
"\ntesting value-copy mappings of references of primitive types");
505 out.println(
"\ncalling MyJapi functions: f3xxv(f2xxv()) ...");
511 out.println(
"\ncalling f337bb(f237bb()); f237v()");
512 final int nf237v0 = MyJapi.f237v();
513 final int[] nf337v = { nf237v0 };
514 MyJapi.f337v(nf337v);
515 assert (nf237v0 + 1 == nf337v[0]);
516 final int nf237v1 = MyJapi.f237v();
517 assert (nf237v1 == nf337v[0]);
520 for (
int i = 0;
i < 2;
i++) {
521 out.println(
"\ncalling f311v(f211v()); f311v(f211v())");
522 final boolean nf211v0 = MyJapi.f211v();
523 MyJapi.f311v(nf211v0);
524 final boolean nf211v1 = MyJapi.f211v();
525 MyJapi.f311v(nf211v1);
526 assert (!nf211v0 == nf211v1);
528 out.println(
"\ncalling f312v(f212v()); f312v(f212v())");
529 final byte nf212v0 = MyJapi.f212v();
530 MyJapi.f312v(nf212v0);
531 final byte nf212v1 = MyJapi.f212v();
532 MyJapi.f312v(nf212v1);
533 assert (nf212v0 + 1 == nf212v1);
535 out.println(
"\ncalling f313v(f213v()); f313v(f213v())");
536 final byte nf213v0 = MyJapi.f213v();
537 MyJapi.f313v(nf213v0);
538 final byte nf213v1 = MyJapi.f213v();
539 MyJapi.f313v(nf213v1);
540 assert (nf213v0 + 1 == nf213v1);
542 out.println(
"\ncalling f314v(f214v()); f314v(f214v())");
543 final byte nf214v0 = MyJapi.f214v();
544 MyJapi.f314v(nf214v0);
545 final byte nf214v1 = MyJapi.f214v();
546 MyJapi.f314v(nf214v1);
547 assert (nf214v0 + 1 == nf214v1);
549 out.println(
"\ncalling f315v(f215v()); f315v(f215v())");
550 final short nf215v0 = MyJapi.f215v();
551 MyJapi.f315v(nf215v0);
552 final short nf215v1 = MyJapi.f215v();
553 MyJapi.f315v(nf215v1);
554 assert (nf215v0 + 1 == nf215v1);
556 out.println(
"\ncalling f316v(f216v()); f316v(f216v())");
557 final short nf216v0 = MyJapi.f216v();
558 MyJapi.f316v(nf216v0);
559 final short nf216v1 = MyJapi.f216v();
560 MyJapi.f316v(nf216v1);
561 assert (nf216v0 + 1 == nf216v1);
563 out.println(
"\ncalling f317v(f217v()); f317v(f217v())");
564 final int nf217v0 = MyJapi.f217v();
565 MyJapi.f317v(nf217v0);
566 final int nf217v1 = MyJapi.f217v();
567 MyJapi.f317v(nf217v1);
568 assert (nf217v0 + 1 == nf217v1);
570 out.println(
"\ncalling f318v(f218v()); f318v(f218v())");
571 final int nf218v0 = MyJapi.f218v();
572 MyJapi.f318v(nf218v0);
573 final int nf218v1 = MyJapi.f218v();
574 MyJapi.f318v(nf218v1);
575 assert (nf218v0 + 1 == nf218v1);
577 out.println(
"\ncalling f321v(f221v()); f321v(f221v())");
578 final long nf221v0 = MyJapi.f221v();
579 MyJapi.f321v(nf221v0);
580 final long nf221v1 = MyJapi.f221v();
581 MyJapi.f321v(nf221v1);
582 assert (nf221v0 + 1 == nf221v1);
584 out.println(
"\ncalling f322v(f222v()); f322v(f222v())");
585 final long nf222v0 = MyJapi.f222v();
586 MyJapi.f322v(nf222v0);
587 final long nf222v1 = MyJapi.f222v();
588 MyJapi.f322v(nf222v1);
589 assert (nf222v0 + 1 == nf222v1);
591 out.println(
"\ncalling f323v(f223v()); f323v(f223v())");
592 final float nf223v0 = MyJapi.f223v();
593 MyJapi.f323v(nf223v0);
594 final float nf223v1 = MyJapi.f223v();
595 MyJapi.f323v(nf223v1);
596 assert (nf223v0 + 1 == nf223v1);
598 out.println(
"\ncalling f324v(f224v()); f324v(f224v())");
599 final double nf224v0 = MyJapi.f224v();
600 MyJapi.f324v(nf224v0);
601 final double nf224v1 = MyJapi.f224v();
602 MyJapi.f324v(nf224v1);
603 assert (nf224v0 + 1 == nf224v1);
606 for (
int i = 0;
i < 2;
i++) {
607 out.println(
"\ncalling f331v(f231v()); f231v()");
608 final boolean nf231v0 = MyJapi.f231v();
609 final boolean[] nf331v = { nf231v0 };
610 MyJapi.f331v(nf331v);
611 assert (!nf231v0 == nf331v[0]);
612 final boolean nf231v1 = MyJapi.f231v();
613 assert (nf231v1 == nf331v[0]);
615 out.println(
"\ncalling f332v(f232v()); f232v()");
616 final byte nf232v0 = MyJapi.f232v();
617 final byte[] nf332v = { nf232v0 };
618 MyJapi.f332v(nf332v);
619 assert (nf232v0 + 1 == nf332v[0]);
620 final byte nf232v1 = MyJapi.f232v();
621 assert (nf232v1 == nf332v[0]);
623 out.println(
"\ncalling f333v(f233v()); f233v()");
624 final byte nf233v0 = MyJapi.f233v();
625 final byte[] nf333v = { nf233v0 };
626 MyJapi.f333v(nf333v);
627 assert (nf233v0 + 1 == nf333v[0]);
628 final byte nf233v1 = MyJapi.f233v();
629 assert (nf233v1 == nf333v[0]);
631 out.println(
"\ncalling f334v(f234v()); f234v()");
632 final byte nf234v0 = MyJapi.f234v();
633 final byte[] nf334v = { nf234v0 };
634 MyJapi.f334v(nf334v);
635 assert (nf234v0 + 1 == nf334v[0]);
636 final byte nf234v1 = MyJapi.f234v();
637 assert (nf234v1 == nf334v[0]);
639 out.println(
"\ncalling f335v(f235v()); f235v()");
640 final short nf235v0 = MyJapi.f235v();
641 final short[] nf335v = { nf235v0 };
642 MyJapi.f335v(nf335v);
643 assert (nf235v0 + 1 == nf335v[0]);
644 final short nf235v1 = MyJapi.f235v();
645 assert (nf235v1 == nf335v[0]);
647 out.println(
"\ncalling f336v(f236v()); f236v()");
648 final short nf236v0 = MyJapi.f236v();
649 final short[] nf336v = { nf236v0 };
650 MyJapi.f336v(nf336v);
651 assert (nf236v0 + 1 == nf336v[0]);
652 final short nf236v1 = MyJapi.f236v();
653 assert (nf236v1 == nf336v[0]);
655 out.println(
"\ncalling f337v(f237v()); f237v()");
656 final int nf237v0 = MyJapi.f237v();
657 final int[] nf337v = { nf237v0 };
658 MyJapi.f337v(nf337v);
659 assert (nf237v0 + 1 == nf337v[0]);
660 final int nf237v1 = MyJapi.f237v();
661 assert (nf237v1 == nf337v[0]);
663 out.println(
"\ncalling f338v(f238v()); f238v()");
664 final int nf238v0 = MyJapi.f238v();
665 final int[] nf338v = { nf238v0 };
666 MyJapi.f338v(nf338v);
667 assert (nf238v0 + 1 == nf338v[0]);
668 final int nf238v1 = MyJapi.f238v();
669 assert (nf238v1 == nf338v[0]);
671 out.println(
"\ncalling f341v(f241v()); f241v()");
672 final long nf241v0 = MyJapi.f241v();
673 final long[] nf341v = { nf241v0 };
674 MyJapi.f341v(nf341v);
675 assert (nf241v0 + 1 == nf341v[0]);
676 final long nf241v1 = MyJapi.f241v();
677 assert (nf241v1 == nf341v[0]);
679 out.println(
"\ncalling f342v(f242v()); f242v()");
680 final long nf242v0 = MyJapi.f242v();
681 final long[] nf342v = { nf242v0 };
682 MyJapi.f342v(nf342v);
683 assert (nf242v0 + 1 == nf342v[0]);
684 final long nf242v1 = MyJapi.f242v();
685 assert (nf242v1 == nf342v[0]);
687 out.println(
"\ncalling f343v(f243v()); f243v()");
688 final float nf243v0 = MyJapi.f243v();
689 final float[] nf343v = { nf243v0 };
690 MyJapi.f343v(nf343v);
691 assert (nf243v0 + 1 == nf343v[0]);
692 final float nf243v1 = MyJapi.f243v();
693 assert (nf243v1 == nf343v[0]);
695 out.println(
"\ncalling f344v(f244v()); f244v()");
696 final double nf244v0 = MyJapi.f244v();
697 final double[] nf344v = { nf244v0 };
698 MyJapi.f344v(nf344v);
699 assert (nf244v0 + 1 == nf344v[0]);
700 final double nf244v1 = MyJapi.f244v();
701 assert (nf244v1 == nf344v[0]);
705 out.println(
"<-- MyJapiTest.test3v()");
708 static public void test4bb0() {
709 out.println(
"--> MyJapiTest.test4bb0()");
711 out.println(
"\ntesting ByteBuffer<size=0> mappings of pointers to primitive types");
712 out.println(
"\ncalling MyJapi functions: f5xxbb0(f4xxbb0()) ...");
720 out.println(
"\ncalling f437bb0()");
721 ByteBuffer bb = MyJapi.f437bb0();
722 out.println(
"bb = " + bb);
723 out.println(
"\ncalling f537bb0()");
727 for (
int i = 0;
i < 2;
i++) {
728 out.println(
"\ncalling f511bb0(f411bb0())");
729 MyJapi.f511bb0(MyJapi.f411bb0());
731 out.println(
"\ncalling f512bb0(f412bb0())");
732 MyJapi.f512bb0(MyJapi.f412bb0());
734 out.println(
"\ncalling f513bb0(f413bb0())");
735 MyJapi.f513bb0(MyJapi.f413bb0());
737 out.println(
"\ncalling f514bb0(f414bb0())");
738 MyJapi.f514bb0(MyJapi.f414bb0());
740 out.println(
"\ncalling f515bb0(f415bb0())");
741 MyJapi.f515bb0(MyJapi.f415bb0());
743 out.println(
"\ncalling f516bb0(f416bb0())");
744 MyJapi.f516bb0(MyJapi.f416bb0());
746 out.println(
"\ncalling f517bb0(f417bb0())");
747 MyJapi.f517bb0(MyJapi.f417bb0());
749 out.println(
"\ncalling f518bb0(f418bb0())");
750 MyJapi.f518bb0(MyJapi.f418bb0());
752 out.println(
"\ncalling f521bb0(f421bb0())");
753 MyJapi.f521bb0(MyJapi.f421bb0());
755 out.println(
"\ncalling f522bb0(f422bb0())");
756 MyJapi.f522bb0(MyJapi.f422bb0());
758 out.println(
"\ncalling f523bb0(f423bb0())");
759 MyJapi.f523bb0(MyJapi.f423bb0());
761 out.println(
"\ncalling f524bb0(f424bb0())");
762 MyJapi.f524bb0(MyJapi.f424bb0());
764 out.println(
"\ncalling f531bb0(f431bb0())");
765 MyJapi.f531bb0(MyJapi.f431bb0());
767 out.println(
"\ncalling f532bb0(f432bb0())");
768 MyJapi.f532bb0(MyJapi.f432bb0());
770 out.println(
"\ncalling f533bb0(f433bb0())");
771 MyJapi.f533bb0(MyJapi.f433bb0());
773 out.println(
"\ncalling f534bb0(f434bb0())");
774 MyJapi.f534bb0(MyJapi.f434bb0());
776 out.println(
"\ncalling f535bb0(f435bb0())");
777 MyJapi.f535bb0(MyJapi.f435bb0());
779 out.println(
"\ncalling f536bb0(f436bb0())");
780 MyJapi.f536bb0(MyJapi.f436bb0());
782 out.println(
"\ncalling f537bb0(f437bb0())");
783 MyJapi.f537bb0(MyJapi.f437bb0());
785 out.println(
"\ncalling f538bb0(f438bb0())");
786 MyJapi.f538bb0(MyJapi.f438bb0());
788 out.println(
"\ncalling f541bb0(f441bb0())");
789 MyJapi.f541bb0(MyJapi.f441bb0());
791 out.println(
"\ncalling f542bb0(f442bb0())");
792 MyJapi.f542bb0(MyJapi.f442bb0());
794 out.println(
"\ncalling f543bb0(f443bb0())");
795 MyJapi.f543bb0(MyJapi.f443bb0());
797 out.println(
"\ncalling f544bb0(f444bb0())");
798 MyJapi.f544bb0(MyJapi.f444bb0());
800 out.println(
"\ncalling f551bb0(f451bb0())");
801 MyJapi.f551bb0(MyJapi.f451bb0());
803 out.println(
"\ncalling f552bb0(f452bb0())");
804 MyJapi.f552bb0(MyJapi.f452bb0());
806 out.println(
"\ncalling f553bb0(f453bb0())");
807 MyJapi.f553bb0(MyJapi.f453bb0());
809 out.println(
"\ncalling f554bb0(f454bb0())");
810 MyJapi.f554bb0(MyJapi.f454bb0());
812 out.println(
"\ncalling f555bb0(f455bb0())");
813 MyJapi.f555bb0(MyJapi.f455bb0());
815 out.println(
"\ncalling f556bb0(f456bb0())");
816 MyJapi.f556bb0(MyJapi.f456bb0());
818 out.println(
"\ncalling f557bb0(f457bb0())");
819 MyJapi.f557bb0(MyJapi.f457bb0());
821 out.println(
"\ncalling f558bb0(f458bb0())");
822 MyJapi.f558bb0(MyJapi.f458bb0());
824 out.println(
"\ncalling f561bb0(f461bb0())");
825 MyJapi.f561bb0(MyJapi.f461bb0());
827 out.println(
"\ncalling f562bb0(f462bb0())");
828 MyJapi.f562bb0(MyJapi.f462bb0());
830 out.println(
"\ncalling f563bb0(f463bb0())");
831 MyJapi.f563bb0(MyJapi.f463bb0());
833 out.println(
"\ncalling f564bb0(f464bb0())");
834 MyJapi.f564bb0(MyJapi.f464bb0());
836 out.println(
"\ncalling f571bb0(f471bb0())");
837 MyJapi.f571bb0(MyJapi.f471bb0());
839 out.println(
"\ncalling f572bb0(f472bb0())");
840 MyJapi.f572bb0(MyJapi.f472bb0());
842 out.println(
"\ncalling f573bb0(f473bb0())");
843 MyJapi.f573bb0(MyJapi.f473bb0());
845 out.println(
"\ncalling f574bb0(f474bb0())");
846 MyJapi.f574bb0(MyJapi.f474bb0());
848 out.println(
"\ncalling f575bb0(f475bb0())");
849 MyJapi.f575bb0(MyJapi.f475bb0());
851 out.println(
"\ncalling f576bb0(f476bb0())");
852 MyJapi.f576bb0(MyJapi.f476bb0());
854 out.println(
"\ncalling f577bb0(f477bb0())");
855 MyJapi.f577bb0(MyJapi.f477bb0());
857 out.println(
"\ncalling f578bb0(f478bb0())");
858 MyJapi.f578bb0(MyJapi.f478bb0());
860 out.println(
"\ncalling f581bb0(f481bb0())");
861 MyJapi.f581bb0(MyJapi.f481bb0());
863 out.println(
"\ncalling f582bb0(f482bb0())");
864 MyJapi.f582bb0(MyJapi.f482bb0());
866 out.println(
"\ncalling f583bb0(f483bb0())");
867 MyJapi.f583bb0(MyJapi.f483bb0());
869 out.println(
"\ncalling f584bb0(f484bb0())");
870 MyJapi.f584bb0(MyJapi.f484bb0());
874 out.println(
"<-- MyJapiTest.test4bb0()");
877 static public void test4bb1() {
878 out.println(
"--> MyJapiTest.test4bb1()");
880 out.println(
"\ntesting ByteBuffer<sizeof(C)> mappings of pointers to primitive types");
881 out.println(
"\ncalling MyJapi functions: f5xxbb1(f4xxbb1()) ...");
889 out.println(
"\ncalling f437bb1()");
890 ByteBuffer bb = MyJapi.f437bb1();
891 out.println(
"bb = " + bb);
892 bb.order(ByteOrder.nativeOrder());
893 IntBuffer ib = bb.asIntBuffer();
894 out.println(
"ib = " + ib);
895 out.println(
"ib.get() = " + ib.get());
896 out.println(
"\ncalling f537bb1()");
900 for (
int i = 0;
i < 2;
i++) {
901 out.println(
"\ncalling f511bb1(f411bb1())");
902 final ByteBuffer f411bb = MyJapi.f411bb1().order(ByteOrder.nativeOrder());
903 final byte nf411bb = f411bb.asReadOnlyBuffer().get();
904 MyJapi.f511bb1(f411bb);
905 assert (nf411bb == f411bb.asReadOnlyBuffer().get());
906 MyJapi.f511bb1(MyJapi.f411bb1());
907 assert (nf411bb != f411bb.asReadOnlyBuffer().get());
909 out.println(
"\ncalling f512bb1(f412bb1())");
910 final ByteBuffer f412bb = MyJapi.f412bb1().order(ByteOrder.nativeOrder());
911 final byte nf412bb = f412bb.asReadOnlyBuffer().get();
912 MyJapi.f512bb1(f412bb);
913 assert (nf412bb == f412bb.asReadOnlyBuffer().get());
914 MyJapi.f512bb1(MyJapi.f412bb1());
915 assert (nf412bb + 1 == f412bb.asReadOnlyBuffer().get());
917 out.println(
"\ncalling f513bb1(f413bb1())");
918 final ByteBuffer f413bb = MyJapi.f413bb1().order(ByteOrder.nativeOrder());
919 final byte nf413bb = f413bb.asReadOnlyBuffer().get();
920 MyJapi.f513bb1(f413bb);
921 assert (nf413bb == f413bb.asReadOnlyBuffer().get());
922 MyJapi.f513bb1(MyJapi.f413bb1());
923 assert (nf413bb + 1 == f413bb.asReadOnlyBuffer().get());
925 out.println(
"\ncalling f514bb1(f414bb1())");
926 final ByteBuffer f414bb = MyJapi.f414bb1().order(ByteOrder.nativeOrder());
927 final byte nf414bb = f414bb.asReadOnlyBuffer().get();
928 MyJapi.f514bb1(f414bb);
929 assert (nf414bb == f414bb.asReadOnlyBuffer().get());
930 MyJapi.f514bb1(MyJapi.f414bb1());
931 assert (nf414bb + 1 == f414bb.asReadOnlyBuffer().get());
933 out.println(
"\ncalling f515bb1(f415bb1())");
934 final ByteBuffer f415bb = MyJapi.f415bb1().order(ByteOrder.nativeOrder());
935 final short nf415bb = f415bb.asShortBuffer().get();
936 MyJapi.f515bb1(f415bb);
937 assert (nf415bb == f415bb.asShortBuffer().get());
938 MyJapi.f515bb1(MyJapi.f415bb1());
939 assert (nf415bb + 1 == f415bb.asShortBuffer().get());
941 out.println(
"\ncalling f516bb1(f416bb1())");
942 final ByteBuffer f416bb = MyJapi.f416bb1().order(ByteOrder.nativeOrder());
943 final short nf416bb = f416bb.asShortBuffer().get();
944 MyJapi.f516bb1(f416bb);
945 assert (nf416bb == f416bb.asShortBuffer().get());
946 MyJapi.f516bb1(MyJapi.f416bb1());
947 assert (nf416bb + 1 == f416bb.asShortBuffer().get());
949 out.println(
"\ncalling f517bb1(f417bb1())");
950 final ByteBuffer f417bb = MyJapi.f417bb1().order(ByteOrder.nativeOrder());
951 final int nf417bb = f417bb.asIntBuffer().get();
952 MyJapi.f517bb1(f417bb);
953 assert (nf417bb == f417bb.asIntBuffer().get());
954 MyJapi.f517bb1(MyJapi.f417bb1());
955 assert (nf417bb + 1 == f417bb.asIntBuffer().get());
957 out.println(
"\ncalling f518bb1(f418bb1())");
958 final ByteBuffer f418bb = MyJapi.f418bb1().order(ByteOrder.nativeOrder());
959 final int nf418bb = f418bb.asIntBuffer().get();
960 MyJapi.f518bb1(f418bb);
961 assert (nf418bb == f418bb.asIntBuffer().get());
962 MyJapi.f518bb1(MyJapi.f418bb1());
963 assert (nf418bb + 1 == f418bb.asIntBuffer().get());
965 out.println(
"\ncalling f521bb1(f421bb1())");
966 final ByteBuffer f421bb = MyJapi.f421bb1().order(ByteOrder.nativeOrder());
967 final long nf421bb = f421bb.asLongBuffer().get();
968 MyJapi.f521bb1(f421bb);
969 assert (nf421bb == f421bb.asLongBuffer().get());
970 MyJapi.f521bb1(MyJapi.f421bb1());
971 assert (nf421bb + 1 == f421bb.asLongBuffer().get());
973 out.println(
"\ncalling f522bb1(f422bb1())");
974 final ByteBuffer f422bb = MyJapi.f422bb1().order(ByteOrder.nativeOrder());
975 final long nf422bb = f422bb.asLongBuffer().get();
976 MyJapi.f522bb1(f422bb);
977 assert (nf422bb == f422bb.asLongBuffer().get());
978 MyJapi.f522bb1(MyJapi.f422bb1());
979 assert (nf422bb + 1 == f422bb.asLongBuffer().get());
981 out.println(
"\ncalling f523bb1(f423bb1())");
982 final ByteBuffer f423bb = MyJapi.f423bb1().order(ByteOrder.nativeOrder());
983 final float nf423bb = f423bb.asFloatBuffer().get();
984 MyJapi.f523bb1(f423bb);
985 assert (nf423bb == f423bb.asFloatBuffer().get());
986 MyJapi.f523bb1(MyJapi.f423bb1());
987 assert (nf423bb + 1 == f423bb.asFloatBuffer().get());
989 out.println(
"\ncalling f524bb1(f424bb1())");
990 final ByteBuffer f424bb = MyJapi.f424bb1().order(ByteOrder.nativeOrder());
991 final double nf424bb = f424bb.asDoubleBuffer().get();
992 MyJapi.f524bb1(f424bb);
993 assert (nf424bb == f424bb.asDoubleBuffer().get());
994 MyJapi.f524bb1(MyJapi.f424bb1());
995 assert (nf424bb + 1 == f424bb.asDoubleBuffer().get());
997 out.println(
"\ncalling f531bb1(f431bb1())");
998 final ByteBuffer f431bb = MyJapi.f431bb1().order(ByteOrder.nativeOrder());
999 final byte nf431bb = f431bb.asReadOnlyBuffer().get();
1000 MyJapi.f531bb1(f431bb);
1001 assert (nf431bb != f431bb.asReadOnlyBuffer().get());
1003 out.println(
"\ncalling f532bb1(f432bb1())");
1004 final ByteBuffer f432bb = MyJapi.f432bb1().order(ByteOrder.nativeOrder());
1005 final byte nf432bb = f432bb.asReadOnlyBuffer().get();
1006 MyJapi.f532bb1(f432bb);
1007 assert (nf432bb + 1 == f432bb.asReadOnlyBuffer().get());
1009 out.println(
"\ncalling f533bb1(f433bb1())");
1010 final ByteBuffer f433bb = MyJapi.f433bb1().order(ByteOrder.nativeOrder());
1011 final byte nf433bb = f433bb.asReadOnlyBuffer().get();
1012 MyJapi.f533bb1(f433bb);
1013 assert (nf433bb + 1 == f433bb.asReadOnlyBuffer().get());
1015 out.println(
"\ncalling f534bb1(f434bb1())");
1016 final ByteBuffer f434bb = MyJapi.f434bb1().order(ByteOrder.nativeOrder());
1017 final byte nf434bb = f434bb.asReadOnlyBuffer().get();
1018 MyJapi.f534bb1(f434bb);
1019 assert (nf434bb + 1 == f434bb.asReadOnlyBuffer().get());
1021 out.println(
"\ncalling f535bb1(f435bb1())");
1022 final ByteBuffer f435bb = MyJapi.f435bb1().order(ByteOrder.nativeOrder());
1023 final short nf435bb = f435bb.asShortBuffer().get();
1024 MyJapi.f535bb1(f435bb);
1025 assert (nf435bb + 1 == f435bb.asShortBuffer().get());
1027 out.println(
"\ncalling f536bb1(f436bb1())");
1028 final ByteBuffer f436bb = MyJapi.f436bb1().order(ByteOrder.nativeOrder());
1029 final short nf436bb = f436bb.asShortBuffer().get();
1030 MyJapi.f536bb1(f436bb);
1031 assert (nf436bb + 1 == f436bb.asShortBuffer().get());
1033 out.println(
"\ncalling f537bb1(f437bb1())");
1034 final ByteBuffer f437bb = MyJapi.f437bb1().order(ByteOrder.nativeOrder());
1035 final int nf437bb = f437bb.asIntBuffer().get();
1036 MyJapi.f537bb1(f437bb);
1037 assert (nf437bb + 1 == f437bb.asIntBuffer().get());
1039 out.println(
"\ncalling f538bb1(f438bb1())");
1040 final ByteBuffer f438bb = MyJapi.f438bb1().order(ByteOrder.nativeOrder());
1041 final int nf438bb = f438bb.asIntBuffer().get();
1042 MyJapi.f538bb1(f438bb);
1043 assert (nf438bb + 1 == f438bb.asIntBuffer().get());
1045 out.println(
"\ncalling f541bb1(f441bb1())");
1046 final ByteBuffer f441bb = MyJapi.f441bb1().order(ByteOrder.nativeOrder());
1047 final long nf441bb = f441bb.asLongBuffer().get();
1048 MyJapi.f541bb1(f441bb);
1049 assert (nf441bb + 1 == f441bb.asLongBuffer().get());
1051 out.println(
"\ncalling f542bb1(f442bb1())");
1052 final ByteBuffer f442bb = MyJapi.f442bb1().order(ByteOrder.nativeOrder());
1053 final long nf442bb = f442bb.asLongBuffer().get();
1054 MyJapi.f542bb1(f442bb);
1055 assert (nf442bb + 1 == f442bb.asLongBuffer().get());
1057 out.println(
"\ncalling f543bb1(f443bb1())");
1058 final ByteBuffer f443bb = MyJapi.f443bb1().order(ByteOrder.nativeOrder());
1059 final float nf443bb = f443bb.asFloatBuffer().get();
1060 MyJapi.f543bb1(f443bb);
1061 assert (nf443bb + 1 == f443bb.asFloatBuffer().get());
1063 out.println(
"\ncalling f544bb1(f444bb1())");
1064 final ByteBuffer f444bb = MyJapi.f444bb1().order(ByteOrder.nativeOrder());
1065 final double nf444bb = f444bb.asDoubleBuffer().get();
1066 MyJapi.f544bb1(f444bb);
1067 assert (nf444bb + 1 == f444bb.asDoubleBuffer().get());
1069 out.println(
"\ncalling f551bb1(f451bb1())");
1070 final ByteBuffer f451bb = MyJapi.f451bb1().order(ByteOrder.nativeOrder());
1071 final byte nf451bb = f451bb.asReadOnlyBuffer().get();
1072 MyJapi.f551bb1(f451bb);
1073 assert (nf451bb == f451bb.asReadOnlyBuffer().get());
1074 MyJapi.f551bb1(MyJapi.f451bb1());
1075 assert (nf451bb != f451bb.asReadOnlyBuffer().get());
1077 out.println(
"\ncalling f552bb1(f452bb1())");
1078 final ByteBuffer f452bb = MyJapi.f452bb1().order(ByteOrder.nativeOrder());
1079 final byte nf452bb = f452bb.asReadOnlyBuffer().get();
1080 MyJapi.f552bb1(f452bb);
1081 assert (nf452bb == f452bb.asReadOnlyBuffer().get());
1082 MyJapi.f552bb1(MyJapi.f452bb1());
1083 assert (nf452bb + 1 == f452bb.asReadOnlyBuffer().get());
1085 out.println(
"\ncalling f553bb1(f453bb1())");
1086 final ByteBuffer f453bb = MyJapi.f453bb1().order(ByteOrder.nativeOrder());
1087 final byte nf453bb = f453bb.asReadOnlyBuffer().get();
1088 MyJapi.f553bb1(f453bb);
1089 assert (nf453bb == f453bb.asReadOnlyBuffer().get());
1090 MyJapi.f553bb1(MyJapi.f453bb1());
1091 assert (nf453bb + 1 == f453bb.asReadOnlyBuffer().get());
1093 out.println(
"\ncalling f554bb1(f454bb1())");
1094 final ByteBuffer f454bb = MyJapi.f454bb1().order(ByteOrder.nativeOrder());
1095 final byte nf454bb = f454bb.asReadOnlyBuffer().get();
1096 MyJapi.f554bb1(f454bb);
1097 assert (nf454bb == f454bb.asReadOnlyBuffer().get());
1098 MyJapi.f554bb1(MyJapi.f454bb1());
1099 assert (nf454bb + 1 == f454bb.asReadOnlyBuffer().get());
1101 out.println(
"\ncalling f555bb1(f455bb1())");
1102 final ByteBuffer f455bb = MyJapi.f455bb1().order(ByteOrder.nativeOrder());
1103 final short nf455bb = f455bb.asShortBuffer().get();
1104 MyJapi.f555bb1(f455bb);
1105 assert (nf455bb == f455bb.asShortBuffer().get());
1106 MyJapi.f555bb1(MyJapi.f455bb1());
1107 assert (nf455bb + 1 == f455bb.asShortBuffer().get());
1109 out.println(
"\ncalling f556bb1(f456bb1())");
1110 final ByteBuffer f456bb = MyJapi.f456bb1().order(ByteOrder.nativeOrder());
1111 final short nf456bb = f456bb.asShortBuffer().get();
1112 MyJapi.f556bb1(f456bb);
1113 assert (nf456bb == f456bb.asShortBuffer().get());
1114 MyJapi.f556bb1(MyJapi.f456bb1());
1115 assert (nf456bb + 1 == f456bb.asShortBuffer().get());
1117 out.println(
"\ncalling f557bb1(f457bb1())");
1118 final ByteBuffer f457bb = MyJapi.f457bb1().order(ByteOrder.nativeOrder());
1119 final int nf457bb = f457bb.asIntBuffer().get();
1120 MyJapi.f557bb1(f457bb);
1121 assert (nf457bb == f457bb.asIntBuffer().get());
1122 MyJapi.f557bb1(MyJapi.f457bb1());
1123 assert (nf457bb + 1 == f457bb.asIntBuffer().get());
1125 out.println(
"\ncalling f558bb1(f458bb1())");
1126 final ByteBuffer f458bb = MyJapi.f458bb1().order(ByteOrder.nativeOrder());
1127 final int nf458bb = f458bb.asIntBuffer().get();
1128 MyJapi.f558bb1(f458bb);
1129 assert (nf458bb == f458bb.asIntBuffer().get());
1130 MyJapi.f558bb1(MyJapi.f458bb1());
1131 assert (nf458bb + 1 == f458bb.asIntBuffer().get());
1133 out.println(
"\ncalling f561bb1(f461bb1())");
1134 final ByteBuffer f461bb = MyJapi.f461bb1().order(ByteOrder.nativeOrder());
1135 final long nf461bb = f461bb.asLongBuffer().get();
1136 MyJapi.f561bb1(f461bb);
1137 assert (nf461bb == f461bb.asLongBuffer().get());
1138 MyJapi.f561bb1(MyJapi.f461bb1());
1139 assert (nf461bb + 1 == f461bb.asLongBuffer().get());
1141 out.println(
"\ncalling f562bb1(f462bb1())");
1142 final ByteBuffer f462bb = MyJapi.f462bb1().order(ByteOrder.nativeOrder());
1143 final long nf462bb = f462bb.asLongBuffer().get();
1144 MyJapi.f562bb1(f462bb);
1145 assert (nf462bb == f462bb.asLongBuffer().get());
1146 MyJapi.f562bb1(MyJapi.f462bb1());
1147 assert (nf462bb + 1 == f462bb.asLongBuffer().get());
1149 out.println(
"\ncalling f563bb1(f463bb1())");
1150 final ByteBuffer f463bb = MyJapi.f463bb1().order(ByteOrder.nativeOrder());
1151 final float nf463bb = f463bb.asFloatBuffer().get();
1152 MyJapi.f563bb1(f463bb);
1153 assert (nf463bb == f463bb.asFloatBuffer().get());
1154 MyJapi.f563bb1(MyJapi.f463bb1());
1155 assert (nf463bb + 1 == f463bb.asFloatBuffer().get());
1157 out.println(
"\ncalling f564bb1(f464bb1())");
1158 final ByteBuffer f464bb = MyJapi.f464bb1().order(ByteOrder.nativeOrder());
1159 final double nf464bb = f464bb.asDoubleBuffer().get();
1160 MyJapi.f564bb1(f464bb);
1161 assert (nf464bb == f464bb.asDoubleBuffer().get());
1162 MyJapi.f564bb1(MyJapi.f464bb1());
1163 assert (nf464bb + 1 == f464bb.asDoubleBuffer().get());
1165 out.println(
"\ncalling f571bb1(f471bb1())");
1166 final ByteBuffer f471bb = MyJapi.f471bb1().order(ByteOrder.nativeOrder());
1167 final byte nf471bb = f471bb.asReadOnlyBuffer().get();
1168 MyJapi.f571bb1(f471bb);
1169 assert (nf471bb != f471bb.asReadOnlyBuffer().get());
1171 out.println(
"\ncalling f572bb1(f472bb1())");
1172 final ByteBuffer f472bb = MyJapi.f472bb1().order(ByteOrder.nativeOrder());
1173 final byte nf472bb = f472bb.asReadOnlyBuffer().get();
1174 MyJapi.f572bb1(f472bb);
1175 assert (nf472bb + 1 == f472bb.asReadOnlyBuffer().get());
1177 out.println(
"\ncalling f573bb1(f473bb1())");
1178 final ByteBuffer f473bb = MyJapi.f473bb1().order(ByteOrder.nativeOrder());
1179 final byte nf473bb = f473bb.asReadOnlyBuffer().get();
1180 MyJapi.f573bb1(f473bb);
1181 assert (nf473bb + 1 == f473bb.asReadOnlyBuffer().get());
1183 out.println(
"\ncalling f574bb1(f474bb1())");
1184 final ByteBuffer f474bb = MyJapi.f474bb1().order(ByteOrder.nativeOrder());
1185 final byte nf474bb = f474bb.asReadOnlyBuffer().get();
1186 MyJapi.f574bb1(f474bb);
1187 assert (nf474bb + 1 == f474bb.asReadOnlyBuffer().get());
1189 out.println(
"\ncalling f575bb1(f475bb1())");
1190 final ByteBuffer f475bb = MyJapi.f475bb1().order(ByteOrder.nativeOrder());
1191 final short nf475bb = f475bb.asShortBuffer().get();
1192 MyJapi.f575bb1(f475bb);
1193 assert (nf475bb + 1 == f475bb.asShortBuffer().get());
1195 out.println(
"\ncalling f576bb1(f476bb1())");
1196 final ByteBuffer f476bb = MyJapi.f476bb1().order(ByteOrder.nativeOrder());
1197 final short nf476bb = f476bb.asShortBuffer().get();
1198 MyJapi.f576bb1(f476bb);
1199 assert (nf476bb + 1 == f476bb.asShortBuffer().get());
1201 out.println(
"\ncalling f577bb1(f477bb1())");
1202 final ByteBuffer f477bb = MyJapi.f477bb1().order(ByteOrder.nativeOrder());
1203 final int nf477bb = f477bb.asIntBuffer().get();
1204 MyJapi.f577bb1(f477bb);
1205 assert (nf477bb + 1 == f477bb.asIntBuffer().get());
1207 out.println(
"\ncalling f578bb1(f478bb1())");
1208 final ByteBuffer f478bb = MyJapi.f478bb1().order(ByteOrder.nativeOrder());
1209 final int nf478bb = f478bb.asIntBuffer().get();
1210 MyJapi.f578bb1(f478bb);
1211 assert (nf478bb + 1 == f478bb.asIntBuffer().get());
1213 out.println(
"\ncalling f581bb1(f481bb1())");
1214 final ByteBuffer f481bb = MyJapi.f481bb1().order(ByteOrder.nativeOrder());
1215 final long nf481bb = f481bb.asLongBuffer().get();
1216 MyJapi.f581bb1(f481bb);
1217 assert (nf481bb + 1 == f481bb.asLongBuffer().get());
1219 out.println(
"\ncalling f582bb1(f482bb1())");
1220 final ByteBuffer f482bb = MyJapi.f482bb1().order(ByteOrder.nativeOrder());
1221 final long nf482bb = f482bb.asLongBuffer().get();
1222 MyJapi.f582bb1(f482bb);
1223 assert (nf482bb + 1 == f482bb.asLongBuffer().get());
1225 out.println(
"\ncalling f583bb1(f483bb1())");
1226 final ByteBuffer f483bb = MyJapi.f483bb1().order(ByteOrder.nativeOrder());
1227 final float nf483bb = f483bb.asFloatBuffer().get();
1228 MyJapi.f583bb1(f483bb);
1229 assert (nf483bb + 1 == f483bb.asFloatBuffer().get());
1231 out.println(
"\ncalling f584bb1(f484bb1())");
1232 final ByteBuffer f484bb = MyJapi.f484bb1().order(ByteOrder.nativeOrder());
1233 final double nf484bb = f484bb.asDoubleBuffer().get();
1234 MyJapi.f584bb1(f484bb);
1235 assert (nf484bb + 1 == f484bb.asDoubleBuffer().get());
1239 out.println(
"<-- MyJapiTest.test4bb1()");
1242 static public void test4v1() {
1243 out.println(
"--> MyJapiTest.test4v1()");
1245 out.println(
"\ntesting array<size=1> mappings of pointers to primitive types");
1246 out.println(
"\ncalling MyJapi functions: f5xxv1(f4xxv1()) ...");
1253 out.println(
"\ncalling f437v1()");
1254 int[] a = MyJapi.f437v1();
1255 out.println(
"a = " + a);
1257 out.println(
"a.length = " + a.length);
1258 assert (a.length == 1);
1259 out.println(
"a[0] = " + a[0]);
1260 final int nf437v1 = a[0];
1262 out.println(
"\ncalling f537v1()");
1264 out.println(
"a = " + a);
1266 out.println(
"a.length = " + a.length);
1267 assert (a.length == 1);
1268 out.println(
"a[0] = " + a[0]);
1269 assert (nf437v1 + 1 == a[0]);
1271 out.println(
"\ncalling f437v1()");
1272 a = MyJapi.f437v1();
1273 out.println(
"a = " + a);
1275 out.println(
"a.length = " + a.length);
1276 assert (a.length == 1);
1277 out.println(
"a[0] = " + a[0]);
1278 assert (nf437v1 + 1 == a[0]);
1281 for (
int i = 0;
i < 2;
i++) {
1282 out.println(
"\ncalling f511v1(f411v1()); f511v1(f411v1())");
1283 final boolean[] nf411v0 = MyJapi.f411v1();
1284 MyJapi.f511v1(nf411v0);
1285 final boolean[] nf411v1 = MyJapi.f411v1();
1286 MyJapi.f511v1(nf411v1);
1287 assert (!nf411v0[0] == nf411v1[0]);
1289 out.println(
"\ncalling f512v1(f412v1()); f512v1(f412v1())");
1290 final byte[] nf412v0 = MyJapi.f412v1();
1291 MyJapi.f512v1(nf412v0);
1292 final byte[] nf412v1 = MyJapi.f412v1();
1293 MyJapi.f512v1(nf412v1);
1294 assert (nf412v0[0] + 1 == nf412v1[0]);
1296 out.println(
"\ncalling f513v1(f413v1()); f513v1(f413v1())");
1297 final byte[] nf413v0 = MyJapi.f413v1();
1298 MyJapi.f513v1(nf413v0);
1299 final byte[] nf413v1 = MyJapi.f413v1();
1300 MyJapi.f513v1(nf413v1);
1301 assert (nf413v0[0] + 1 == nf413v1[0]);
1303 out.println(
"\ncalling f514v1(f414v1()); f514v1(f414v1())");
1304 final byte[] nf414v0 = MyJapi.f414v1();
1305 MyJapi.f514v1(nf414v0);
1306 final byte[] nf414v1 = MyJapi.f414v1();
1307 MyJapi.f514v1(nf414v1);
1308 assert (nf414v0[0] + 1 == nf414v1[0]);
1310 out.println(
"\ncalling f515v1(f415v1()); f515v1(f415v1())");
1311 final short[] nf415v0 = MyJapi.f415v1();
1312 MyJapi.f515v1(nf415v0);
1313 final short[] nf415v1 = MyJapi.f415v1();
1314 MyJapi.f515v1(nf415v1);
1315 assert (nf415v0[0] + 1 == nf415v1[0]);
1317 out.println(
"\ncalling f516v1(f416v1()); f516v1(f416v1())");
1318 final short[] nf416v0 = MyJapi.f416v1();
1319 MyJapi.f516v1(nf416v0);
1320 final short[] nf416v1 = MyJapi.f416v1();
1321 MyJapi.f516v1(nf416v1);
1322 assert (nf416v0[0] + 1 == nf416v1[0]);
1324 out.println(
"\ncalling f517v1(f417v1()); f517v1(f417v1())");
1325 final int[] nf417v0 = MyJapi.f417v1();
1326 MyJapi.f517v1(nf417v0);
1327 final int[] nf417v1 = MyJapi.f417v1();
1328 MyJapi.f517v1(nf417v1);
1329 assert (nf417v0[0] + 1 == nf417v1[0]);
1331 out.println(
"\ncalling f518v1(f418v1()); f518v1(f418v1())");
1332 final int[] nf418v0 = MyJapi.f418v1();
1333 MyJapi.f518v1(nf418v0);
1334 final int[] nf418v1 = MyJapi.f418v1();
1335 MyJapi.f518v1(nf418v1);
1336 assert (nf418v0[0] + 1 == nf418v1[0]);
1338 out.println(
"\ncalling f521v1(f421v1()); f521v1(f421v1())");
1339 final long[] nf421v0 = MyJapi.f421v1();
1340 MyJapi.f521v1(nf421v0);
1341 final long[] nf421v1 = MyJapi.f421v1();
1342 MyJapi.f521v1(nf421v1);
1343 assert (nf421v0[0] + 1 == nf421v1[0]);
1345 out.println(
"\ncalling f522v1(f422v1()); f522v1(f422v1())");
1346 final long[] nf422v0 = MyJapi.f422v1();
1347 MyJapi.f522v1(nf422v0);
1348 final long[] nf422v1 = MyJapi.f422v1();
1349 MyJapi.f522v1(nf422v1);
1350 assert (nf422v0[0] + 1 == nf422v1[0]);
1352 out.println(
"\ncalling f523v1(f423v1()); f523v1(f423v1())");
1353 final float[] nf423v0 = MyJapi.f423v1();
1354 MyJapi.f523v1(nf423v0);
1355 final float[] nf423v1 = MyJapi.f423v1();
1356 MyJapi.f523v1(nf423v1);
1357 assert (nf423v0[0] + 1 == nf423v1[0]);
1359 out.println(
"\ncalling f524v1(f424v1()); f524v1(f424v1())");
1360 final double[] nf424v0 = MyJapi.f424v1();
1361 MyJapi.f524v1(nf424v0);
1362 final double[] nf424v1 = MyJapi.f424v1();
1363 MyJapi.f524v1(nf424v1);
1364 assert (nf424v0[0] + 1 == nf424v1[0]);
1367 for (
int i = 0;
i < 2;
i++) {
1368 out.println(
"\ncalling f531v1(f431v1()); f431v1()");
1369 final boolean[] nf431v0 = MyJapi.f431v1();
1370 MyJapi.f531v1(nf431v0);
1371 final boolean[] nf431v1 = MyJapi.f431v1();
1372 assert (nf431v1[0] == nf431v0[0]);
1374 out.println(
"\ncalling f532v1(f432v1()); f432v1()");
1375 final byte[] nf432v0 = MyJapi.f432v1();
1376 MyJapi.f532v1(nf432v0);
1377 final byte[] nf432v1 = MyJapi.f432v1();
1378 assert (nf432v1[0] == nf432v0[0]);
1380 out.println(
"\ncalling f533v1(f433v1()); f433v1()");
1381 final byte[] nf433v0 = MyJapi.f433v1();
1382 MyJapi.f533v1(nf433v0);
1383 final byte[] nf433v1 = MyJapi.f433v1();
1384 assert (nf433v1[0] == nf433v0[0]);
1386 out.println(
"\ncalling f534v1(f434v1()); f434v1()");
1387 final byte[] nf434v0 = MyJapi.f434v1();
1388 MyJapi.f534v1(nf434v0);
1389 final byte[] nf434v1 = MyJapi.f434v1();
1390 assert (nf434v1[0] == nf434v0[0]);
1392 out.println(
"\ncalling f535v1(f435v1()); f435v1()");
1393 final short[] nf435v0 = MyJapi.f435v1();
1394 MyJapi.f535v1(nf435v0);
1395 final short[] nf435v1 = MyJapi.f435v1();
1396 assert (nf435v1[0] == nf435v0[0]);
1398 out.println(
"\ncalling f536v1(f436v1()); f436v1()");
1399 final short[] nf436v0 = MyJapi.f436v1();
1400 MyJapi.f536v1(nf436v0);
1401 final short[] nf436v1 = MyJapi.f436v1();
1402 assert (nf436v1[0] == nf436v0[0]);
1404 out.println(
"\ncalling f537v1(f437v1()); f437v1()");
1405 final int[] nf437v0 = MyJapi.f437v1();
1406 MyJapi.f537v1(nf437v0);
1407 final int[] nf437v1 = MyJapi.f437v1();
1408 assert (nf437v1[0] == nf437v0[0]);
1410 out.println(
"\ncalling f538v1(f438v1()); f438v1()");
1411 final int[] nf438v0 = MyJapi.f438v1();
1412 MyJapi.f538v1(nf438v0);
1413 final int[] nf438v1 = MyJapi.f438v1();
1414 assert (nf438v1[0] == nf438v0[0]);
1416 out.println(
"\ncalling f541v1(f441v1()); f441v1()");
1417 final long[] nf441v0 = MyJapi.f441v1();
1418 MyJapi.f541v1(nf441v0);
1419 final long[] nf441v1 = MyJapi.f441v1();
1420 assert (nf441v1[0] == nf441v0[0]);
1422 out.println(
"\ncalling f542v1(f442v1()); f442v1()");
1423 final long[] nf442v0 = MyJapi.f442v1();
1424 MyJapi.f542v1(nf442v0);
1425 final long[] nf442v1 = MyJapi.f442v1();
1426 assert (nf442v1[0] == nf442v0[0]);
1428 out.println(
"\ncalling f543v1(f443v1()); f443v1()");
1429 final float[] nf443v0 = MyJapi.f443v1();
1430 MyJapi.f543v1(nf443v0);
1431 final float[] nf443v1 = MyJapi.f443v1();
1432 assert (nf443v1[0] == nf443v0[0]);
1434 out.println(
"\ncalling f544v1(f444v1()); f444v1()");
1435 final double[] nf444v0 = MyJapi.f444v1();
1436 MyJapi.f544v1(nf444v0);
1437 final double[] nf444v1 = MyJapi.f444v1();
1438 assert (nf444v1[0] == nf444v0[0]);
1441 for (
int i = 0;
i < 2;
i++) {
1442 out.println(
"\ncalling f551v1(f451v1()); f551v1(f451v1())");
1443 final boolean[] nf451v0 = MyJapi.f451v1();
1444 MyJapi.f551v1(nf451v0);
1445 final boolean[] nf451v1 = MyJapi.f451v1();
1446 MyJapi.f551v1(nf451v1);
1447 assert (!nf451v0[0] == nf451v1[0]);
1449 out.println(
"\ncalling f552v1(f452v1()); f552v1(f452v1())");
1450 final byte[] nf452v0 = MyJapi.f452v1();
1451 MyJapi.f552v1(nf452v0);
1452 final byte[] nf452v1 = MyJapi.f452v1();
1453 MyJapi.f552v1(nf452v1);
1454 assert (nf452v0[0] + 1 == nf452v1[0]);
1456 out.println(
"\ncalling f553v1(f453v1()); f553v1(f453v1())");
1457 final byte[] nf453v0 = MyJapi.f453v1();
1458 MyJapi.f553v1(nf453v0);
1459 final byte[] nf453v1 = MyJapi.f453v1();
1460 MyJapi.f553v1(nf453v1);
1461 assert (nf453v0[0] + 1 == nf453v1[0]);
1463 out.println(
"\ncalling f554v1(f454v1()); f554v1(f454v1())");
1464 final byte[] nf454v0 = MyJapi.f454v1();
1465 MyJapi.f554v1(nf454v0);
1466 final byte[] nf454v1 = MyJapi.f454v1();
1467 MyJapi.f554v1(nf454v1);
1468 assert (nf454v0[0] + 1 == nf454v1[0]);
1470 out.println(
"\ncalling f555v1(f455v1()); f555v1(f455v1())");
1471 final short[] nf455v0 = MyJapi.f455v1();
1472 MyJapi.f555v1(nf455v0);
1473 final short[] nf455v1 = MyJapi.f455v1();
1474 MyJapi.f555v1(nf455v1);
1475 assert (nf455v0[0] + 1 == nf455v1[0]);
1477 out.println(
"\ncalling f556v1(f456v1()); f556v1(f456v1())");
1478 final short[] nf456v0 = MyJapi.f456v1();
1479 MyJapi.f556v1(nf456v0);
1480 final short[] nf456v1 = MyJapi.f456v1();
1481 MyJapi.f556v1(nf456v1);
1482 assert (nf456v0[0] + 1 == nf456v1[0]);
1484 out.println(
"\ncalling f557v1(f457v1()); f557v1(f457v1())");
1485 final int[] nf457v0 = MyJapi.f457v1();
1486 MyJapi.f557v1(nf457v0);
1487 final int[] nf457v1 = MyJapi.f457v1();
1488 MyJapi.f557v1(nf457v1);
1489 assert (nf457v0[0] + 1 == nf457v1[0]);
1491 out.println(
"\ncalling f558v1(f458v1()); f558v1(f458v1())");
1492 final int[] nf458v0 = MyJapi.f458v1();
1493 MyJapi.f558v1(nf458v0);
1494 final int[] nf458v1 = MyJapi.f458v1();
1495 MyJapi.f558v1(nf458v1);
1496 assert (nf458v0[0] + 1 == nf458v1[0]);
1498 out.println(
"\ncalling f561v1(f461v1()); f561v1(f461v1())");
1499 final long[] nf461v0 = MyJapi.f461v1();
1500 MyJapi.f561v1(nf461v0);
1501 final long[] nf461v1 = MyJapi.f461v1();
1502 MyJapi.f561v1(nf461v1);
1503 assert (nf461v0[0] + 1 == nf461v1[0]);
1505 out.println(
"\ncalling f562v1(f462v1()); f562v1(f462v1())");
1506 final long[] nf462v0 = MyJapi.f462v1();
1507 MyJapi.f562v1(nf462v0);
1508 final long[] nf462v1 = MyJapi.f462v1();
1509 MyJapi.f562v1(nf462v1);
1510 assert (nf462v0[0] + 1 == nf462v1[0]);
1512 out.println(
"\ncalling f563v1(f463v1()); f563v1(f463v1())");
1513 final float[] nf463v0 = MyJapi.f463v1();
1514 MyJapi.f563v1(nf463v0);
1515 final float[] nf463v1 = MyJapi.f463v1();
1516 MyJapi.f563v1(nf463v1);
1517 assert (nf463v0[0] + 1 == nf463v1[0]);
1519 out.println(
"\ncalling f564v1(f464v1()); f564v1(f464v1())");
1520 final double[] nf464v0 = MyJapi.f464v1();
1521 MyJapi.f564v1(nf464v0);
1522 final double[] nf464v1 = MyJapi.f464v1();
1523 MyJapi.f564v1(nf464v1);
1524 assert (nf464v0[0] + 1 == nf464v1[0]);
1527 for (
int i = 0;
i < 2;
i++) {
1528 out.println(
"\ncalling f571v1(f471v1()); f471v1()");
1529 final boolean[] nf471v0 = MyJapi.f471v1();
1530 MyJapi.f571v1(nf471v0);
1531 final boolean[] nf471v1 = MyJapi.f471v1();
1532 assert (nf471v1[0] == nf471v0[0]);
1534 out.println(
"\ncalling f572v1(f472v1()); f472v1()");
1535 final byte[] nf472v0 = MyJapi.f472v1();
1536 MyJapi.f572v1(nf472v0);
1537 final byte[] nf472v1 = MyJapi.f472v1();
1538 assert (nf472v1[0] == nf472v0[0]);
1540 out.println(
"\ncalling f573v1(f473v1()); f473v1()");
1541 final byte[] nf473v0 = MyJapi.f473v1();
1542 MyJapi.f573v1(nf473v0);
1543 final byte[] nf473v1 = MyJapi.f473v1();
1544 assert (nf473v1[0] == nf473v0[0]);
1546 out.println(
"\ncalling f574v1(f474v1()); f474v1()");
1547 final byte[] nf474v0 = MyJapi.f474v1();
1548 MyJapi.f574v1(nf474v0);
1549 final byte[] nf474v1 = MyJapi.f474v1();
1550 assert (nf474v1[0] == nf474v0[0]);
1552 out.println(
"\ncalling f575v1(f475v1()); f475v1()");
1553 final short[] nf475v0 = MyJapi.f475v1();
1554 MyJapi.f575v1(nf475v0);
1555 final short[] nf475v1 = MyJapi.f475v1();
1556 assert (nf475v1[0] == nf475v0[0]);
1558 out.println(
"\ncalling f576v1(f476v1()); f476v1()");
1559 final short[] nf476v0 = MyJapi.f476v1();
1560 MyJapi.f576v1(nf476v0);
1561 final short[] nf476v1 = MyJapi.f476v1();
1562 assert (nf476v1[0] == nf476v0[0]);
1564 out.println(
"\ncalling f577v1(f477v1()); f477v1()");
1565 final int[] nf477v0 = MyJapi.f477v1();
1566 MyJapi.f577v1(nf477v0);
1567 final int[] nf477v1 = MyJapi.f477v1();
1568 assert (nf477v1[0] == nf477v0[0]);
1570 out.println(
"\ncalling f578v1(f478v1()); f478v1()");
1571 final int[] nf478v0 = MyJapi.f478v1();
1572 MyJapi.f578v1(nf478v0);
1573 final int[] nf478v1 = MyJapi.f478v1();
1574 assert (nf478v1[0] == nf478v0[0]);
1576 out.println(
"\ncalling f581v1(f481v1()); f481v1()");
1577 final long[] nf481v0 = MyJapi.f481v1();
1578 MyJapi.f581v1(nf481v0);
1579 final long[] nf481v1 = MyJapi.f481v1();
1580 assert (nf481v1[0] == nf481v0[0]);
1582 out.println(
"\ncalling f582v1(f482v1()); f482v1()");
1583 final long[] nf482v0 = MyJapi.f482v1();
1584 MyJapi.f582v1(nf482v0);
1585 final long[] nf482v1 = MyJapi.f482v1();
1586 assert (nf482v1[0] == nf482v0[0]);
1588 out.println(
"\ncalling f583v1(f483v1()); f483v1()");
1589 final float[] nf483v0 = MyJapi.f483v1();
1590 MyJapi.f583v1(nf483v0);
1591 final float[] nf483v1 = MyJapi.f483v1();
1592 assert (nf483v1[0] == nf483v0[0]);
1594 out.println(
"\ncalling f584v1(f484v1()); f484v1()");
1595 final double[] nf484v0 = MyJapi.f484v1();
1596 MyJapi.f584v1(nf484v0);
1597 final double[] nf484v1 = MyJapi.f484v1();
1598 assert (nf484v1[0] == nf484v0[0]);
1602 out.println(
"<-- MyJapiTest.test4v1()");
1605 static public void test5bb0() {
1606 out.println(
"--> MyJapiTest.test5bb0()");
1608 out.println(
"\ntesting nullable ByteBuffer<size=0> mappings of pointers to primitive types");
1609 out.println(
"\ncalling MyJapi functions: f7xxbb0(f6xxbb0()) ...");
1617 out.println(
"\ncalling f637bb0()");
1618 ByteBuffer bb = MyJapi.f637bb0();
1619 out.println(
"bb = " + bb);
1620 out.println(
"\ncalling f737bb0()");
1624 for (
int i = 0;
i < 2;
i++) {
1625 out.println(
"\ncalling f711bb0(f611bb0())");
1626 MyJapi.f711bb0(MyJapi.f611bb0());
1628 out.println(
"\ncalling f712bb0(f612bb0())");
1629 MyJapi.f712bb0(MyJapi.f612bb0());
1631 out.println(
"\ncalling f713bb0(f613bb0())");
1632 MyJapi.f713bb0(MyJapi.f613bb0());
1634 out.println(
"\ncalling f714bb0(f614bb0())");
1635 MyJapi.f714bb0(MyJapi.f614bb0());
1637 out.println(
"\ncalling f715bb0(f615bb0())");
1638 MyJapi.f715bb0(MyJapi.f615bb0());
1640 out.println(
"\ncalling f716bb0(f616bb0())");
1641 MyJapi.f716bb0(MyJapi.f616bb0());
1643 out.println(
"\ncalling f717bb0(f617bb0())");
1644 MyJapi.f717bb0(MyJapi.f617bb0());
1646 out.println(
"\ncalling f718bb0(f618bb0())");
1647 MyJapi.f718bb0(MyJapi.f618bb0());
1649 out.println(
"\ncalling f721bb0(f621bb0())");
1650 MyJapi.f721bb0(MyJapi.f621bb0());
1652 out.println(
"\ncalling f722bb0(f622bb0())");
1653 MyJapi.f722bb0(MyJapi.f622bb0());
1655 out.println(
"\ncalling f723bb0(f623bb0())");
1656 MyJapi.f723bb0(MyJapi.f623bb0());
1658 out.println(
"\ncalling f724bb0(f624bb0())");
1659 MyJapi.f724bb0(MyJapi.f624bb0());
1661 out.println(
"\ncalling f731bb0(f631bb0())");
1662 MyJapi.f731bb0(MyJapi.f631bb0());
1664 out.println(
"\ncalling f732bb0(f632bb0())");
1665 MyJapi.f732bb0(MyJapi.f632bb0());
1667 out.println(
"\ncalling f733bb0(f633bb0())");
1668 MyJapi.f733bb0(MyJapi.f633bb0());
1670 out.println(
"\ncalling f734bb0(f634bb0())");
1671 MyJapi.f734bb0(MyJapi.f634bb0());
1673 out.println(
"\ncalling f735bb0(f635bb0())");
1674 MyJapi.f735bb0(MyJapi.f635bb0());
1676 out.println(
"\ncalling f736bb0(f636bb0())");
1677 MyJapi.f736bb0(MyJapi.f636bb0());
1679 out.println(
"\ncalling f737bb0(f637bb0())");
1680 MyJapi.f737bb0(MyJapi.f637bb0());
1682 out.println(
"\ncalling f738bb0(f638bb0())");
1683 MyJapi.f738bb0(MyJapi.f638bb0());
1685 out.println(
"\ncalling f741bb0(f641bb0())");
1686 MyJapi.f741bb0(MyJapi.f641bb0());
1688 out.println(
"\ncalling f742bb0(f642bb0())");
1689 MyJapi.f742bb0(MyJapi.f642bb0());
1691 out.println(
"\ncalling f743bb0(f643bb0())");
1692 MyJapi.f743bb0(MyJapi.f643bb0());
1694 out.println(
"\ncalling f744bb0(f644bb0())");
1695 MyJapi.f744bb0(MyJapi.f644bb0());
1697 out.println(
"\ncalling f751bb0(f651bb0())");
1698 MyJapi.f751bb0(MyJapi.f651bb0());
1700 out.println(
"\ncalling f752bb0(f652bb0())");
1701 MyJapi.f752bb0(MyJapi.f652bb0());
1703 out.println(
"\ncalling f753bb0(f653bb0())");
1704 MyJapi.f753bb0(MyJapi.f653bb0());
1706 out.println(
"\ncalling f754bb0(f654bb0())");
1707 MyJapi.f754bb0(MyJapi.f654bb0());
1709 out.println(
"\ncalling f755bb0(f655bb0())");
1710 MyJapi.f755bb0(MyJapi.f655bb0());
1712 out.println(
"\ncalling f756bb0(f656bb0())");
1713 MyJapi.f756bb0(MyJapi.f656bb0());
1715 out.println(
"\ncalling f757bb0(f657bb0())");
1716 MyJapi.f757bb0(MyJapi.f657bb0());
1718 out.println(
"\ncalling f758bb0(f658bb0())");
1719 MyJapi.f758bb0(MyJapi.f658bb0());
1721 out.println(
"\ncalling f761bb0(f661bb0())");
1722 MyJapi.f761bb0(MyJapi.f661bb0());
1724 out.println(
"\ncalling f762bb0(f662bb0())");
1725 MyJapi.f762bb0(MyJapi.f662bb0());
1727 out.println(
"\ncalling f763bb0(f663bb0())");
1728 MyJapi.f763bb0(MyJapi.f663bb0());
1730 out.println(
"\ncalling f764bb0(f664bb0())");
1731 MyJapi.f764bb0(MyJapi.f664bb0());
1733 out.println(
"\ncalling f771bb0(f671bb0())");
1734 MyJapi.f771bb0(MyJapi.f671bb0());
1736 out.println(
"\ncalling f772bb0(f672bb0())");
1737 MyJapi.f772bb0(MyJapi.f672bb0());
1739 out.println(
"\ncalling f773bb0(f673bb0())");
1740 MyJapi.f773bb0(MyJapi.f673bb0());
1742 out.println(
"\ncalling f774bb0(f674bb0())");
1743 MyJapi.f774bb0(MyJapi.f674bb0());
1745 out.println(
"\ncalling f775bb0(f675bb0())");
1746 MyJapi.f775bb0(MyJapi.f675bb0());
1748 out.println(
"\ncalling f776bb0(f676bb0())");
1749 MyJapi.f776bb0(MyJapi.f676bb0());
1751 out.println(
"\ncalling f777bb0(f677bb0())");
1752 MyJapi.f777bb0(MyJapi.f677bb0());
1754 out.println(
"\ncalling f778bb0(f678bb0())");
1755 MyJapi.f778bb0(MyJapi.f678bb0());
1757 out.println(
"\ncalling f781bb0(f681bb0())");
1758 MyJapi.f781bb0(MyJapi.f681bb0());
1760 out.println(
"\ncalling f782bb0(f682bb0())");
1761 MyJapi.f782bb0(MyJapi.f682bb0());
1763 out.println(
"\ncalling f783bb0(f683bb0())");
1764 MyJapi.f783bb0(MyJapi.f683bb0());
1766 out.println(
"\ncalling f784bb0(f684bb0())");
1767 MyJapi.f784bb0(MyJapi.f684bb0());
1771 out.println(
"<-- MyJapiTest.test5bb0()");
1774 static public void test5bb1() {
1775 out.println(
"--> MyJapiTest.test5bb1()");
1777 out.println(
"\ntesting nullable ByteBuffer<sizeof(C)> mappings of pointers to primitive types");
1778 out.println(
"\ncalling MyJapi functions: f7xxbb1(f6xxbb1()) ...");
1786 out.println(
"\ncalling f637bb1()");
1787 ByteBuffer bb = MyJapi.f637bb1();
1788 out.println(
"bb = " + bb);
1789 out.println(
"\ncalling f737bb1()");
1793 for (
int i = 0;
i < 2;
i++) {
1794 out.println(
"\ncalling f711bb1(f611bb1())");
1795 MyJapi.f711bb1(MyJapi.f611bb1());
1797 out.println(
"\ncalling f712bb1(f612bb1())");
1798 MyJapi.f712bb1(MyJapi.f612bb1());
1800 out.println(
"\ncalling f713bb1(f613bb1())");
1801 MyJapi.f713bb1(MyJapi.f613bb1());
1803 out.println(
"\ncalling f714bb1(f614bb1())");
1804 MyJapi.f714bb1(MyJapi.f614bb1());
1806 out.println(
"\ncalling f715bb1(f615bb1())");
1807 MyJapi.f715bb1(MyJapi.f615bb1());
1809 out.println(
"\ncalling f716bb1(f616bb1())");
1810 MyJapi.f716bb1(MyJapi.f616bb1());
1812 out.println(
"\ncalling f717bb1(f617bb1())");
1813 MyJapi.f717bb1(MyJapi.f617bb1());
1815 out.println(
"\ncalling f718bb1(f618bb1())");
1816 MyJapi.f718bb1(MyJapi.f618bb1());
1818 out.println(
"\ncalling f721bb1(f621bb1())");
1819 MyJapi.f721bb1(MyJapi.f621bb1());
1821 out.println(
"\ncalling f722bb1(f622bb1())");
1822 MyJapi.f722bb1(MyJapi.f622bb1());
1824 out.println(
"\ncalling f723bb1(f623bb1())");
1825 MyJapi.f723bb1(MyJapi.f623bb1());
1827 out.println(
"\ncalling f724bb1(f624bb1())");
1828 MyJapi.f724bb1(MyJapi.f624bb1());
1830 out.println(
"\ncalling f731bb1(f631bb1())");
1831 MyJapi.f731bb1(MyJapi.f631bb1());
1833 out.println(
"\ncalling f732bb1(f632bb1())");
1834 MyJapi.f732bb1(MyJapi.f632bb1());
1836 out.println(
"\ncalling f733bb1(f633bb1())");
1837 MyJapi.f733bb1(MyJapi.f633bb1());
1839 out.println(
"\ncalling f734bb1(f634bb1())");
1840 MyJapi.f734bb1(MyJapi.f634bb1());
1842 out.println(
"\ncalling f735bb1(f635bb1())");
1843 MyJapi.f735bb1(MyJapi.f635bb1());
1845 out.println(
"\ncalling f736bb1(f636bb1())");
1846 MyJapi.f736bb1(MyJapi.f636bb1());
1848 out.println(
"\ncalling f737bb1(f637bb1())");
1849 MyJapi.f737bb1(MyJapi.f637bb1());
1851 out.println(
"\ncalling f738bb1(f638bb1())");
1852 MyJapi.f738bb1(MyJapi.f638bb1());
1854 out.println(
"\ncalling f741bb1(f641bb1())");
1855 MyJapi.f741bb1(MyJapi.f641bb1());
1857 out.println(
"\ncalling f742bb1(f642bb1())");
1858 MyJapi.f742bb1(MyJapi.f642bb1());
1860 out.println(
"\ncalling f743bb1(f643bb1())");
1861 MyJapi.f743bb1(MyJapi.f643bb1());
1863 out.println(
"\ncalling f744bb1(f644bb1())");
1864 MyJapi.f744bb1(MyJapi.f644bb1());
1866 out.println(
"\ncalling f751bb1(f651bb1())");
1867 MyJapi.f751bb1(MyJapi.f651bb1());
1869 out.println(
"\ncalling f752bb1(f652bb1())");
1870 MyJapi.f752bb1(MyJapi.f652bb1());
1872 out.println(
"\ncalling f753bb1(f653bb1())");
1873 MyJapi.f753bb1(MyJapi.f653bb1());
1875 out.println(
"\ncalling f754bb1(f654bb1())");
1876 MyJapi.f754bb1(MyJapi.f654bb1());
1878 out.println(
"\ncalling f755bb1(f655bb1())");
1879 MyJapi.f755bb1(MyJapi.f655bb1());
1881 out.println(
"\ncalling f756bb1(f656bb1())");
1882 MyJapi.f756bb1(MyJapi.f656bb1());
1884 out.println(
"\ncalling f757bb1(f657bb1())");
1885 MyJapi.f757bb1(MyJapi.f657bb1());
1887 out.println(
"\ncalling f758bb1(f658bb1())");
1888 MyJapi.f758bb1(MyJapi.f658bb1());
1890 out.println(
"\ncalling f761bb1(f661bb1())");
1891 MyJapi.f761bb1(MyJapi.f661bb1());
1893 out.println(
"\ncalling f762bb1(f662bb1())");
1894 MyJapi.f762bb1(MyJapi.f662bb1());
1896 out.println(
"\ncalling f763bb1(f663bb1())");
1897 MyJapi.f763bb1(MyJapi.f663bb1());
1899 out.println(
"\ncalling f764bb1(f664bb1())");
1900 MyJapi.f764bb1(MyJapi.f664bb1());
1902 out.println(
"\ncalling f771bb1(f671bb1())");
1903 MyJapi.f771bb1(MyJapi.f671bb1());
1905 out.println(
"\ncalling f772bb1(f672bb1())");
1906 MyJapi.f772bb1(MyJapi.f672bb1());
1908 out.println(
"\ncalling f773bb1(f673bb1())");
1909 MyJapi.f773bb1(MyJapi.f673bb1());
1911 out.println(
"\ncalling f774bb1(f674bb1())");
1912 MyJapi.f774bb1(MyJapi.f674bb1());
1914 out.println(
"\ncalling f775bb1(f675bb1())");
1915 MyJapi.f775bb1(MyJapi.f675bb1());
1917 out.println(
"\ncalling f776bb1(f676bb1())");
1918 MyJapi.f776bb1(MyJapi.f676bb1());
1920 out.println(
"\ncalling f777bb1(f677bb1())");
1921 MyJapi.f777bb1(MyJapi.f677bb1());
1923 out.println(
"\ncalling f778bb1(f678bb1())");
1924 MyJapi.f778bb1(MyJapi.f678bb1());
1926 out.println(
"\ncalling f781bb1(f681bb1())");
1927 MyJapi.f781bb1(MyJapi.f681bb1());
1929 out.println(
"\ncalling f782bb1(f682bb1())");
1930 MyJapi.f782bb1(MyJapi.f682bb1());
1932 out.println(
"\ncalling f783bb1(f683bb1())");
1933 MyJapi.f783bb1(MyJapi.f683bb1());
1935 out.println(
"\ncalling f784bb1(f684bb1())");
1936 MyJapi.f784bb1(MyJapi.f684bb1());
1940 out.println(
"<-- MyJapiTest.test5bb1()");
1944 static public void test5v0() {
1945 out.println(
"--> MyJapiTest.test5v0()");
1947 out.println(
"\ntesting nullable array<size=0> mappings of pointers to primitive types");
1948 out.println(
"\ncalling MyJapi functions: f7xxv0(f6xxv0()) ...");
1955 out.println(
"\ncalling f637v0()");
1956 int[] v = MyJapi.f637v0();
1957 out.println(
"v = " + v);
1958 out.println(
"\ncalling f737v0()");
1962 for (
int i = 0;
i < 2;
i++) {
1963 out.println(
"\ncalling f711v0(f611v0())");
1964 MyJapi.f711v0(MyJapi.f611v0());
1966 out.println(
"\ncalling f712v0(f612v0())");
1967 MyJapi.f712v0(MyJapi.f612v0());
1969 out.println(
"\ncalling f713v0(f613v0())");
1970 MyJapi.f713v0(MyJapi.f613v0());
1972 out.println(
"\ncalling f714v0(f614v0())");
1973 MyJapi.f714v0(MyJapi.f614v0());
1975 out.println(
"\ncalling f715v0(f615v0())");
1976 MyJapi.f715v0(MyJapi.f615v0());
1978 out.println(
"\ncalling f716v0(f616v0())");
1979 MyJapi.f716v0(MyJapi.f616v0());
1981 out.println(
"\ncalling f717v0(f617v0())");
1982 MyJapi.f717v0(MyJapi.f617v0());
1984 out.println(
"\ncalling f718v0(f618v0())");
1985 MyJapi.f718v0(MyJapi.f618v0());
1987 out.println(
"\ncalling f721v0(f621v0())");
1988 MyJapi.f721v0(MyJapi.f621v0());
1990 out.println(
"\ncalling f722v0(f622v0())");
1991 MyJapi.f722v0(MyJapi.f622v0());
1993 out.println(
"\ncalling f723v0(f623v0())");
1994 MyJapi.f723v0(MyJapi.f623v0());
1996 out.println(
"\ncalling f724v0(f624v0())");
1997 MyJapi.f724v0(MyJapi.f624v0());
1999 out.println(
"\ncalling f731v0(f631v0())");
2000 MyJapi.f731v0(MyJapi.f631v0());
2002 out.println(
"\ncalling f732v0(f632v0())");
2003 MyJapi.f732v0(MyJapi.f632v0());
2005 out.println(
"\ncalling f733v0(f633v0())");
2006 MyJapi.f733v0(MyJapi.f633v0());
2008 out.println(
"\ncalling f734v0(f634v0())");
2009 MyJapi.f734v0(MyJapi.f634v0());
2011 out.println(
"\ncalling f735v0(f635v0())");
2012 MyJapi.f735v0(MyJapi.f635v0());
2014 out.println(
"\ncalling f736v0(f636v0())");
2015 MyJapi.f736v0(MyJapi.f636v0());
2017 out.println(
"\ncalling f737v0(f637v0())");
2018 MyJapi.f737v0(MyJapi.f637v0());
2020 out.println(
"\ncalling f738v0(f638v0())");
2021 MyJapi.f738v0(MyJapi.f638v0());
2023 out.println(
"\ncalling f741v0(f641v0())");
2024 MyJapi.f741v0(MyJapi.f641v0());
2026 out.println(
"\ncalling f742v0(f642v0())");
2027 MyJapi.f742v0(MyJapi.f642v0());
2029 out.println(
"\ncalling f743v0(f643v0())");
2030 MyJapi.f743v0(MyJapi.f643v0());
2032 out.println(
"\ncalling f744v0(f644v0())");
2033 MyJapi.f744v0(MyJapi.f644v0());
2035 out.println(
"\ncalling f751v0(f651v0())");
2036 MyJapi.f751v0(MyJapi.f651v0());
2038 out.println(
"\ncalling f752v0(f652v0())");
2039 MyJapi.f752v0(MyJapi.f652v0());
2041 out.println(
"\ncalling f753v0(f653v0())");
2042 MyJapi.f753v0(MyJapi.f653v0());
2044 out.println(
"\ncalling f754v0(f654v0())");
2045 MyJapi.f754v0(MyJapi.f654v0());
2047 out.println(
"\ncalling f755v0(f655v0())");
2048 MyJapi.f755v0(MyJapi.f655v0());
2050 out.println(
"\ncalling f756v0(f656v0())");
2051 MyJapi.f756v0(MyJapi.f656v0());
2053 out.println(
"\ncalling f757v0(f657v0())");
2054 MyJapi.f757v0(MyJapi.f657v0());
2056 out.println(
"\ncalling f758v0(f658v0())");
2057 MyJapi.f758v0(MyJapi.f658v0());
2059 out.println(
"\ncalling f761v0(f661v0())");
2060 MyJapi.f761v0(MyJapi.f661v0());
2062 out.println(
"\ncalling f762v0(f662v0())");
2063 MyJapi.f762v0(MyJapi.f662v0());
2065 out.println(
"\ncalling f763v0(f663v0())");
2066 MyJapi.f763v0(MyJapi.f663v0());
2068 out.println(
"\ncalling f764v0(f664v0())");
2069 MyJapi.f764v0(MyJapi.f664v0());
2071 out.println(
"\ncalling f771v0(f671v0())");
2072 MyJapi.f771v0(MyJapi.f671v0());
2074 out.println(
"\ncalling f772v0(f672v0())");
2075 MyJapi.f772v0(MyJapi.f672v0());
2077 out.println(
"\ncalling f773v0(f673v0())");
2078 MyJapi.f773v0(MyJapi.f673v0());
2080 out.println(
"\ncalling f774v0(f674v0())");
2081 MyJapi.f774v0(MyJapi.f674v0());
2083 out.println(
"\ncalling f775v0(f675v0())");
2084 MyJapi.f775v0(MyJapi.f675v0());
2086 out.println(
"\ncalling f776v0(f676v0())");
2087 MyJapi.f776v0(MyJapi.f676v0());
2089 out.println(
"\ncalling f777v0(f677v0())");
2090 MyJapi.f777v0(MyJapi.f677v0());
2092 out.println(
"\ncalling f778v0(f678v0())");
2093 MyJapi.f778v0(MyJapi.f678v0());
2095 out.println(
"\ncalling f781v0(f681v0())");
2096 MyJapi.f781v0(MyJapi.f681v0());
2098 out.println(
"\ncalling f782v0(f682v0())");
2099 MyJapi.f782v0(MyJapi.f682v0());
2101 out.println(
"\ncalling f783v0(f683v0())");
2102 MyJapi.f783v0(MyJapi.f683v0());
2104 out.println(
"\ncalling f784v0(f684v0())");
2105 MyJapi.f784v0(MyJapi.f684v0());
2109 out.println(
"<-- MyJapiTest.test5v0()");
2112 static public void test5v1() {
2113 out.println(
"--> MyJapiTest.test5v1()");
2115 out.println(
"\ntesting nullable array<size=1> mappings of pointers to primitive types");
2116 out.println(
"\ncalling MyJapi functions: f7xxv1(f6xxv1()) ...");
2123 out.println(
"\ncalling f637v1()");
2124 int[] v = MyJapi.f637v1();
2125 out.println(
"v = " + v);
2126 out.println(
"\ncalling f737v1()");
2130 for (
int i = 0;
i < 2;
i++) {
2131 out.println(
"\ncalling f711v1(f611v1())");
2132 MyJapi.f711v1(MyJapi.f611v1());
2134 out.println(
"\ncalling f712v1(f612v1())");
2135 MyJapi.f712v1(MyJapi.f612v1());
2137 out.println(
"\ncalling f713v1(f613v1())");
2138 MyJapi.f713v1(MyJapi.f613v1());
2140 out.println(
"\ncalling f714v1(f614v1())");
2141 MyJapi.f714v1(MyJapi.f614v1());
2143 out.println(
"\ncalling f715v1(f615v1())");
2144 MyJapi.f715v1(MyJapi.f615v1());
2146 out.println(
"\ncalling f716v1(f616v1())");
2147 MyJapi.f716v1(MyJapi.f616v1());
2149 out.println(
"\ncalling f717v1(f617v1())");
2150 MyJapi.f717v1(MyJapi.f617v1());
2152 out.println(
"\ncalling f718v1(f618v1())");
2153 MyJapi.f718v1(MyJapi.f618v1());
2155 out.println(
"\ncalling f721v1(f621v1())");
2156 MyJapi.f721v1(MyJapi.f621v1());
2158 out.println(
"\ncalling f722v1(f622v1())");
2159 MyJapi.f722v1(MyJapi.f622v1());
2161 out.println(
"\ncalling f723v1(f623v1())");
2162 MyJapi.f723v1(MyJapi.f623v1());
2164 out.println(
"\ncalling f724v1(f624v1())");
2165 MyJapi.f724v1(MyJapi.f624v1());
2167 out.println(
"\ncalling f731v1(f631v1())");
2168 MyJapi.f731v1(MyJapi.f631v1());
2170 out.println(
"\ncalling f732v1(f632v1())");
2171 MyJapi.f732v1(MyJapi.f632v1());
2173 out.println(
"\ncalling f733v1(f633v1())");
2174 MyJapi.f733v1(MyJapi.f633v1());
2176 out.println(
"\ncalling f734v1(f634v1())");
2177 MyJapi.f734v1(MyJapi.f634v1());
2179 out.println(
"\ncalling f735v1(f635v1())");
2180 MyJapi.f735v1(MyJapi.f635v1());
2182 out.println(
"\ncalling f736v1(f636v1())");
2183 MyJapi.f736v1(MyJapi.f636v1());
2185 out.println(
"\ncalling f737v1(f637v1())");
2186 MyJapi.f737v1(MyJapi.f637v1());
2188 out.println(
"\ncalling f738v1(f638v1())");
2189 MyJapi.f738v1(MyJapi.f638v1());
2191 out.println(
"\ncalling f741v1(f641v1())");
2192 MyJapi.f741v1(MyJapi.f641v1());
2194 out.println(
"\ncalling f742v1(f642v1())");
2195 MyJapi.f742v1(MyJapi.f642v1());
2197 out.println(
"\ncalling f743v1(f643v1())");
2198 MyJapi.f743v1(MyJapi.f643v1());
2200 out.println(
"\ncalling f744v1(f644v1())");
2201 MyJapi.f744v1(MyJapi.f644v1());
2203 out.println(
"\ncalling f751v1(f651v1())");
2204 MyJapi.f751v1(MyJapi.f651v1());
2206 out.println(
"\ncalling f752v1(f652v1())");
2207 MyJapi.f752v1(MyJapi.f652v1());
2209 out.println(
"\ncalling f753v1(f653v1())");
2210 MyJapi.f753v1(MyJapi.f653v1());
2212 out.println(
"\ncalling f754v1(f654v1())");
2213 MyJapi.f754v1(MyJapi.f654v1());
2215 out.println(
"\ncalling f755v1(f655v1())");
2216 MyJapi.f755v1(MyJapi.f655v1());
2218 out.println(
"\ncalling f756v1(f656v1())");
2219 MyJapi.f756v1(MyJapi.f656v1());
2221 out.println(
"\ncalling f757v1(f657v1())");
2222 MyJapi.f757v1(MyJapi.f657v1());
2224 out.println(
"\ncalling f758v1(f658v1())");
2225 MyJapi.f758v1(MyJapi.f658v1());
2227 out.println(
"\ncalling f761v1(f661v1())");
2228 MyJapi.f761v1(MyJapi.f661v1());
2230 out.println(
"\ncalling f762v1(f662v1())");
2231 MyJapi.f762v1(MyJapi.f662v1());
2233 out.println(
"\ncalling f763v1(f663v1())");
2234 MyJapi.f763v1(MyJapi.f663v1());
2236 out.println(
"\ncalling f764v1(f664v1())");
2237 MyJapi.f764v1(MyJapi.f664v1());
2239 out.println(
"\ncalling f771v1(f671v1())");
2240 MyJapi.f771v1(MyJapi.f671v1());
2242 out.println(
"\ncalling f772v1(f672v1())");
2243 MyJapi.f772v1(MyJapi.f672v1());
2245 out.println(
"\ncalling f773v1(f673v1())");
2246 MyJapi.f773v1(MyJapi.f673v1());
2248 out.println(
"\ncalling f774v1(f674v1())");
2249 MyJapi.f774v1(MyJapi.f674v1());
2251 out.println(
"\ncalling f775v1(f675v1())");
2252 MyJapi.f775v1(MyJapi.f675v1());
2254 out.println(
"\ncalling f776v1(f676v1())");
2255 MyJapi.f776v1(MyJapi.f676v1());
2257 out.println(
"\ncalling f777v1(f677v1())");
2258 MyJapi.f777v1(MyJapi.f677v1());
2260 out.println(
"\ncalling f778v1(f678v1())");
2261 MyJapi.f778v1(MyJapi.f678v1());
2263 out.println(
"\ncalling f781v1(f681v1())");
2264 MyJapi.f781v1(MyJapi.f681v1());
2266 out.println(
"\ncalling f782v1(f682v1())");
2267 MyJapi.f782v1(MyJapi.f682v1());
2269 out.println(
"\ncalling f783v1(f683v1())");
2270 MyJapi.f783v1(MyJapi.f683v1());
2272 out.println(
"\ncalling f784v1(f684v1())");
2273 MyJapi.f784v1(MyJapi.f684v1());
2277 out.println(
"<-- MyJapiTest.test5v1()");
2280 static public void test6() {
2281 out.println(
"--> MyJapiTest.test6()");
2283 out.println(
"\ntesting object mappings: ...");
2286 out.println(
"\ncalling A.create_r()...");
2288 out.println(
"... a = " + a);
2291 out.println(
"\ncalling A.create_p()...");
2292 A ap =
A.create_p();
2293 out.println(
"... a = " + ap);
2296 out.println(
"\ncalling a.f0s()...");
2298 out.println(
"... a.f0s() = " + n);
2301 out.println(
"\ncalling A.f0n(a)...");
2303 out.println(
"... A.f0n(a) = " + n);
2306 out.println(
"\ncalling a.f0v1()...");
2308 out.println(
"... a.f0v() = " + n);
2311 out.println(
"\ncalling A.d0sc()...");
2313 out.println(
"... A.d0sc() = " + n);
2316 out.println(
"\ncalling a.d0sc()...");
2318 out.println(
"... a.d0sc() = " + n);
2321 out.println(
"\ncalling A.d0s(A.d0s() + 1)...");
2323 out.println(
"\n... calling A.d0s()...");
2325 out.println(
"... A.d0s() = " + n);
2328 out.println(
"\ncalling a.d0s(a.d0s() + 1)...");
2330 out.println(
"\n... calling a.d0s()...");
2332 out.println(
"... a.d0s() = " + n);
2335 out.println(
"\ncalling a.d0c()...");
2337 out.println(
"... a.d0c() = " + n);
2340 out.println(
"\ncalling a.d0(a.d0() + 1)...");
2342 out.println(
"\n... calling a.d0()...");
2344 out.println(
"... a.d0() = " + n);
2347 out.println(
"\ncalling B0...");
2349 out.println(
"... B0.f0s() = " + n);
2352 out.println(
"\ncalling a.newB0()...");
2353 B0 b0b0 = a.newB0();
2354 out.println(
"... b0b0 = " + b0b0);
2355 assert (b0b0 != null);
2357 out.println(
"\ncalling b0b0.f0s()...");
2359 out.println(
"... b0b0.f0s() = " + n);
2362 out.println(
"\ncalling B0.f0n(b0b0)...");
2364 out.println(
"... B0.f0n(b0b0) = " + n);
2367 out.println(
"\ncalling b0b0.f0v()...");
2369 out.println(
"... b0b0.f0v() = " + n);
2372 out.println(
"\ncalling B0.d0sc()...");
2374 out.println(
"... B0.d0sc() = " + n);
2377 out.println(
"\ncalling b0b0.d0sc()...");
2379 out.println(
"... b0b0.d0sc() = " + n);
2382 out.println(
"\ncalling B0.d0s(B0.d0s() + 1)...");
2383 B0.d0s(
B0.d0s() + 1);
2384 out.println(
"\n... calling B0.d0s()...");
2386 out.println(
"... B0.d0s() = " + n);
2389 out.println(
"\ncalling b0b0.d0s(b0b0.d0s() + 1)...");
2390 b0b0.d0s(b0b0.d0s() + 1);
2391 out.println(
"\n... calling b0b0.d0s()...");
2393 out.println(
"... b0b0.d0s() = " + n);
2396 out.println(
"\ncalling B0.d0c(b0b0)...");
2398 out.println(
"... B0.d0c(b0b0) = " + n);
2401 out.println(
"\ncalling B0.d0(b0b0, B0.d0(b0b0) + 1)...");
2402 B0.d0(b0b0,
B0.d0(b0b0) + 1);
2403 out.println(
"\n... calling B0.d0(b0b0)...");
2405 out.println(
"... B0.d0(b0b0) = " + n);
2408 out.println(
"\ncalling a.del(b0b0)...");
2411 out.println(
"\ncalling B1.f0s()...");
2413 out.println(
"... B1.f0s() = " + n);
2416 out.println(
"\ncalling a.newB1()...");
2417 B1 b1b1 = a.newB1();
2419 out.println(
"... b0b1 = " + b0b1);
2420 assert (b0b1 != null);
2422 out.println(
"\ncalling b0b1.f0s()...");
2424 out.println(
"... b0b1.f0s() = " + n);
2427 out.println(
"\ncalling B0.f0n(b0b1)...");
2429 out.println(
"... B0.f0n(b0b1) = " + n);
2432 out.println(
"\ncalling b0b1.f0v()...");
2434 out.println(
"... b0b1.f0v() = " + n);
2437 out.println(
"\ncalling B1.d0sc()...");
2439 out.println(
"... B1.d0sc() = " + n);
2442 out.println(
"\ncalling b1b1.d0sc()...");
2444 out.println(
"... b1b1.d0sc() = " + n);
2447 out.println(
"\ncalling B1.d0s(B1.d0s() + 1)...");
2448 B1.d0s(
B1.d0s() + 1);
2449 out.println(
"\n... calling B1.d0s()...");
2451 out.println(
"... B1.d0s() = " + n);
2454 out.println(
"\ncalling b1b1.d0s(b1b1.d0s() + 1)...");
2455 b1b1.d0s(b1b1.d0s() + 1);
2456 out.println(
"\n... calling b1b1.d0s()...");
2458 out.println(
"... b1b1.d0s() = " + n);
2461 out.println(
"\ncalling B1.d0c(b1b1)...");
2463 out.println(
"... B1.d0c(b1b1) = " + n);
2466 out.println(
"\ncalling B1.d0(b1b1, B1.d0(b1b1) + 1)...");
2467 B1.d0(b1b1,
B1.d0(b1b1) + 1);
2468 out.println(
"\n... calling B1.d0(b1b1)...");
2470 out.println(
"... B1.d0(b1b1) = " + n);
2473 out.println(
"\ncalling a.del(b1b1)...");
2476 out.println(
"\ncalling A.print()...");
2479 out.println(
"\ncalling A.delete_r(a)...");
2481 out.println(
"... a = " + a);
2483 out.println(
"\ncalling A.delete_p(ap)...");
2485 out.println(
"... ap = " + ap);
2487 out.println(
"\ncalling A.print()...");
2490 throw new RuntimeException(
"Expected exception not thrown.");
2491 }
catch (AssertionError e) {
2492 out.println(
"... successfully caught: " + e);
2494 out.println(
"\ncalling A.deliver_ptr()...");
2495 A pa =
A.deliver_ptr();
2496 assert (pa != null);
2498 out.println(
"\ncalling A.take_ptr()...");
2501 out.println(
"\ncalling A.deliver_null_ptr()...");
2502 A p0 =
A.deliver_null_ptr();
2503 assert (p0 == null);
2505 out.println(
"\ncalling A.take_null_ptr()...");
2506 A.take_null_ptr(p0);
2508 out.println(
"\ncalling A.deliver_ref()...");
2509 A ra =
A.deliver_ref();
2510 assert (ra != null);
2512 out.println(
"\ncalling A.take_ref()...");
2515 out.println(
"\ncalling A.deliver_null_ref()...");
2517 A.deliver_null_ref();
2518 throw new RuntimeException(
"Expected exception not thrown.");
2519 }
catch (AssertionError e) {
2520 out.println(
"... successfully caught: " + e);
2523 out.println(
"\ncalling A.take_null_ref()...");
2525 A.take_null_ref(null);
2527 }
catch (IllegalArgumentException e) {
2528 out.println(
"... successfully caught: " + e);
2532 out.println(
"<-- MyJapiTest.test6()");
2535 static public void test7s() {
2536 out.println(
"--> MyJapiTest.test7s()");
2538 out.println(
"\ntesting String mappings");
2539 out.println(
"\ncalling MyJapi functions: s1x2(s0x2()) ...");
2541 out.println(
"\ncalling s112s(s012s())");
2542 MyJapi.s112s(MyJapi.s012s());
2544 out.println(
"\ncalling s112s(s052s())");
2545 MyJapi.s112s(MyJapi.s052s());
2547 out.println(
"\ncalling s112s(s032s())");
2548 MyJapi.s112s(MyJapi.s032s());
2550 out.println(
"\ncalling s112s(s072s())");
2551 MyJapi.s112s(MyJapi.s072s());
2553 out.println(
"\ncalling s152s(s012s())");
2554 MyJapi.s152s(MyJapi.s012s());
2556 out.println(
"\ncalling s152s(s052s())");
2557 MyJapi.s152s(MyJapi.s052s());
2559 out.println(
"\ncalling s152s(s032s())");
2560 MyJapi.s152s(MyJapi.s032s());
2562 out.println(
"\ncalling s152s(s072s())");
2563 MyJapi.s152s(MyJapi.s072s());
2566 out.println(
"<-- MyJapiTest.test7s()");
2569 static public void test7bb0() {
2570 out.println(
"--> MyJapiTest.test7bb0()");
2572 out.println(
"\ntesting ByteBuffer<size=0> mappings of void/char pointers");
2573 out.println(
"\ncalling MyJapi functions: s1xxbb0(s0xxbb0()) ...");
2575 out.println(
"\ncalling s110bb0(s010bb0())");
2576 MyJapi.s110bb0(MyJapi.s010bb0());
2578 out.println(
"\ncalling s110bb0(s012bb0())");
2579 MyJapi.s110bb0(MyJapi.s012bb0());
2581 out.println(
"\ncalling s110bb0(s030bb0())");
2582 MyJapi.s110bb0(MyJapi.s030bb0());
2584 out.println(
"\ncalling s110bb0(s032bb0())");
2585 MyJapi.s110bb0(MyJapi.s032bb0());
2587 out.println(
"\ncalling s110bb0(s050bb0())");
2588 MyJapi.s110bb0(MyJapi.s050bb0());
2590 out.println(
"\ncalling s110bb0(s052bb0())");
2591 MyJapi.s110bb0(MyJapi.s052bb0());
2593 out.println(
"\ncalling s110bb0(s070bb0())");
2594 MyJapi.s110bb0(MyJapi.s070bb0());
2596 out.println(
"\ncalling s110bb0(s072bb0())");
2597 MyJapi.s110bb0(MyJapi.s072bb0());
2601 out.println(
"\ncalling s112bb0(s010bb0())");
2602 MyJapi.s112bb0(MyJapi.s010bb0());
2604 out.println(
"\ncalling s112bb0(s012bb0())");
2605 MyJapi.s112bb0(MyJapi.s012bb0());
2607 out.println(
"\ncalling s112bb0(s030bb0())");
2608 MyJapi.s112bb0(MyJapi.s030bb0());
2610 out.println(
"\ncalling s112bb0(s032bb0())");
2611 MyJapi.s112bb0(MyJapi.s032bb0());
2613 out.println(
"\ncalling s112bb0(s050bb0())");
2614 MyJapi.s112bb0(MyJapi.s050bb0());
2616 out.println(
"\ncalling s112bb0(s052bb0())");
2617 MyJapi.s112bb0(MyJapi.s052bb0());
2619 out.println(
"\ncalling s112bb0(s070bb0())");
2620 MyJapi.s112bb0(MyJapi.s070bb0());
2622 out.println(
"\ncalling s112bb0(s072bb0())");
2623 MyJapi.s112bb0(MyJapi.s072bb0());
2627 out.println(
"\ncalling s130bb0(s010bb0())");
2629 MyJapi.s130bb0(MyJapi.s010bb0());
2631 }
catch (ReadOnlyBufferException e) {
2632 out.println(
"... successfully caught: " + e);
2635 out.println(
"\ncalling s130bb0(s012bb0())");
2637 MyJapi.s130bb0(MyJapi.s012bb0());
2639 }
catch (ReadOnlyBufferException e) {
2640 out.println(
"... successfully caught: " + e);
2643 out.println(
"\ncalling s130bb0(s032bb0())");
2644 MyJapi.s130bb0(MyJapi.s032bb0());
2646 out.println(
"\ncalling s130bb0(s030bb0())");
2647 MyJapi.s130bb0(MyJapi.s030bb0());
2649 out.println(
"\ncalling s130bb0(s052bb0())");
2651 MyJapi.s130bb0(MyJapi.s052bb0());
2653 }
catch (ReadOnlyBufferException e) {
2654 out.println(
"... successfully caught: " + e);
2657 out.println(
"\ncalling s130bb0(s050bb0())");
2659 MyJapi.s130bb0(MyJapi.s050bb0());
2661 }
catch (ReadOnlyBufferException e) {
2662 out.println(
"... successfully caught: " + e);
2665 out.println(
"\ncalling s130bb0(s070bb0())");
2666 MyJapi.s130bb0(MyJapi.s070bb0());
2668 out.println(
"\ncalling s130bb0(s072bb0())");
2669 MyJapi.s130bb0(MyJapi.s072bb0());
2673 out.println(
"\ncalling s132bb0(s010bb0())");
2675 MyJapi.s132bb0(MyJapi.s010bb0());
2677 }
catch (ReadOnlyBufferException e) {
2678 out.println(
"... successfully caught: " + e);
2681 out.println(
"\ncalling s132bb0(s012bb0())");
2683 MyJapi.s132bb0(MyJapi.s012bb0());
2685 }
catch (ReadOnlyBufferException e) {
2686 out.println(
"... successfully caught: " + e);
2689 out.println(
"\ncalling s132bb0(s032bb0())");
2690 MyJapi.s132bb0(MyJapi.s032bb0());
2692 out.println(
"\ncalling s132bb0(s030bb0())");
2693 MyJapi.s132bb0(MyJapi.s030bb0());
2695 out.println(
"\ncalling s132bb0(s052bb0())");
2697 MyJapi.s132bb0(MyJapi.s052bb0());
2699 }
catch (ReadOnlyBufferException e) {
2700 out.println(
"... successfully caught: " + e);
2703 out.println(
"\ncalling s132bb0(s050bb0())");
2705 MyJapi.s132bb0(MyJapi.s050bb0());
2707 }
catch (ReadOnlyBufferException e) {
2708 out.println(
"... successfully caught: " + e);
2711 out.println(
"\ncalling s132bb0(s070bb0())");
2712 MyJapi.s132bb0(MyJapi.s070bb0());
2714 out.println(
"\ncalling s132bb0(s072bb0())");
2715 MyJapi.s132bb0(MyJapi.s072bb0());
2719 out.println(
"\ncalling s150bb0(s010bb0())");
2720 MyJapi.s150bb0(MyJapi.s010bb0());
2722 out.println(
"\ncalling s150bb0(s012bb0())");
2723 MyJapi.s150bb0(MyJapi.s012bb0());
2725 out.println(
"\ncalling s150bb0(s030bb0())");
2726 MyJapi.s150bb0(MyJapi.s030bb0());
2728 out.println(
"\ncalling s150bb0(s032bb0())");
2729 MyJapi.s150bb0(MyJapi.s032bb0());
2731 out.println(
"\ncalling s150bb0(s050bb0())");
2732 MyJapi.s150bb0(MyJapi.s050bb0());
2734 out.println(
"\ncalling s150bb0(s052bb0())");
2735 MyJapi.s150bb0(MyJapi.s052bb0());
2737 out.println(
"\ncalling s150bb0(s070bb0())");
2738 MyJapi.s150bb0(MyJapi.s070bb0());
2740 out.println(
"\ncalling s150bb0(s072bb0())");
2741 MyJapi.s150bb0(MyJapi.s072bb0());
2745 out.println(
"\ncalling s152bb0(s010bb0())");
2746 MyJapi.s152bb0(MyJapi.s010bb0());
2748 out.println(
"\ncalling s152bb0(s012bb0())");
2749 MyJapi.s152bb0(MyJapi.s012bb0());
2751 out.println(
"\ncalling s152bb0(s030bb0())");
2752 MyJapi.s152bb0(MyJapi.s030bb0());
2754 out.println(
"\ncalling s152bb0(s032bb0())");
2755 MyJapi.s152bb0(MyJapi.s032bb0());
2757 out.println(
"\ncalling s152bb0(s050bb0())");
2758 MyJapi.s152bb0(MyJapi.s050bb0());
2760 out.println(
"\ncalling s152bb0(s052bb0())");
2761 MyJapi.s152bb0(MyJapi.s052bb0());
2763 out.println(
"\ncalling s152bb0(s070bb0())");
2764 MyJapi.s152bb0(MyJapi.s070bb0());
2766 out.println(
"\ncalling s152bb0(s072bb0())");
2767 MyJapi.s152bb0(MyJapi.s072bb0());
2771 out.println(
"\ncalling s170bb0(s010bb0())");
2773 MyJapi.s170bb0(MyJapi.s010bb0());
2775 }
catch (ReadOnlyBufferException e) {
2776 out.println(
"... successfully caught: " + e);
2779 out.println(
"\ncalling s170bb0(s012bb0())");
2781 MyJapi.s170bb0(MyJapi.s012bb0());
2783 }
catch (ReadOnlyBufferException e) {
2784 out.println(
"... successfully caught: " + e);
2787 out.println(
"\ncalling s170bb0(s032bb0())");
2788 MyJapi.s170bb0(MyJapi.s032bb0());
2790 out.println(
"\ncalling s170bb0(s030bb0())");
2791 MyJapi.s170bb0(MyJapi.s030bb0());
2793 out.println(
"\ncalling s170bb0(s052bb0())");
2795 MyJapi.s170bb0(MyJapi.s052bb0());
2797 }
catch (ReadOnlyBufferException e) {
2798 out.println(
"... successfully caught: " + e);
2801 out.println(
"\ncalling s170bb0(s050bb0())");
2803 MyJapi.s170bb0(MyJapi.s050bb0());
2805 }
catch (ReadOnlyBufferException e) {
2806 out.println(
"... successfully caught: " + e);
2809 out.println(
"\ncalling s170bb0(s070bb0())");
2810 MyJapi.s170bb0(MyJapi.s070bb0());
2812 out.println(
"\ncalling s170bb0(s072bb0())");
2813 MyJapi.s170bb0(MyJapi.s072bb0());
2817 out.println(
"\ncalling s172bb0(s010bb0())");
2819 MyJapi.s172bb0(MyJapi.s010bb0());
2821 }
catch (ReadOnlyBufferException e) {
2822 out.println(
"... successfully caught: " + e);
2825 out.println(
"\ncalling s172bb0(s012bb0())");
2827 MyJapi.s172bb0(MyJapi.s012bb0());
2829 }
catch (ReadOnlyBufferException e) {
2830 out.println(
"... successfully caught: " + e);
2833 out.println(
"\ncalling s172bb0(s032bb0())");
2834 MyJapi.s172bb0(MyJapi.s032bb0());
2836 out.println(
"\ncalling s172bb0(s030bb0())");
2837 MyJapi.s172bb0(MyJapi.s030bb0());
2839 out.println(
"\ncalling s172bb0(s052bb0())");
2841 MyJapi.s172bb0(MyJapi.s052bb0());
2843 }
catch (ReadOnlyBufferException e) {
2844 out.println(
"... successfully caught: " + e);
2847 out.println(
"\ncalling s172bb0(s050bb0())");
2849 MyJapi.s172bb0(MyJapi.s050bb0());
2851 }
catch (ReadOnlyBufferException e) {
2852 out.println(
"... successfully caught: " + e);
2855 out.println(
"\ncalling s172bb0(s070bb0())");
2856 MyJapi.s172bb0(MyJapi.s070bb0());
2858 out.println(
"\ncalling s172bb0(s072bb0())");
2859 MyJapi.s172bb0(MyJapi.s072bb0());
2864 out.println(
"<-- MyJapiTest.test7bb0()");
2867 static public void test7bb1() {
2868 out.println(
"--> MyJapiTest.test7bb1()");
2870 out.println(
"\ntesting ByteBuffer<size=1> mappings of void/char pointers");
2871 out.println(
"\ncalling MyJapi functions: s1xxbb1(s0xxbb1()) ...");
2873 out.println(
"\ncalling s110bb1(s010bb1())");
2874 MyJapi.s110bb1(MyJapi.s010bb1());
2876 out.println(
"\ncalling s110bb1(s012bb1())");
2877 MyJapi.s110bb1(MyJapi.s012bb1());
2879 out.println(
"\ncalling s110bb1(s030bb1())");
2880 MyJapi.s110bb1(MyJapi.s030bb1());
2882 out.println(
"\ncalling s110bb1(s032bb1())");
2883 MyJapi.s110bb1(MyJapi.s032bb1());
2885 out.println(
"\ncalling s110bb1(s050bb1())");
2886 MyJapi.s110bb1(MyJapi.s050bb1());
2888 out.println(
"\ncalling s110bb1(s052bb1())");
2889 MyJapi.s110bb1(MyJapi.s052bb1());
2891 out.println(
"\ncalling s110bb1(s070bb1())");
2892 MyJapi.s110bb1(MyJapi.s070bb1());
2894 out.println(
"\ncalling s110bb1(s072bb1())");
2895 MyJapi.s110bb1(MyJapi.s072bb1());
2899 out.println(
"\ncalling s112bb1(s010bb1())");
2900 MyJapi.s112bb1(MyJapi.s010bb1());
2902 out.println(
"\ncalling s112bb1(s012bb1())");
2903 MyJapi.s112bb1(MyJapi.s012bb1());
2905 out.println(
"\ncalling s112bb1(s030bb1())");
2906 MyJapi.s112bb1(MyJapi.s030bb1());
2908 out.println(
"\ncalling s112bb1(s032bb1())");
2909 MyJapi.s112bb1(MyJapi.s032bb1());
2911 out.println(
"\ncalling s112bb1(s050bb1())");
2912 MyJapi.s112bb1(MyJapi.s050bb1());
2914 out.println(
"\ncalling s112bb1(s052bb1())");
2915 MyJapi.s112bb1(MyJapi.s052bb1());
2917 out.println(
"\ncalling s112bb1(s070bb1())");
2918 MyJapi.s112bb1(MyJapi.s070bb1());
2920 out.println(
"\ncalling s112bb1(s072bb1())");
2921 MyJapi.s112bb1(MyJapi.s072bb1());
2925 out.println(
"\ncalling s130bb1(s010bb1())");
2927 MyJapi.s130bb1(MyJapi.s010bb1());
2929 }
catch (ReadOnlyBufferException e) {
2930 out.println(
"... successfully caught: " + e);
2933 out.println(
"\ncalling s130bb1(s012bb1())");
2935 MyJapi.s130bb1(MyJapi.s012bb1());
2937 }
catch (ReadOnlyBufferException e) {
2938 out.println(
"... successfully caught: " + e);
2941 out.println(
"\ncalling s130bb1(s032bb1())");
2942 MyJapi.s130bb1(MyJapi.s032bb1());
2944 out.println(
"\ncalling s130bb1(s030bb1())");
2945 MyJapi.s130bb1(MyJapi.s030bb1());
2947 out.println(
"\ncalling s130bb1(s052bb1())");
2949 MyJapi.s130bb1(MyJapi.s052bb1());
2951 }
catch (ReadOnlyBufferException e) {
2952 out.println(
"... successfully caught: " + e);
2955 out.println(
"\ncalling s130bb1(s050bb1())");
2957 MyJapi.s130bb1(MyJapi.s050bb1());
2959 }
catch (ReadOnlyBufferException e) {
2960 out.println(
"... successfully caught: " + e);
2963 out.println(
"\ncalling s130bb1(s070bb1())");
2964 MyJapi.s130bb1(MyJapi.s070bb1());
2966 out.println(
"\ncalling s130bb1(s072bb1())");
2967 MyJapi.s130bb1(MyJapi.s072bb1());
2971 out.println(
"\ncalling s132bb1(s010bb1())");
2973 MyJapi.s132bb1(MyJapi.s010bb1());
2975 }
catch (ReadOnlyBufferException e) {
2976 out.println(
"... successfully caught: " + e);
2979 out.println(
"\ncalling s132bb1(s012bb1())");
2981 MyJapi.s132bb1(MyJapi.s012bb1());
2983 }
catch (ReadOnlyBufferException e) {
2984 out.println(
"... successfully caught: " + e);
2987 out.println(
"\ncalling s132bb1(s032bb1())");
2988 MyJapi.s132bb1(MyJapi.s032bb1());
2990 out.println(
"\ncalling s132bb1(s030bb1())");
2991 MyJapi.s132bb1(MyJapi.s030bb1());
2993 out.println(
"\ncalling s132bb1(s052bb1())");
2995 MyJapi.s132bb1(MyJapi.s052bb1());
2997 }
catch (ReadOnlyBufferException e) {
2998 out.println(
"... successfully caught: " + e);
3001 out.println(
"\ncalling s132bb1(s050bb1())");
3003 MyJapi.s132bb1(MyJapi.s050bb1());
3005 }
catch (ReadOnlyBufferException e) {
3006 out.println(
"... successfully caught: " + e);
3009 out.println(
"\ncalling s132bb1(s070bb1())");
3010 MyJapi.s132bb1(MyJapi.s070bb1());
3012 out.println(
"\ncalling s132bb1(s072bb1())");
3013 MyJapi.s132bb1(MyJapi.s072bb1());
3017 out.println(
"\ncalling s150bb1(s010bb1())");
3018 MyJapi.s150bb1(MyJapi.s010bb1());
3020 out.println(
"\ncalling s150bb1(s012bb1())");
3021 MyJapi.s150bb1(MyJapi.s012bb1());
3023 out.println(
"\ncalling s150bb1(s030bb1())");
3024 MyJapi.s150bb1(MyJapi.s030bb1());
3026 out.println(
"\ncalling s150bb1(s032bb1())");
3027 MyJapi.s150bb1(MyJapi.s032bb1());
3029 out.println(
"\ncalling s150bb1(s050bb1())");
3030 MyJapi.s150bb1(MyJapi.s050bb1());
3032 out.println(
"\ncalling s150bb1(s052bb1())");
3033 MyJapi.s150bb1(MyJapi.s052bb1());
3035 out.println(
"\ncalling s150bb1(s070bb1())");
3036 MyJapi.s150bb1(MyJapi.s070bb1());
3038 out.println(
"\ncalling s150bb1(s072bb1())");
3039 MyJapi.s150bb1(MyJapi.s072bb1());
3043 out.println(
"\ncalling s152bb1(s010bb1())");
3044 MyJapi.s152bb1(MyJapi.s010bb1());
3046 out.println(
"\ncalling s152bb1(s012bb1())");
3047 MyJapi.s152bb1(MyJapi.s012bb1());
3049 out.println(
"\ncalling s152bb1(s030bb1())");
3050 MyJapi.s152bb1(MyJapi.s030bb1());
3052 out.println(
"\ncalling s152bb1(s032bb1())");
3053 MyJapi.s152bb1(MyJapi.s032bb1());
3055 out.println(
"\ncalling s152bb1(s050bb1())");
3056 MyJapi.s152bb1(MyJapi.s050bb1());
3058 out.println(
"\ncalling s152bb1(s052bb1())");
3059 MyJapi.s152bb1(MyJapi.s052bb1());
3061 out.println(
"\ncalling s152bb1(s070bb1())");
3062 MyJapi.s152bb1(MyJapi.s070bb1());
3064 out.println(
"\ncalling s152bb1(s072bb1())");
3065 MyJapi.s152bb1(MyJapi.s072bb1());
3069 out.println(
"\ncalling s170bb1(s010bb1())");
3071 MyJapi.s170bb1(MyJapi.s010bb1());
3073 }
catch (ReadOnlyBufferException e) {
3074 out.println(
"... successfully caught: " + e);
3077 out.println(
"\ncalling s170bb1(s012bb1())");
3079 MyJapi.s170bb1(MyJapi.s012bb1());
3081 }
catch (ReadOnlyBufferException e) {
3082 out.println(
"... successfully caught: " + e);
3085 out.println(
"\ncalling s170bb1(s032bb1())");
3086 MyJapi.s170bb1(MyJapi.s032bb1());
3088 out.println(
"\ncalling s170bb1(s030bb1())");
3089 MyJapi.s170bb1(MyJapi.s030bb1());
3091 out.println(
"\ncalling s170bb1(s052bb1())");
3093 MyJapi.s170bb1(MyJapi.s052bb1());
3095 }
catch (ReadOnlyBufferException e) {
3096 out.println(
"... successfully caught: " + e);
3099 out.println(
"\ncalling s170bb1(s050bb1())");
3101 MyJapi.s170bb1(MyJapi.s050bb1());
3103 }
catch (ReadOnlyBufferException e) {
3104 out.println(
"... successfully caught: " + e);
3107 out.println(
"\ncalling s170bb1(s070bb1())");
3108 MyJapi.s170bb1(MyJapi.s070bb1());
3110 out.println(
"\ncalling s170bb1(s072bb1())");
3111 MyJapi.s170bb1(MyJapi.s072bb1());
3115 out.println(
"\ncalling s172bb1(s010bb1())");
3117 MyJapi.s172bb1(MyJapi.s010bb1());
3119 }
catch (ReadOnlyBufferException e) {
3120 out.println(
"... successfully caught: " + e);
3123 out.println(
"\ncalling s172bb1(s012bb1())");
3125 MyJapi.s172bb1(MyJapi.s012bb1());
3127 }
catch (ReadOnlyBufferException e) {
3128 out.println(
"... successfully caught: " + e);
3131 out.println(
"\ncalling s172bb1(s032bb1())");
3132 MyJapi.s172bb1(MyJapi.s032bb1());
3134 out.println(
"\ncalling s172bb1(s030bb1())");
3135 MyJapi.s172bb1(MyJapi.s030bb1());
3137 out.println(
"\ncalling s172bb1(s052bb1())");
3139 MyJapi.s172bb1(MyJapi.s052bb1());
3141 }
catch (ReadOnlyBufferException e) {
3142 out.println(
"... successfully caught: " + e);
3145 out.println(
"\ncalling s172bb1(s050bb1())");
3147 MyJapi.s172bb1(MyJapi.s050bb1());
3149 }
catch (ReadOnlyBufferException e) {
3150 out.println(
"... successfully caught: " + e);
3153 out.println(
"\ncalling s172bb1(s070bb1())");
3154 MyJapi.s172bb1(MyJapi.s070bb1());
3156 out.println(
"\ncalling s172bb1(s072bb1())");
3157 MyJapi.s172bb1(MyJapi.s072bb1());
3162 out.println(
"<-- MyJapiTest.test7bb1()");
3165 static public void test7bb() {
3166 out.println(
"--> MyJapiTest.test7bb()");
3168 out.println(
"\ntesting ByteBuffer<size=0> mappings of null-allowed void/char pointers");
3169 out.println(
"\ncalling MyJapi functions: s3xxbb(s2xxbb()) ...");
3173 out.println(
"\ncalling s310bb(s210bb())");
3174 MyJapi.s310bb(MyJapi.s210bb());
3176 out.println(
"\ncalling s312bb(s212bb())");
3177 MyJapi.s312bb(MyJapi.s212bb());
3179 out.println(
"\ncalling s330bb(s230bb())");
3180 MyJapi.s330bb(MyJapi.s230bb());
3182 out.println(
"\ncalling s332bb(s232bb())");
3183 MyJapi.s332bb(MyJapi.s232bb());
3185 out.println(
"\ncalling s350bb(s250bb())");
3186 MyJapi.s350bb(MyJapi.s250bb());
3188 out.println(
"\ncalling s352bb(s252bb())");
3189 MyJapi.s352bb(MyJapi.s252bb());
3191 out.println(
"\ncalling s370bb(s270bb())");
3192 MyJapi.s370bb(MyJapi.s270bb());
3194 out.println(
"\ncalling s372bb(s272bb())");
3195 MyJapi.s372bb(MyJapi.s272bb());
3199 final ByteBuffer bbd0 = ByteBuffer.allocateDirect(0);
3200 out.println(
"\ncalling s310bb(ByteBuffer.allocateDirect(0))");
3201 MyJapi.s310bb(bbd0);
3203 out.println(
"\ncalling s312bb(ByteBuffer.allocateDirect(0))");
3204 MyJapi.s312bb(bbd0);
3206 out.println(
"\ncalling s330bb(ByteBuffer.allocateDirect(0))");
3207 MyJapi.s330bb(bbd0);
3209 out.println(
"\ncalling s332bb(ByteBuffer.allocateDirect(0))");
3210 MyJapi.s332bb(bbd0);
3212 out.println(
"\ncalling s350bb(ByteBuffer.allocateDirect(0))");
3213 MyJapi.s350bb(bbd0);
3215 out.println(
"\ncalling s352bb(ByteBuffer.allocateDirect(0))");
3216 MyJapi.s352bb(bbd0);
3218 out.println(
"\ncalling s370bb(ByteBuffer.allocateDirect(0))");
3219 MyJapi.s370bb(bbd0);
3221 out.println(
"\ncalling s372bb(ByteBuffer.allocateDirect(0))");
3222 MyJapi.s372bb(bbd0);
3226 final ByteBuffer bbd0ro = bbd0.asReadOnlyBuffer();
3227 out.println(
"\ncalling s310bb(ByteBuffer.allocateDirect(0))");
3228 MyJapi.s310bb(bbd0ro);
3230 out.println(
"\ncalling s312bb(ByteBuffer.allocateDirect(0))");
3231 MyJapi.s312bb(bbd0ro);
3233 out.println(
"\ncalling s330bb(ByteBuffer.allocateDirect(0))");
3235 MyJapi.s330bb(bbd0ro);
3237 }
catch (ReadOnlyBufferException e) {
3238 out.println(
"... successfully caught: " + e);
3241 out.println(
"\ncalling s332bb(ByteBuffer.allocateDirect(0))");
3243 MyJapi.s332bb(bbd0ro);
3245 }
catch (ReadOnlyBufferException e) {
3246 out.println(
"... successfully caught: " + e);
3249 out.println(
"\ncalling s350bb(ByteBuffer.allocateDirect(0))");
3250 MyJapi.s350bb(bbd0ro);
3252 out.println(
"\ncalling s352bb(ByteBuffer.allocateDirect(0))");
3253 MyJapi.s352bb(bbd0ro);
3255 out.println(
"\ncalling s370bb(ByteBuffer.allocateDirect(0))");
3257 MyJapi.s370bb(bbd0ro);
3259 }
catch (ReadOnlyBufferException e) {
3260 out.println(
"... successfully caught: " + e);
3263 out.println(
"\ncalling s372bb(ByteBuffer.allocateDirect(0))");
3265 MyJapi.s372bb(bbd0ro);
3267 }
catch (ReadOnlyBufferException e) {
3268 out.println(
"... successfully caught: " + e);
3274 out.println(
"<-- MyJapiTest.test7bb()");
3277 static public void test8() {
3278 out.println(
"--> MyJapiTest.test8()");
3280 out.println(
"\ntesting n-ary functions: g(), h() ...");
3283 out.println(
"\ncalling A.create_r(int)...");
3284 A a =
A.create_r(5);
3285 out.println(
"... a = " + a);
3288 out.println(
"\ncalling A.create_p(int)...");
3289 A ap =
A.create_p(5);
3290 out.println(
"... ap = " + ap);
3291 assert (ap != null);
3293 out.println(
"\ncalling A.h0()...");
3296 out.println(
"\ncalling A.h1(byte)...");
3299 out.println(
"\ncalling A.h2(byte), short)...");
3300 A.h2((byte)1, (
short)2);
3302 out.println(
"\ncalling A.h3(byte), short, int)...");
3303 A.h3((byte)1, (
short)2, (
int)3);
3305 out.println(
"\ncalling A.h0r()...");
3309 out.println(
"\ncalling A.h1r(byte)...");
3313 out.println(
"\ncalling A.h2r(byte, short)...");
3314 n =
A.h2r((byte)1, (
short)2);
3317 out.println(
"\ncalling A.h3r(byte, short, int)...");
3318 n =
A.h3r((byte)1, (
short)2, (
int)3);
3321 out.println(
"\ncalling a.g0c()...");
3324 out.println(
"\ncalling a.g1c(byte)...");
3327 out.println(
"\ncalling a.g2c(byte, short)...");
3328 a.g2c((byte)1, (
short)2);
3330 out.println(
"\ncalling a.g3c(byte, short, int)...");
3331 a.g3c((byte)1, (
short)2, (
int)3);
3333 out.println(
"\ncalling a.g0()...");
3336 out.println(
"\ncalling a.g1(byte)...");
3339 out.println(
"\ncalling a.g2(byte, short)...");
3340 a.g2((byte)1, (
short)2);
3342 out.println(
"\ncalling a.g3(byte, short, int)...");
3343 a.g3((byte)1, (
short)2, (
int)3);
3345 out.println(
"\ncalling n = a.g0rc()...");
3349 out.println(
"\ncalling n = a.g1rc(byte)...");
3350 n = a.g1rc((byte)1);
3353 out.println(
"\ncalling n = a.g2rc(byte, short)...");
3354 n = a.g2rc((byte)1, (
short)2);
3357 out.println(
"\ncalling n = a.g3rc(byte, short, int)...");
3358 n = a.g3rc((byte)1, (
short)2, (
int)3);
3361 out.println(
"\ncalling n = a.g0r()...");
3365 out.println(
"\ncalling n = a.g1r(byte)...");
3369 out.println(
"\ncalling n = a.g2r(byte, short)...");
3370 n = a.g2r((byte)1, (
short)2);
3373 out.println(
"\ncalling n = a.g3r(byte, short, int)...");
3374 n = a.g3r((byte)1, (
short)2, (
int)3);
3377 out.println(
"\ncalling A.delete_p(a)...");
3379 out.println(
"... a = " + a);
3381 out.println(
"\ncalling A.delete_r(ap)...");
3383 out.println(
"... ap = " + ap);
3386 out.println(
"<-- MyJapiTest.test8()");
3389 static public void test9() {
3390 out.println(
"--> MyJapiTest.test9()");
3392 out.println(
"\ntesting const/inheritance mapping ...");
3395 out.println(
"\ncalling C0.c() ...");
3396 final CI.C0 c0 = CI.C0.c();
3398 out.println(
"\ncalling C0.cc() ...");
3399 final CI.C0C c0c = CI.C0.cc();
3401 out.println(
"\ncalling C1.c() ...");
3402 final CI.C1 c1 = CI.C1.c();
3404 out.println(
"\ncalling C1.cc() ...");
3405 final CI.C1C c1c = CI.C1.cc();
3409 out.println(
"\nc0.print()...");
3412 out.println(
"\nc0c.print()...");
3415 out.println(
"\nc1.print()...");
3418 out.println(
"\nc1c.print()...");
3423 out.println(
"\nc0c.take_C0Cp(c0c.deliver_C0Cp())...");
3424 c0c.take_C0Cp(c0c.deliver_C0Cp());
3426 out.println(
"\nc0c.take_C0Cr(c0c.deliver_C0Cr())...");
3427 c0c.take_C0Cr(c0c.deliver_C0Cr());
3429 out.println(
"\nc0c.take_C0Cp(c0.deliver_C0p())...");
3430 c0c.take_C0Cp(c0.deliver_C0p());
3432 out.println(
"\nc0c.take_C0Cr(c0.deliver_C0r())...");
3433 c0c.take_C0Cr(c0.deliver_C0r());
3435 out.println(
"\nc0.take_C0p(c0.deliver_C0p())...");
3436 c0.take_C0p(c0.deliver_C0p());
3438 out.println(
"\nc0.take_C0r(c0.deliver_C0r())...");
3439 c0.take_C0r(c0.deliver_C0r());
3442 out.println(
"\nc0c.take_C0Cp(c1c.deliver_C1Cp())...");
3443 c0c.take_C0Cp(c1c.deliver_C1Cp());
3445 out.println(
"\nc0c.take_C0Cr(c1c.deliver_C1Cr())...");
3446 c0c.take_C0Cr(c1c.deliver_C1Cr());
3448 out.println(
"\nc0c.take_C0Cp(c1.deliver_C1p())...");
3449 c0c.take_C0Cp(c1.deliver_C1p());
3451 out.println(
"\nc0c.take_C0Cr(c1.deliver_C1r())...");
3452 c0c.take_C0Cr(c1.deliver_C1r());
3454 out.println(
"\nc0.take_C0p(c1.deliver_C1p())...");
3455 c0.take_C0p(c1.deliver_C1p());
3457 out.println(
"\nc0.take_C0r(c1.deliver_C1r())...");
3458 c0.take_C0r(c1.deliver_C1r());
3461 out.println(
"\nc1c.take_C1Cp(c1c.deliver_C1Cp())...");
3462 c1c.take_C1Cp(c1c.deliver_C1Cp());
3464 out.println(
"\nc1c.take_C1Cr(c1c.deliver_C1Cr())...");
3465 c1c.take_C1Cr(c1c.deliver_C1Cr());
3467 out.println(
"\nc1c.take_C1Cp(c1.deliver_C1p())...");
3468 c1c.take_C1Cp(c1.deliver_C1p());
3470 out.println(
"\nc1c.take_C1Cr(c1.deliver_C1r())...");
3471 c1c.take_C1Cr(c1.deliver_C1r());
3473 out.println(
"\nc1.take_C1p(c1.deliver_C1p())...");
3474 c1.take_C1p(c1.deliver_C1p());
3476 out.println(
"\nc1.take_C1r(c1.deliver_C1r())...");
3477 c1.take_C1r(c1.deliver_C1r());
3480 out.println(
"<-- MyJapiTest.test9()");
3483 static public long hash0(CI.C0CArray c0a,
int n) {
3485 for (
int i = 0;
i <
n;
i++) {
3486 out.println(
"\ncalling CI.C0Array.at(" +
i +
")...");
3487 final CI.C0C c0c = c0a.at(
i);
3488 assert (c0c != null);
3490 out.println(
"\ncalling CI.C0C.id()...");
3496 static public long hash1(CI.C1CArray c1a,
int n) {
3498 for (
int i = 0;
i <
n;
i++) {
3499 out.println(
"\ncalling CI.C1Array.at(" +
i +
")...");
3500 final CI.C1C c1c = c1a.at(
i);
3501 assert (c1c != null);
3502 out.println(
"\ncalling CI.C1C.id()...");
3508 static public void test10() {
3509 out.println(
"--> MyJapiTest.test10()");
3511 out.println(
"\ntesting object array functions ...");
3514 out.println(
"\ntesting object array of size 0...");
3516 out.println(
"\ncalling CI.C0Array.create(0)...");
3517 final CI.C0Array c0a0 = CI.C0Array.create(0);
3518 assert (c0a0 != null);
3520 final CI.C0CArray c0a0c = c0a0;
3522 out.println(
"\ncalling CI.C0Array.delete(c0a0)...");
3523 CI.C0Array.delete(c0a0);
3526 out.println(
"\ntesting non-const object array of size 1...");
3530 out.println(
"\ncalling CI.C0Array.create(" + n +
")...");
3531 final CI.C0Array c0a1 = CI.C0Array.create(n);
3532 assert (c0a1 != null);
3534 out.println(
"\ncalling CI.C0Array.at(0)...");
3535 final CI.C0 c01 = c0a1.at(0);
3536 assert (c01 != null);
3539 out.println(
"\ncalling CI.C0.print()...");
3543 out.println(
"\ncalling CI.C0.check(CI.C0.id())...");
3544 c01.check(c01.id());
3546 out.println(
"\ncalling hash(CI.C0Array, " + n +
")...");
3547 r0 = hash0(c0a1, n);
3549 out.println(
"\ncalling CI.C0.hash(CI.C0Array, " + n +
")...");
3550 r1 = CI.C0.hash(c0a1, n);
3553 out.println(
"\ncalling CI.C0.hash(CI.C0.pass(CI.C0Array), " + n +
")...");
3554 r2 = CI.C0.hash(CI.C0.pass(c0a1),
n);
3557 out.println(
"\ntesting const object array of size " + n +
"...");
3558 final CI.C0CArray c0ca1 = c0a1;
3560 out.println(
"\ncalling CI.C0Array.at(0)...");
3561 final CI.C0C c0c1 = c0ca1.at(0);
3562 assert (c0c1 != null);
3565 out.println(
"\ncalling CI.C0.print()...");
3569 out.println(
"\ncalling CI.C0C.check(CI.C0C.id())...");
3570 c0c1.check(c0c1.id());
3572 out.println(
"\ncalling hash(CI.C0CArray, " + n +
")...");
3573 r0 = hash0(c0ca1, n);
3575 out.println(
"\ncalling CI.C0.hash(CI.C0CArray, " + n +
")...");
3576 r1 = CI.C0.hash(c0ca1, n);
3579 out.println(
"\ncalling CI.C0.hash(CI.C0.pass(CI.C0CArray), " + n +
")...");
3580 r2 = CI.C0.hash(CI.C0.pass(c0ca1),
n);
3583 out.println(
"\ncalling CI.C0Array.delete(c0a1)...");
3584 CI.C0Array.delete(c0a1);
3587 out.println(
"\ntesting non-const object array of size >1...");
3591 out.println(
"\ncalling CI.C0Array.create(" + m +
")...");
3592 CI.C0Array c0a = CI.C0Array.create(m);
3593 assert (c0a != null);
3595 out.println(
"\ncalling hash(CI.C0Array, " + m +
")...");
3598 out.println(
"\ncalling CI.C0.hash(CI.C0Array, " + m +
")...");
3599 r1 = CI.C0.hash(c0a, m);
3602 out.println(
"\ncalling CI.C0.hash(CI.C0.pass(CI.C0Array), " + m +
")...");
3603 r2 = CI.C0.hash(CI.C0.pass(c0a), m);
3606 out.println(
"\ntesting const object array of size " + m +
"...");
3607 final CI.C0CArray c0ca = c0a;
3609 out.println(
"\ncalling hash(CI.C0CArray, " + m +
")...");
3610 r0 = hash0(c0ca, m);
3612 out.println(
"\ncalling CI.C0.hash(CI.C0CArray, " + m +
")...");
3613 r1 = CI.C0.hash(c0ca, m);
3616 out.println(
"\ncalling CI.C0.hash(CI.C0.pass(CI.C0CArray), " + m +
")...");
3617 r2 = CI.C0.hash(CI.C0.pass(c0ca), m);
3620 out.println(
"\ncalling CI.C0Array.delete(c0a)...");
3621 CI.C0Array.delete(c0a);
3624 out.println(
"\ntesting subclass object array of size 0...");
3626 out.println(
"\ncalling CI.C1Array.create(0)...");
3627 final CI.C1Array c1a0 = CI.C1Array.create(0);
3628 assert (c1a0 != null);
3630 final CI.C1CArray c1a0c = c1a0;
3632 out.println(
"\ncalling CI.C1Array.delete(c1a0)...");
3633 CI.C1Array.delete(c1a0);
3636 out.println(
"\ntesting subclass non-const object array of size 1...");
3640 out.println(
"\ncalling CI.C1Array.create(" + n +
")...");
3641 final CI.C1Array c1a1 = CI.C1Array.create(n);
3642 assert (c1a1 != null);
3644 out.println(
"\ncalling CI.C1Array.at(0)...");
3645 final CI.C1 c11 = c1a1.at(0);
3646 assert (c11 != null);
3649 out.println(
"\ncalling CI.C1.print()...");
3653 out.println(
"\ncalling CI.C1.check(CI.C1.id())...");
3654 c11.check(c11.id());
3656 out.println(
"\ncalling hash(CI.C1Array, " + n +
")...");
3657 r0 = hash1(c1a1, n);
3659 out.println(
"\ncalling CI.C1.hash(CI.C1Array, " + n +
")...");
3660 r1 = CI.C1.hash(c1a1, n);
3663 out.println(
"\ncalling CI.C1.hash(CI.C1.pass(CI.C1Array), " + n +
")...");
3664 r2 = CI.C1.hash(CI.C1.pass(c1a1),
n);
3667 out.println(
"\ntesting subclass const object array of size " + n +
"...");
3668 final CI.C1CArray c1ca1 = c1a1;
3670 out.println(
"\ncalling CI.C1Array.at(0)...");
3671 final CI.C1C c1c1 = c1ca1.at(0);
3672 assert (c1c1 != null);
3675 out.println(
"\ncalling CI.C1.print()...");
3679 out.println(
"\ncalling CI.C1C.check(CI.C1C.id())...");
3680 c1c1.check(c1c1.id());
3682 out.println(
"\ncalling hash(CI.C1CArray, " + n +
")...");
3683 r0 = hash1(c1ca1, n);
3685 out.println(
"\ncalling CI.C1.hash(CI.C1CArray, " + n +
")...");
3686 r1 = CI.C1.hash(c1ca1, n);
3689 out.println(
"\ncalling CI.C1.hash(CI.C1.pass(CI.C1CArray), " + n +
")...");
3690 r2 = CI.C1.hash(CI.C1.pass(c1ca1),
n);
3693 out.println(
"\ncalling CI.C1Array.delete(c1a1)...");
3694 CI.C1Array.delete(c1a1);
3697 out.println(
"\ntesting subclass non-const object array of size >1...");
3701 out.println(
"\ncalling CI.C1Array.create(" + m +
")...");
3702 CI.C1Array c1a = CI.C1Array.create(m);
3703 assert (c1a != null);
3705 out.println(
"\ncalling hash(CI.C1Array, " + m +
")...");
3708 out.println(
"\ncalling CI.C1.hash(CI.C1Array, " + m +
")...");
3709 r1 = CI.C1.hash(c1a, m);
3712 out.println(
"\ncalling CI.C1.hash(CI.C1.pass(CI.C1Array), " + m +
")...");
3713 r2 = CI.C1.hash(CI.C1.pass(c1a), m);
3716 out.println(
"\ntesting subclass const object array of size " + m +
"...");
3717 final CI.C1CArray c1ca = c1a;
3719 out.println(
"\ncalling hash(CI.C1CArray, " + m +
")...");
3720 r0 = hash1(c1ca, m);
3722 out.println(
"\ncalling CI.C1.hash(CI.C1CArray, " + m +
")...");
3723 r1 = CI.C1.hash(c1ca, m);
3726 out.println(
"\ncalling CI.C1.hash(CI.C1.pass(CI.C1CArray), " + m +
")...");
3727 r2 = CI.C1.hash(CI.C1.pass(c1ca), m);
3730 out.println(
"\ncalling CI.C1Array.delete(c1a)...");
3731 CI.C1Array.delete(c1a);
3735 out.println(
"<-- MyJapiTest.test10()");
3738 static public void test11() {
3739 out.println(
"--> MyJapiTest.test11()");
3741 out.println(
"\ntesting function dispatch ...");
3743 out.println(
"\ncalling D0.sub().f_d0()...");
3744 assert (
D0.sub().f_d0() == 20);
3746 out.println(
"\ncalling D1.f_nv(D0.sub())...");
3747 assert (
D1.f_nv(
D0.sub()) == 31);
3749 out.println(
"\ncalling D0.sub().f_v()...");
3750 assert (
D0.sub().f_v() == 32);
3752 out.println(
"\ncalling D1.sub().f_d0()...");
3753 assert (
D1.sub().f_d0() == 20);
3755 out.println(
"\ncalling D1.sub().f_d1()...");
3756 assert (
D1.sub().f_d1() == 30);
3758 out.println(
"\ncalling D1.f_nv(D1.sub())...");
3759 assert (
D1.f_nv(
D1.sub()) == 31);
3761 out.println(
"\ncalling D1.sub().f_v()...");
3762 assert (
D1.sub().f_v() == 42);
3764 out.println(
"\ncalling D2.sub()...");
3765 assert (
D2.sub() == null);
3768 out.println(
"<-- MyJapiTest.test11()");
3771 static public void test12() {
3772 out.println(
"--> MyJapiTest.test12()");
3774 out.println(
"\ntesting enum-int mapping ...");
3776 out.println(
"\nE.take_EE1(E.deliver_EE1())...");
3777 E.take_EE1(
E.deliver_EE1());
3779 out.println(
"\nE.deliver_EE1()...");
3780 final int e =
E.deliver_EE1();
3781 assert (e ==
E.EE1);
3783 out.println(
"\nE.take_EE1(e)...");
3786 out.println(
"\nE.take_EE1c(E.deliver_EE1c())...");
3787 E.take_EE1c(
E.deliver_EE1c());
3789 out.println(
"\nE.deliver_EE1c()...");
3790 final int ec =
E.deliver_EE1c();
3791 assert (ec ==
E.EE1);
3793 out.println(
"\nE.take_EE1c(ec)...");
3797 out.println(
"<-- MyJapiTest.test12()");
3800 static public void test()
3802 out.println(
"--> MyJapiTest.test()");
3804 final Class cls = MyJapiTest.class;
3805 out.println(
" " + cls +
" <" + cls.getClassLoader() +
">");
3862 out.println(
"<-- MyJapiTest.test()");
3866 static public void main(
String[] args)
3868 out.println(
"--> MyJapiTest.main()");
3874 out.println(
"<-- MyJapiTest.main()");