1 // pinvoke_ppcc.cs - Test cases for passing structures to and and returning
2 // structures from functions. This particular test is for
3 // structures consisting wholy of 1 byte fields.
5 // The Power ABI version 2 allows for special parameter
6 // passing and returning optimizations for certain
7 // structures of homogenous composition (like all ints).
8 // This set of tests checks all the possible combinations
9 // that use the special parm/return rules and one beyond.
11 // Bill Seurer (seurer@linux.vnet.ibm.com)
13 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
17 using System
.Runtime
.InteropServices
;
20 public class Test_sbyte
{
22 [DllImport ("libtest", EntryPoint
="mono_return_sbyte1")]
23 public static extern sbyte1
mono_return_sbyte1 (sbyte1 s
, int addend
);
24 [StructLayout(LayoutKind
.Sequential
)]
25 public struct sbyte1
{
28 [DllImport ("libtest", EntryPoint
="mono_return_sbyte2")]
29 public static extern sbyte2
mono_return_sbyte2 (sbyte2 s
, int addend
);
30 [StructLayout(LayoutKind
.Sequential
)]
31 public struct sbyte2
{
34 [DllImport ("libtest", EntryPoint
="mono_return_sbyte3")]
35 public static extern sbyte3
mono_return_sbyte3 (sbyte3 s
, int addend
);
36 [StructLayout(LayoutKind
.Sequential
)]
37 public struct sbyte3
{
38 public sbyte f1
,f2
,f3
;
40 [DllImport ("libtest", EntryPoint
="mono_return_sbyte4")]
41 public static extern sbyte4
mono_return_sbyte4 (sbyte4 s
, int addend
);
42 [StructLayout(LayoutKind
.Sequential
)]
43 public struct sbyte4
{
44 public sbyte f1
,f2
,f3
,f4
;
46 [DllImport ("libtest", EntryPoint
="mono_return_sbyte5")]
47 public static extern sbyte5
mono_return_sbyte5 (sbyte5 s
, int addend
);
48 [StructLayout(LayoutKind
.Sequential
)]
49 public struct sbyte5
{
50 public sbyte f1
,f2
,f3
,f4
,f5
;
52 [DllImport ("libtest", EntryPoint
="mono_return_sbyte6")]
53 public static extern sbyte6
mono_return_sbyte6 (sbyte6 s
, int addend
);
54 [StructLayout(LayoutKind
.Sequential
)]
55 public struct sbyte6
{
56 public sbyte f1
,f2
,f3
,f4
,f5
,f6
;
58 [DllImport ("libtest", EntryPoint
="mono_return_sbyte7")]
59 public static extern sbyte7
mono_return_sbyte7 (sbyte7 s
, int addend
);
60 [StructLayout(LayoutKind
.Sequential
)]
61 public struct sbyte7
{
62 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
;
64 [DllImport ("libtest", EntryPoint
="mono_return_sbyte8")]
65 public static extern sbyte8
mono_return_sbyte8 (sbyte8 s
, int addend
);
66 [StructLayout(LayoutKind
.Sequential
)]
67 public struct sbyte8
{
68 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
,f8
;
70 [DllImport ("libtest", EntryPoint
="mono_return_sbyte9")]
71 public static extern sbyte9
mono_return_sbyte9 (sbyte9 s
, int addend
);
72 [StructLayout(LayoutKind
.Sequential
)]
73 public struct sbyte9
{
74 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
,f8
,f9
;
76 [DllImport ("libtest", EntryPoint
="mono_return_sbyte10")]
77 public static extern sbyte10
mono_return_sbyte10 (sbyte10 s
, int addend
);
78 [StructLayout(LayoutKind
.Sequential
)]
79 public struct sbyte10
{
80 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
,f8
,f9
,f10
;
82 [DllImport ("libtest", EntryPoint
="mono_return_sbyte11")]
83 public static extern sbyte11
mono_return_sbyte11 (sbyte11 s
, int addend
);
84 [StructLayout(LayoutKind
.Sequential
)]
85 public struct sbyte11
{
86 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
,f8
,f9
,f10
,f11
;
88 [DllImport ("libtest", EntryPoint
="mono_return_sbyte12")]
89 public static extern sbyte12
mono_return_sbyte12 (sbyte12 s
, int addend
);
90 [StructLayout(LayoutKind
.Sequential
)]
91 public struct sbyte12
{
92 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
,f8
,f9
,f10
,f11
,f12
;
94 [DllImport ("libtest", EntryPoint
="mono_return_sbyte13")]
95 public static extern sbyte13
mono_return_sbyte13 (sbyte13 s
, int addend
);
96 [StructLayout(LayoutKind
.Sequential
)]
97 public struct sbyte13
{
98 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
,f8
,f9
,f10
,f11
,f12
,f13
;
100 [DllImport ("libtest", EntryPoint
="mono_return_sbyte14")]
101 public static extern sbyte14
mono_return_sbyte14 (sbyte14 s
, int addend
);
102 [StructLayout(LayoutKind
.Sequential
)]
103 public struct sbyte14
{
104 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
,f8
,f9
,f10
,f11
,f12
,f13
,f14
;
106 [DllImport ("libtest", EntryPoint
="mono_return_sbyte15")]
107 public static extern sbyte15
mono_return_sbyte15 (sbyte15 s
, int addend
);
108 [StructLayout(LayoutKind
.Sequential
)]
109 public struct sbyte15
{
110 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
,f8
,f9
,f10
,f11
,f12
,f13
,f14
,f15
;
112 [DllImport ("libtest", EntryPoint
="mono_return_sbyte16")]
113 public static extern sbyte16
mono_return_sbyte16 (sbyte16 s
, int addend
);
114 [StructLayout(LayoutKind
.Sequential
)]
115 public struct sbyte16
{
116 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
,f8
,f9
,f10
,f11
,f12
,f13
,f14
,f15
,f16
;
118 // This structure is 1 element too large to use the special return
120 [DllImport ("libtest", EntryPoint
="mono_return_sbyte17")]
121 public static extern sbyte17
mono_return_sbyte17 (sbyte17 s
, int addend
);
122 [StructLayout(LayoutKind
.Sequential
)]
123 public struct sbyte17
{
124 public sbyte f1
,f2
,f3
,f4
,f5
,f6
,f7
,f8
,f9
,f10
,f11
,f12
,f13
,f14
,f15
,f16
,f17
;
127 // This structure has nested structures within it but they are
128 // homogenous and thus should still use the special rules.
129 public struct sbyte16_nested1
{
132 public struct sbyte16_nested2
{
135 [DllImport ("libtest", EntryPoint
="mono_return_sbyte16_nested")]
136 public static extern sbyte16_nested
mono_return_sbyte16_nested (sbyte16_nested s
, int addend
);
137 [StructLayout(LayoutKind
.Sequential
)]
138 public struct sbyte16_nested
{
139 public sbyte16_nested1 nested1
;
140 public sbyte f2
,f3
,f4
,f5
,f6
,f7
,f8
,f9
,f10
,f11
,f12
,f13
,f14
,f15
;
141 public sbyte16_nested2 nested2
;
144 public static int Main (string[] args
) {
148 s1
= mono_return_sbyte1(s1
, 9);
151 Console
.WriteLine(" sbyte1 s1.f1: got {0} but expected {1}", s1
.f1
, 1+9);
158 s2
= mono_return_sbyte2(s2
, 9);
160 Console
.WriteLine(" sbyte2 s2.f1: got {0} but expected {1}", s2
.f1
, 1+9);
164 Console
.WriteLine(" sbyte2 s2.f2: got {0} but expected {1}", s2
.f2
, 2+9);
172 s3
= mono_return_sbyte3(s3
, 9);
174 Console
.WriteLine(" sbyte3 s3.f1: got {0} but expected {1}", s3
.f1
, 1+9);
178 Console
.WriteLine(" sbyte3 s3.f2: got {0} but expected {1}", s3
.f2
, 2+9);
182 Console
.WriteLine(" sbyte3 s3.f3: got {0} but expected {1}", s3
.f3
, 3+9);
191 s4
= mono_return_sbyte4(s4
, 9);
193 Console
.WriteLine(" sbyte4 s4.f1: got {0} but expected {1}", s4
.f1
, 1+9);
197 Console
.WriteLine(" sbyte4 s4.f2: got {0} but expected {1}", s4
.f2
, 2+9);
201 Console
.WriteLine(" sbyte4 s4.f3: got {0} but expected {1}", s4
.f3
, 3+9);
205 Console
.WriteLine(" sbyte4 s4.f4: got {0} but expected {1}", s4
.f4
, 4+9);
215 s5
= mono_return_sbyte5(s5
, 9);
217 Console
.WriteLine(" sbyte5 s5.f1: got {0} but expected {1}", s5
.f1
, 1+9);
221 Console
.WriteLine(" sbyte5 s5.f2: got {0} but expected {1}", s5
.f2
, 2+9);
225 Console
.WriteLine(" sbyte5 s5.f3: got {0} but expected {1}", s5
.f3
, 3+9);
229 Console
.WriteLine(" sbyte5 s5.f4: got {0} but expected {1}", s5
.f4
, 4+9);
233 Console
.WriteLine(" sbyte5 s5.f5: got {0} but expected {1}", s5
.f5
, 5+9);
244 s6
= mono_return_sbyte6(s6
, 9);
246 Console
.WriteLine(" sbyte6 s6.f1: got {0} but expected {1}", s6
.f1
, 1+9);
250 Console
.WriteLine(" sbyte6 s6.f2: got {0} but expected {1}", s6
.f2
, 2+9);
254 Console
.WriteLine(" sbyte6 s6.f3: got {0} but expected {1}", s6
.f3
, 3+9);
258 Console
.WriteLine(" sbyte6 s6.f4: got {0} but expected {1}", s6
.f4
, 4+9);
262 Console
.WriteLine(" sbyte6 s6.f5: got {0} but expected {1}", s6
.f5
, 5+9);
266 Console
.WriteLine(" sbyte6 s6.f6: got {0} but expected {1}", s6
.f6
, 6+9);
278 s7
= mono_return_sbyte7(s7
, 9);
280 Console
.WriteLine(" sbyte7 s7.f1: got {0} but expected {1}", s7
.f1
, 1+9);
284 Console
.WriteLine(" sbyte7 s7.f2: got {0} but expected {1}", s7
.f2
, 2+9);
288 Console
.WriteLine(" sbyte7 s7.f3: got {0} but expected {1}", s7
.f3
, 3+9);
292 Console
.WriteLine(" sbyte7 s7.f4: got {0} but expected {1}", s7
.f4
, 4+9);
296 Console
.WriteLine(" sbyte7 s7.f5: got {0} but expected {1}", s7
.f5
, 5+9);
300 Console
.WriteLine(" sbyte7 s7.f6: got {0} but expected {1}", s7
.f6
, 6+9);
304 Console
.WriteLine(" sbyte7 s7.f7: got {0} but expected {1}", s7
.f7
, 7+9);
317 s8
= mono_return_sbyte8(s8
, 9);
319 Console
.WriteLine(" sbyte8 s8.f1: got {0} but expected {1}", s8
.f1
, 1+9);
323 Console
.WriteLine(" sbyte8 s8.f2: got {0} but expected {1}", s8
.f2
, 2+9);
327 Console
.WriteLine(" sbyte8 s8.f3: got {0} but expected {1}", s8
.f3
, 3+9);
331 Console
.WriteLine(" sbyte8 s8.f4: got {0} but expected {1}", s8
.f4
, 4+9);
335 Console
.WriteLine(" sbyte8 s8.f5: got {0} but expected {1}", s8
.f5
, 5+9);
339 Console
.WriteLine(" sbyte8 s8.f6: got {0} but expected {1}", s8
.f6
, 6+9);
343 Console
.WriteLine(" sbyte8 s8.f7: got {0} but expected {1}", s8
.f7
, 7+9);
347 Console
.WriteLine(" sbyte8 s8.f8: got {0} but expected {1}", s8
.f8
, 8+9);
361 s9
= mono_return_sbyte9(s9
, 9);
363 Console
.WriteLine(" sbyte9 s9.f1: got {0} but expected {1}", s9
.f1
, 1+9);
367 Console
.WriteLine(" sbyte9 s9.f2: got {0} but expected {1}", s9
.f2
, 2+9);
371 Console
.WriteLine(" sbyte9 s9.f3: got {0} but expected {1}", s9
.f3
, 3+9);
375 Console
.WriteLine(" sbyte9 s9.f4: got {0} but expected {1}", s9
.f4
, 4+9);
379 Console
.WriteLine(" sbyte9 s9.f5: got {0} but expected {1}", s9
.f5
, 5+9);
383 Console
.WriteLine(" sbyte9 s9.f6: got {0} but expected {1}", s9
.f6
, 6+9);
387 Console
.WriteLine(" sbyte9 s9.f7: got {0} but expected {1}", s9
.f7
, 7+9);
391 Console
.WriteLine(" sbyte9 s9.f8: got {0} but expected {1}", s9
.f8
, 8+9);
395 Console
.WriteLine(" sbyte9 s9.f9: got {0} but expected {1}", s9
.f9
, 9+9);
410 s10
= mono_return_sbyte10(s10
, 9);
412 Console
.WriteLine(" sbyte10 s10.f1: got {0} but expected {1}", s10
.f1
, 1+9);
416 Console
.WriteLine(" sbyte10 s10.f2: got {0} but expected {1}", s10
.f2
, 2+9);
420 Console
.WriteLine(" sbyte10 s10.f3: got {0} but expected {1}", s10
.f3
, 3+9);
424 Console
.WriteLine(" sbyte10 s10.f4: got {0} but expected {1}", s10
.f4
, 4+9);
428 Console
.WriteLine(" sbyte10 s10.f5: got {0} but expected {1}", s10
.f5
, 5+9);
432 Console
.WriteLine(" sbyte10 s10.f6: got {0} but expected {1}", s10
.f6
, 6+9);
436 Console
.WriteLine(" sbyte10 s10.f7: got {0} but expected {1}", s10
.f7
, 7+9);
440 Console
.WriteLine(" sbyte10 s10.f8: got {0} but expected {1}", s10
.f8
, 8+9);
444 Console
.WriteLine(" sbyte10 s10.f9: got {0} but expected {1}", s10
.f9
, 9+9);
447 if (s10
.f10
!= 10+9) {
448 Console
.WriteLine(" sbyte10 s10.f10: got {0} but expected {1}", s10
.f10
, 10+9);
464 s11
= mono_return_sbyte11(s11
, 9);
466 Console
.WriteLine(" sbyte11 s11.f1: got {0} but expected {1}", s11
.f1
, 1+9);
470 Console
.WriteLine(" sbyte11 s11.f2: got {0} but expected {1}", s11
.f2
, 2+9);
474 Console
.WriteLine(" sbyte11 s11.f3: got {0} but expected {1}", s11
.f3
, 3+9);
478 Console
.WriteLine(" sbyte11 s11.f4: got {0} but expected {1}", s11
.f4
, 4+9);
482 Console
.WriteLine(" sbyte11 s11.f5: got {0} but expected {1}", s11
.f5
, 5+9);
486 Console
.WriteLine(" sbyte11 s11.f6: got {0} but expected {1}", s11
.f6
, 6+9);
490 Console
.WriteLine(" sbyte11 s11.f7: got {0} but expected {1}", s11
.f7
, 7+9);
494 Console
.WriteLine(" sbyte11 s11.f8: got {0} but expected {1}", s11
.f8
, 8+9);
498 Console
.WriteLine(" sbyte11 s11.f9: got {0} but expected {1}", s11
.f9
, 9+9);
501 if (s11
.f10
!= 10+9) {
502 Console
.WriteLine(" sbyte11 s11.f10: got {0} but expected {1}", s11
.f10
, 10+9);
505 if (s11
.f11
!= 11+9) {
506 Console
.WriteLine(" sbyte11 s11.f11: got {0} but expected {1}", s11
.f11
, 11+9);
523 s12
= mono_return_sbyte12(s12
, 9);
525 Console
.WriteLine(" sbyte12 s12.f1: got {0} but expected {1}", s12
.f1
, 1+9);
529 Console
.WriteLine(" sbyte12 s12.f2: got {0} but expected {1}", s12
.f2
, 2+9);
533 Console
.WriteLine(" sbyte12 s12.f3: got {0} but expected {1}", s12
.f3
, 3+9);
537 Console
.WriteLine(" sbyte12 s12.f4: got {0} but expected {1}", s12
.f4
, 4+9);
541 Console
.WriteLine(" sbyte12 s12.f5: got {0} but expected {1}", s12
.f5
, 5+9);
545 Console
.WriteLine(" sbyte12 s12.f6: got {0} but expected {1}", s12
.f6
, 6+9);
549 Console
.WriteLine(" sbyte12 s12.f7: got {0} but expected {1}", s12
.f7
, 7+9);
553 Console
.WriteLine(" sbyte12 s12.f8: got {0} but expected {1}", s12
.f8
, 8+9);
557 Console
.WriteLine(" sbyte12 s12.f9: got {0} but expected {1}", s12
.f9
, 9+9);
560 if (s12
.f10
!= 10+9) {
561 Console
.WriteLine(" sbyte12 s12.f10: got {0} but expected {1}", s12
.f10
, 10+9);
564 if (s12
.f11
!= 11+9) {
565 Console
.WriteLine(" sbyte12 s12.f11: got {0} but expected {1}", s12
.f11
, 11+9);
568 if (s12
.f12
!= 12+9) {
569 Console
.WriteLine(" sbyte12 s12.f12: got {0} but expected {1}", s12
.f12
, 12+9);
587 s13
= mono_return_sbyte13(s13
, 9);
589 Console
.WriteLine(" sbyte13 s13.f1: got {0} but expected {1}", s13
.f1
, 1+9);
593 Console
.WriteLine(" sbyte13 s13.f2: got {0} but expected {1}", s13
.f2
, 2+9);
597 Console
.WriteLine(" sbyte13 s13.f3: got {0} but expected {1}", s13
.f3
, 3+9);
601 Console
.WriteLine(" sbyte13 s13.f4: got {0} but expected {1}", s13
.f4
, 4+9);
605 Console
.WriteLine(" sbyte13 s13.f5: got {0} but expected {1}", s13
.f5
, 5+9);
609 Console
.WriteLine(" sbyte13 s13.f6: got {0} but expected {1}", s13
.f6
, 6+9);
613 Console
.WriteLine(" sbyte13 s13.f7: got {0} but expected {1}", s13
.f7
, 7+9);
617 Console
.WriteLine(" sbyte13 s13.f8: got {0} but expected {1}", s13
.f8
, 8+9);
621 Console
.WriteLine(" sbyte13 s13.f9: got {0} but expected {1}", s13
.f9
, 9+9);
624 if (s13
.f10
!= 10+9) {
625 Console
.WriteLine(" sbyte13 s13.f10: got {0} but expected {1}", s13
.f10
, 10+9);
628 if (s13
.f11
!= 11+9) {
629 Console
.WriteLine(" sbyte13 s13.f11: got {0} but expected {1}", s13
.f11
, 11+9);
632 if (s13
.f12
!= 12+9) {
633 Console
.WriteLine(" sbyte13 s13.f12: got {0} but expected {1}", s13
.f12
, 12+9);
636 if (s13
.f13
!= 13+9) {
637 Console
.WriteLine(" sbyte13 s13.f13: got {0} but expected {1}", s13
.f13
, 13+9);
656 s14
= mono_return_sbyte14(s14
, 9);
658 Console
.WriteLine(" sbyte14 s14.f1: got {0} but expected {1}", s14
.f1
, 1+9);
662 Console
.WriteLine(" sbyte14 s14.f2: got {0} but expected {1}", s14
.f2
, 2+9);
666 Console
.WriteLine(" sbyte14 s14.f3: got {0} but expected {1}", s14
.f3
, 3+9);
670 Console
.WriteLine(" sbyte14 s14.f4: got {0} but expected {1}", s14
.f4
, 4+9);
674 Console
.WriteLine(" sbyte14 s14.f5: got {0} but expected {1}", s14
.f5
, 5+9);
678 Console
.WriteLine(" sbyte14 s14.f6: got {0} but expected {1}", s14
.f6
, 6+9);
682 Console
.WriteLine(" sbyte14 s14.f7: got {0} but expected {1}", s14
.f7
, 7+9);
686 Console
.WriteLine(" sbyte14 s14.f8: got {0} but expected {1}", s14
.f8
, 8+9);
690 Console
.WriteLine(" sbyte14 s14.f9: got {0} but expected {1}", s14
.f9
, 9+9);
693 if (s14
.f10
!= 10+9) {
694 Console
.WriteLine(" sbyte14 s14.f10: got {0} but expected {1}", s14
.f10
, 10+9);
697 if (s14
.f11
!= 11+9) {
698 Console
.WriteLine(" sbyte14 s14.f11: got {0} but expected {1}", s14
.f11
, 11+9);
701 if (s14
.f12
!= 12+9) {
702 Console
.WriteLine(" sbyte14 s14.f12: got {0} but expected {1}", s14
.f12
, 12+9);
705 if (s14
.f13
!= 13+9) {
706 Console
.WriteLine(" sbyte14 s14.f13: got {0} but expected {1}", s14
.f13
, 13+9);
709 if (s14
.f14
!= 14+9) {
710 Console
.WriteLine(" sbyte14 s14.f14: got {0} but expected {1}", s14
.f14
, 14+9);
730 s15
= mono_return_sbyte15(s15
, 9);
732 Console
.WriteLine(" sbyte15 s15.f1: got {0} but expected {1}", s15
.f1
, 1+9);
736 Console
.WriteLine(" sbyte15 s15.f2: got {0} but expected {1}", s15
.f2
, 2+9);
740 Console
.WriteLine(" sbyte15 s15.f3: got {0} but expected {1}", s15
.f3
, 3+9);
744 Console
.WriteLine(" sbyte15 s15.f4: got {0} but expected {1}", s15
.f4
, 4+9);
748 Console
.WriteLine(" sbyte15 s15.f5: got {0} but expected {1}", s15
.f5
, 5+9);
752 Console
.WriteLine(" sbyte15 s15.f6: got {0} but expected {1}", s15
.f6
, 6+9);
756 Console
.WriteLine(" sbyte15 s15.f7: got {0} but expected {1}", s15
.f7
, 7+9);
760 Console
.WriteLine(" sbyte15 s15.f8: got {0} but expected {1}", s15
.f8
, 8+9);
764 Console
.WriteLine(" sbyte15 s15.f9: got {0} but expected {1}", s15
.f9
, 9+9);
767 if (s15
.f10
!= 10+9) {
768 Console
.WriteLine(" sbyte15 s15.f10: got {0} but expected {1}", s15
.f10
, 10+9);
771 if (s15
.f11
!= 11+9) {
772 Console
.WriteLine(" sbyte15 s15.f11: got {0} but expected {1}", s15
.f11
, 11+9);
775 if (s15
.f12
!= 12+9) {
776 Console
.WriteLine(" sbyte15 s15.f12: got {0} but expected {1}", s15
.f12
, 12+9);
779 if (s15
.f13
!= 13+9) {
780 Console
.WriteLine(" sbyte15 s15.f13: got {0} but expected {1}", s15
.f13
, 13+9);
783 if (s15
.f14
!= 14+9) {
784 Console
.WriteLine(" sbyte15 s15.f14: got {0} but expected {1}", s15
.f14
, 14+9);
787 if (s15
.f15
!= 15+9) {
788 Console
.WriteLine(" sbyte15 s15.f15: got {0} but expected {1}", s15
.f15
, 15+9);
809 s16
= mono_return_sbyte16(s16
, 9);
811 Console
.WriteLine(" sbyte16 s16.f1: got {0} but expected {1}", s16
.f1
, 1+9);
815 Console
.WriteLine(" sbyte16 s16.f2: got {0} but expected {1}", s16
.f2
, 2+9);
819 Console
.WriteLine(" sbyte16 s16.f3: got {0} but expected {1}", s16
.f3
, 3+9);
823 Console
.WriteLine(" sbyte16 s16.f4: got {0} but expected {1}", s16
.f4
, 4+9);
827 Console
.WriteLine(" sbyte16 s16.f5: got {0} but expected {1}", s16
.f5
, 5+9);
831 Console
.WriteLine(" sbyte16 s16.f6: got {0} but expected {1}", s16
.f6
, 6+9);
835 Console
.WriteLine(" sbyte16 s16.f7: got {0} but expected {1}", s16
.f7
, 7+9);
839 Console
.WriteLine(" sbyte16 s16.f8: got {0} but expected {1}", s16
.f8
, 8+9);
843 Console
.WriteLine(" sbyte16 s16.f9: got {0} but expected {1}", s16
.f9
, 9+9);
846 if (s16
.f10
!= 10+9) {
847 Console
.WriteLine(" sbyte16 s16.f10: got {0} but expected {1}", s16
.f10
, 10+9);
850 if (s16
.f11
!= 11+9) {
851 Console
.WriteLine(" sbyte16 s16.f11: got {0} but expected {1}", s16
.f11
, 11+9);
854 if (s16
.f12
!= 12+9) {
855 Console
.WriteLine(" sbyte16 s16.f12: got {0} but expected {1}", s16
.f12
, 12+9);
858 if (s16
.f13
!= 13+9) {
859 Console
.WriteLine(" sbyte16 s16.f13: got {0} but expected {1}", s16
.f13
, 13+9);
862 if (s16
.f14
!= 14+9) {
863 Console
.WriteLine(" sbyte16 s16.f14: got {0} but expected {1}", s16
.f14
, 14+9);
866 if (s16
.f15
!= 15+9) {
867 Console
.WriteLine(" sbyte16 s16.f15: got {0} but expected {1}", s16
.f15
, 15+9);
870 if (s16
.f16
!= 16+9) {
871 Console
.WriteLine(" sbyte16 s16.f16: got {0} but expected {1}", s16
.f16
, 16+9);
893 s17
= mono_return_sbyte17(s17
, 9);
895 Console
.WriteLine(" sbyte17 s17.f1: got {0} but expected {1}", s17
.f1
, 1+9);
899 Console
.WriteLine(" sbyte17 s17.f2: got {0} but expected {1}", s17
.f2
, 2+9);
903 Console
.WriteLine(" sbyte17 s17.f3: got {0} but expected {1}", s17
.f3
, 3+9);
907 Console
.WriteLine(" sbyte17 s17.f4: got {0} but expected {1}", s17
.f4
, 4+9);
911 Console
.WriteLine(" sbyte17 s17.f5: got {0} but expected {1}", s17
.f5
, 5+9);
915 Console
.WriteLine(" sbyte17 s17.f6: got {0} but expected {1}", s17
.f6
, 6+9);
919 Console
.WriteLine(" sbyte17 s17.f7: got {0} but expected {1}", s17
.f7
, 7+9);
923 Console
.WriteLine(" sbyte17 s17.f8: got {0} but expected {1}", s17
.f8
, 8+9);
927 Console
.WriteLine(" sbyte17 s17.f9: got {0} but expected {1}", s17
.f9
, 9+9);
930 if (s17
.f10
!= 10+9) {
931 Console
.WriteLine(" sbyte17 s17.f10: got {0} but expected {1}", s17
.f10
, 10+9);
934 if (s17
.f11
!= 11+9) {
935 Console
.WriteLine(" sbyte17 s17.f11: got {0} but expected {1}", s17
.f11
, 11+9);
938 if (s17
.f12
!= 12+9) {
939 Console
.WriteLine(" sbyte17 s17.f12: got {0} but expected {1}", s17
.f12
, 12+9);
942 if (s17
.f13
!= 13+9) {
943 Console
.WriteLine(" sbyte17 s17.f13: got {0} but expected {1}", s17
.f13
, 13+9);
946 if (s17
.f14
!= 14+9) {
947 Console
.WriteLine(" sbyte17 s17.f14: got {0} but expected {1}", s17
.f14
, 14+9);
950 if (s17
.f15
!= 15+9) {
951 Console
.WriteLine(" sbyte17 s17.f15: got {0} but expected {1}", s17
.f15
, 15+9);
954 if (s17
.f16
!= 16+9) {
955 Console
.WriteLine(" sbyte17 s17.f16: got {0} but expected {1}", s17
.f16
, 16+9);
958 if (s17
.f17
!= 17+9) {
959 Console
.WriteLine(" sbyte17 s17.f17: got {0} but expected {1}", s17
.f17
, 17+9);
980 sn16
.nested2
.f16
= 16;
981 sn16
= mono_return_sbyte16_nested(sn16
, 9);
982 if (sn16
.nested1
.f1
!= 1+9) {
983 Console
.WriteLine(" sbyte16_nested sn16.nested1.f1: got {0} but expected {1}", sn16
.nested1
.f1
, 1+9);
986 if (sn16
.f2
!= 2+9) {
987 Console
.WriteLine(" sbyte16_nested sn16.f2: got {0} but expected {1}", sn16
.f2
, 2+9);
990 if (sn16
.f3
!= 3+9) {
991 Console
.WriteLine(" sbyte16_nested sn16.f3: got {0} but expected {1}", sn16
.f3
, 3+9);
994 if (sn16
.f4
!= 4+9) {
995 Console
.WriteLine(" sbyte16_nested sn16.f4: got {0} but expected {1}", sn16
.f4
, 4+9);
998 if (sn16
.f5
!= 5+9) {
999 Console
.WriteLine(" sbyte16_nested sn16.f5: got {0} but expected {1}", sn16
.f5
, 5+9);
1002 if (sn16
.f6
!= 6+9) {
1003 Console
.WriteLine(" sbyte16_nested sn16.f6: got {0} but expected {1}", sn16
.f6
, 6+9);
1006 if (sn16
.f7
!= 7+9) {
1007 Console
.WriteLine(" sbyte16_nested sn16.f7: got {0} but expected {1}", sn16
.f7
, 7+9);
1010 if (sn16
.f8
!= 8+9) {
1011 Console
.WriteLine(" sbyte16_nested sn16.f8: got {0} but expected {1}", sn16
.f8
, 8+9);
1014 if (sn16
.f9
!= 9+9) {
1015 Console
.WriteLine(" sbyte16_nested sn16.f9: got {0} but expected {1}", sn16
.f9
, 9+9);
1018 if (sn16
.f10
!= 10+9) {
1019 Console
.WriteLine(" sbyte16_nested sn16.f10: got {0} but expected {1}", sn16
.f10
, 10+9);
1022 if (sn16
.f11
!= 11+9) {
1023 Console
.WriteLine(" sbyte16_nested sn16.f11: got {0} but expected {1}", sn16
.f11
, 11+9);
1026 if (sn16
.f12
!= 12+9) {
1027 Console
.WriteLine(" sbyte16_nested sn16.f12: got {0} but expected {1}", sn16
.f12
, 12+9);
1030 if (sn16
.f13
!= 13+9) {
1031 Console
.WriteLine(" sbyte16_nested sn16.f13: got {0} but expected {1}", sn16
.f13
, 13+9);
1034 if (sn16
.f14
!= 14+9) {
1035 Console
.WriteLine(" sbyte16_nested sn16.f14: got {0} but expected {1}", sn16
.f14
, 14+9);
1038 if (sn16
.f15
!= 15+9) {
1039 Console
.WriteLine(" sbyte16_nested sn16.f15: got {0} but expected {1}", sn16
.f15
, 15+9);
1042 if (sn16
.nested2
.f16
!= 16+9) {
1043 Console
.WriteLine(" sbyte16_nested sn16.nested2.f16: got {0} but expected {1}", sn16
.nested2
.f16
, 16+9);
1049 } // end class Test_sbyte