4 static void receive_int (int a
)
10 static void receive_uint (uint a
)
13 Console
.WriteLine (a
);
16 static void receive_short (short a
)
19 Console
.WriteLine (a
);
22 static void receive_ushort (ushort a
)
25 Console
.WriteLine (a
);
28 static void receive_long (long a
)
31 Console
.WriteLine (a
);
34 static void receive_ulong (ulong a
)
37 Console
.WriteLine (a
);
40 static void receive_sbyte (sbyte a
)
43 Console
.WriteLine (a
);
46 static void receive_byte (byte a
)
49 Console
.WriteLine (a
);
52 static void receive_char (char a
)
55 Console
.WriteLine (a
);
58 static void probe_int()
61 int min
= (int) int.MinValue
;
62 int max
= (int) int.MaxValue
;
64 Console
.WriteLine ("Testing: int");
66 Console
.WriteLine (" arg: int (int)");
68 receive_int (unchecked((int) zero
));
69 receive_int (unchecked((int) min
));
70 receive_int (unchecked((int) max
));
71 Console
.WriteLine (" arg: uint (int)");
73 receive_uint (unchecked((uint) zero
));
74 receive_uint (unchecked((uint) min
));
75 receive_uint (unchecked((uint) max
));
76 Console
.WriteLine (" arg: short (int)");
78 receive_short (unchecked((short) zero
));
79 receive_short (unchecked((short) min
));
80 receive_short (unchecked((short) max
));
81 Console
.WriteLine (" arg: ushort (int)");
83 receive_ushort (unchecked((ushort) zero
));
84 receive_ushort (unchecked((ushort) min
));
85 receive_ushort (unchecked((ushort) max
));
86 Console
.WriteLine (" arg: long (int)");
88 receive_long (unchecked((long) zero
));
89 receive_long (unchecked((long) min
));
90 receive_long (unchecked((long) max
));
91 Console
.WriteLine (" arg: ulong (int)");
93 receive_ulong (unchecked((ulong) zero
));
94 receive_ulong (unchecked((ulong) min
));
95 receive_ulong (unchecked((ulong) max
));
96 Console
.WriteLine (" arg: sbyte (int)");
98 receive_sbyte (unchecked((sbyte) zero
));
99 receive_sbyte (unchecked((sbyte) min
));
100 receive_sbyte (unchecked((sbyte) max
));
101 Console
.WriteLine (" arg: byte (int)");
103 receive_byte (unchecked((byte) zero
));
104 receive_byte (unchecked((byte) min
));
105 receive_byte (unchecked((byte) max
));
106 Console
.WriteLine (" arg: char (int)");
108 receive_char (unchecked((char) zero
));
109 receive_char (unchecked((char) min
));
110 receive_char (unchecked((char) max
));
113 static void probe_uint()
115 uint zero
= (uint) 0;
116 uint min
= (uint) uint.MinValue
;
117 uint max
= (uint) uint.MaxValue
;
119 Console
.WriteLine ("Testing: uint");
121 Console
.WriteLine (" arg: int (uint)");
123 receive_int (unchecked((int) zero
));
124 receive_int (unchecked((int) min
));
125 receive_int (unchecked((int) max
));
126 Console
.WriteLine (" arg: uint (uint)");
128 receive_uint (unchecked((uint) zero
));
129 receive_uint (unchecked((uint) min
));
130 receive_uint (unchecked((uint) max
));
131 Console
.WriteLine (" arg: short (uint)");
133 receive_short (unchecked((short) zero
));
134 receive_short (unchecked((short) min
));
135 receive_short (unchecked((short) max
));
136 Console
.WriteLine (" arg: ushort (uint)");
138 receive_ushort (unchecked((ushort) zero
));
139 receive_ushort (unchecked((ushort) min
));
140 receive_ushort (unchecked((ushort) max
));
141 Console
.WriteLine (" arg: long (uint)");
143 receive_long (unchecked((long) zero
));
144 receive_long (unchecked((long) min
));
145 receive_long (unchecked((long) max
));
146 Console
.WriteLine (" arg: ulong (uint)");
148 receive_ulong (unchecked((ulong) zero
));
149 receive_ulong (unchecked((ulong) min
));
150 receive_ulong (unchecked((ulong) max
));
151 Console
.WriteLine (" arg: sbyte (uint)");
153 receive_sbyte (unchecked((sbyte) zero
));
154 receive_sbyte (unchecked((sbyte) min
));
155 receive_sbyte (unchecked((sbyte) max
));
156 Console
.WriteLine (" arg: byte (uint)");
158 receive_byte (unchecked((byte) zero
));
159 receive_byte (unchecked((byte) min
));
160 receive_byte (unchecked((byte) max
));
161 Console
.WriteLine (" arg: char (uint)");
163 receive_char (unchecked((char) zero
));
164 receive_char (unchecked((char) min
));
165 receive_char (unchecked((char) max
));
168 static void probe_short()
170 short zero
= (short) 0;
171 short min
= (short) short.MinValue
;
172 short max
= (short) short.MaxValue
;
174 Console
.WriteLine ("Testing: short");
176 Console
.WriteLine (" arg: int (short)");
178 receive_int (unchecked((int) zero
));
179 receive_int (unchecked((int) min
));
180 receive_int (unchecked((int) max
));
181 Console
.WriteLine (" arg: uint (short)");
183 receive_uint (unchecked((uint) zero
));
184 receive_uint (unchecked((uint) min
));
185 receive_uint (unchecked((uint) max
));
186 Console
.WriteLine (" arg: short (short)");
188 receive_short (unchecked((short) zero
));
189 receive_short (unchecked((short) min
));
190 receive_short (unchecked((short) max
));
191 Console
.WriteLine (" arg: ushort (short)");
193 receive_ushort (unchecked((ushort) zero
));
194 receive_ushort (unchecked((ushort) min
));
195 receive_ushort (unchecked((ushort) max
));
196 Console
.WriteLine (" arg: long (short)");
198 receive_long (unchecked((long) zero
));
199 receive_long (unchecked((long) min
));
200 receive_long (unchecked((long) max
));
201 Console
.WriteLine (" arg: ulong (short)");
203 receive_ulong (unchecked((ulong) zero
));
204 receive_ulong (unchecked((ulong) min
));
205 receive_ulong (unchecked((ulong) max
));
206 Console
.WriteLine (" arg: sbyte (short)");
208 receive_sbyte (unchecked((sbyte) zero
));
209 receive_sbyte (unchecked((sbyte) min
));
210 receive_sbyte (unchecked((sbyte) max
));
211 Console
.WriteLine (" arg: byte (short)");
213 receive_byte (unchecked((byte) zero
));
214 receive_byte (unchecked((byte) min
));
215 receive_byte (unchecked((byte) max
));
216 Console
.WriteLine (" arg: char (short)");
218 receive_char (unchecked((char) zero
));
219 receive_char (unchecked((char) min
));
220 receive_char (unchecked((char) max
));
223 static void probe_ushort()
225 ushort zero
= (ushort) 0;
226 ushort min
= (ushort) ushort.MinValue
;
227 ushort max
= (ushort) ushort.MaxValue
;
229 Console
.WriteLine ("Testing: ushort");
231 Console
.WriteLine (" arg: int (ushort)");
233 receive_int (unchecked((int) zero
));
234 receive_int (unchecked((int) min
));
235 receive_int (unchecked((int) max
));
236 Console
.WriteLine (" arg: uint (ushort)");
238 receive_uint (unchecked((uint) zero
));
239 receive_uint (unchecked((uint) min
));
240 receive_uint (unchecked((uint) max
));
241 Console
.WriteLine (" arg: short (ushort)");
243 receive_short (unchecked((short) zero
));
244 receive_short (unchecked((short) min
));
245 receive_short (unchecked((short) max
));
246 Console
.WriteLine (" arg: ushort (ushort)");
248 receive_ushort (unchecked((ushort) zero
));
249 receive_ushort (unchecked((ushort) min
));
250 receive_ushort (unchecked((ushort) max
));
251 Console
.WriteLine (" arg: long (ushort)");
253 receive_long (unchecked((long) zero
));
254 receive_long (unchecked((long) min
));
255 receive_long (unchecked((long) max
));
256 Console
.WriteLine (" arg: ulong (ushort)");
258 receive_ulong (unchecked((ulong) zero
));
259 receive_ulong (unchecked((ulong) min
));
260 receive_ulong (unchecked((ulong) max
));
261 Console
.WriteLine (" arg: sbyte (ushort)");
263 receive_sbyte (unchecked((sbyte) zero
));
264 receive_sbyte (unchecked((sbyte) min
));
265 receive_sbyte (unchecked((sbyte) max
));
266 Console
.WriteLine (" arg: byte (ushort)");
268 receive_byte (unchecked((byte) zero
));
269 receive_byte (unchecked((byte) min
));
270 receive_byte (unchecked((byte) max
));
271 Console
.WriteLine (" arg: char (ushort)");
273 receive_char (unchecked((char) zero
));
274 receive_char (unchecked((char) min
));
275 receive_char (unchecked((char) max
));
278 static void probe_long()
280 long zero
= (long) 0;
281 long min
= (long) long.MinValue
;
282 long max
= (long) long.MaxValue
;
284 Console
.WriteLine ("Testing: long");
286 Console
.WriteLine (" arg: int (long)");
288 receive_int (unchecked((int) zero
));
289 receive_int (unchecked((int) min
));
290 receive_int (unchecked((int) max
));
291 Console
.WriteLine (" arg: uint (long)");
293 receive_uint (unchecked((uint) zero
));
294 receive_uint (unchecked((uint) min
));
295 receive_uint (unchecked((uint) max
));
296 Console
.WriteLine (" arg: short (long)");
298 receive_short (unchecked((short) zero
));
299 receive_short (unchecked((short) min
));
300 receive_short (unchecked((short) max
));
301 Console
.WriteLine (" arg: ushort (long)");
303 receive_ushort (unchecked((ushort) zero
));
304 receive_ushort (unchecked((ushort) min
));
305 receive_ushort (unchecked((ushort) max
));
306 Console
.WriteLine (" arg: long (long)");
308 receive_long (unchecked((long) zero
));
309 receive_long (unchecked((long) min
));
310 receive_long (unchecked((long) max
));
311 Console
.WriteLine (" arg: ulong (long)");
313 receive_ulong (unchecked((ulong) zero
));
314 receive_ulong (unchecked((ulong) min
));
315 receive_ulong (unchecked((ulong) max
));
316 Console
.WriteLine (" arg: sbyte (long)");
318 receive_sbyte (unchecked((sbyte) zero
));
319 receive_sbyte (unchecked((sbyte) min
));
320 receive_sbyte (unchecked((sbyte) max
));
321 Console
.WriteLine (" arg: byte (long)");
323 receive_byte (unchecked((byte) zero
));
324 receive_byte (unchecked((byte) min
));
325 receive_byte (unchecked((byte) max
));
326 Console
.WriteLine (" arg: char (long)");
328 receive_char (unchecked((char) zero
));
329 receive_char (unchecked((char) min
));
330 receive_char (unchecked((char) max
));
333 static void probe_ulong()
335 ulong zero
= (ulong) 0;
336 ulong min
= (ulong) ulong.MinValue
;
337 ulong max
= (ulong) ulong.MaxValue
;
339 Console
.WriteLine ("Testing: ulong");
341 Console
.WriteLine (" arg: int (ulong)");
343 receive_int (unchecked((int) zero
));
344 receive_int (unchecked((int) min
));
345 receive_int (unchecked((int) max
));
346 Console
.WriteLine (" arg: uint (ulong)");
348 receive_uint (unchecked((uint) zero
));
349 receive_uint (unchecked((uint) min
));
350 receive_uint (unchecked((uint) max
));
351 Console
.WriteLine (" arg: short (ulong)");
353 receive_short (unchecked((short) zero
));
354 receive_short (unchecked((short) min
));
355 receive_short (unchecked((short) max
));
356 Console
.WriteLine (" arg: ushort (ulong)");
358 receive_ushort (unchecked((ushort) zero
));
359 receive_ushort (unchecked((ushort) min
));
360 receive_ushort (unchecked((ushort) max
));
361 Console
.WriteLine (" arg: long (ulong)");
363 receive_long (unchecked((long) zero
));
364 receive_long (unchecked((long) min
));
365 receive_long (unchecked((long) max
));
366 Console
.WriteLine (" arg: ulong (ulong)");
368 receive_ulong (unchecked((ulong) zero
));
369 receive_ulong (unchecked((ulong) min
));
370 receive_ulong (unchecked((ulong) max
));
371 Console
.WriteLine (" arg: sbyte (ulong)");
373 receive_sbyte (unchecked((sbyte) zero
));
374 receive_sbyte (unchecked((sbyte) min
));
375 receive_sbyte (unchecked((sbyte) max
));
376 Console
.WriteLine (" arg: byte (ulong)");
378 receive_byte (unchecked((byte) zero
));
379 receive_byte (unchecked((byte) min
));
380 receive_byte (unchecked((byte) max
));
381 Console
.WriteLine (" arg: char (ulong)");
383 receive_char (unchecked((char) zero
));
384 receive_char (unchecked((char) min
));
385 receive_char (unchecked((char) max
));
388 static void probe_sbyte()
390 sbyte zero
= (sbyte) 0;
391 sbyte min
= (sbyte) sbyte.MinValue
;
392 sbyte max
= (sbyte) sbyte.MaxValue
;
394 Console
.WriteLine ("Testing: sbyte");
396 Console
.WriteLine (" arg: int (sbyte)");
398 receive_int (unchecked((int) zero
));
399 receive_int (unchecked((int) min
));
400 receive_int (unchecked((int) max
));
401 Console
.WriteLine (" arg: uint (sbyte)");
403 receive_uint (unchecked((uint) zero
));
404 receive_uint (unchecked((uint) min
));
405 receive_uint (unchecked((uint) max
));
406 Console
.WriteLine (" arg: short (sbyte)");
408 receive_short (unchecked((short) zero
));
409 receive_short (unchecked((short) min
));
410 receive_short (unchecked((short) max
));
411 Console
.WriteLine (" arg: ushort (sbyte)");
413 receive_ushort (unchecked((ushort) zero
));
414 receive_ushort (unchecked((ushort) min
));
415 receive_ushort (unchecked((ushort) max
));
416 Console
.WriteLine (" arg: long (sbyte)");
418 receive_long (unchecked((long) zero
));
419 receive_long (unchecked((long) min
));
420 receive_long (unchecked((long) max
));
421 Console
.WriteLine (" arg: ulong (sbyte)");
423 receive_ulong (unchecked((ulong) zero
));
424 receive_ulong (unchecked((ulong) min
));
425 receive_ulong (unchecked((ulong) max
));
426 Console
.WriteLine (" arg: sbyte (sbyte)");
428 receive_sbyte (unchecked((sbyte) zero
));
429 receive_sbyte (unchecked((sbyte) min
));
430 receive_sbyte (unchecked((sbyte) max
));
431 Console
.WriteLine (" arg: byte (sbyte)");
433 receive_byte (unchecked((byte) zero
));
434 receive_byte (unchecked((byte) min
));
435 receive_byte (unchecked((byte) max
));
436 Console
.WriteLine (" arg: char (sbyte)");
438 receive_char (unchecked((char) zero
));
439 receive_char (unchecked((char) min
));
440 receive_char (unchecked((char) max
));
443 static void probe_byte()
445 byte zero
= (byte) 0;
446 byte min
= (byte) byte.MinValue
;
447 byte max
= (byte) byte.MaxValue
;
449 Console
.WriteLine ("Testing: byte");
451 Console
.WriteLine (" arg: int (byte)");
453 receive_int (unchecked((int) zero
));
454 receive_int (unchecked((int) min
));
455 receive_int (unchecked((int) max
));
456 Console
.WriteLine (" arg: uint (byte)");
458 receive_uint (unchecked((uint) zero
));
459 receive_uint (unchecked((uint) min
));
460 receive_uint (unchecked((uint) max
));
461 Console
.WriteLine (" arg: short (byte)");
463 receive_short (unchecked((short) zero
));
464 receive_short (unchecked((short) min
));
465 receive_short (unchecked((short) max
));
466 Console
.WriteLine (" arg: ushort (byte)");
468 receive_ushort (unchecked((ushort) zero
));
469 receive_ushort (unchecked((ushort) min
));
470 receive_ushort (unchecked((ushort) max
));
471 Console
.WriteLine (" arg: long (byte)");
473 receive_long (unchecked((long) zero
));
474 receive_long (unchecked((long) min
));
475 receive_long (unchecked((long) max
));
476 Console
.WriteLine (" arg: ulong (byte)");
478 receive_ulong (unchecked((ulong) zero
));
479 receive_ulong (unchecked((ulong) min
));
480 receive_ulong (unchecked((ulong) max
));
481 Console
.WriteLine (" arg: sbyte (byte)");
483 receive_sbyte (unchecked((sbyte) zero
));
484 receive_sbyte (unchecked((sbyte) min
));
485 receive_sbyte (unchecked((sbyte) max
));
486 Console
.WriteLine (" arg: byte (byte)");
488 receive_byte (unchecked((byte) zero
));
489 receive_byte (unchecked((byte) min
));
490 receive_byte (unchecked((byte) max
));
491 Console
.WriteLine (" arg: char (byte)");
493 receive_char (unchecked((char) zero
));
494 receive_char (unchecked((char) min
));
495 receive_char (unchecked((char) max
));
498 static void probe_char()
500 char zero
= (char) 0;
501 char min
= (char) char.MinValue
;
502 char max
= (char) char.MaxValue
;
504 Console
.WriteLine ("Testing: char");
506 Console
.WriteLine (" arg: int (char)");
508 receive_int (unchecked((int) zero
));
509 receive_int (unchecked((int) min
));
510 receive_int (unchecked((int) max
));
511 Console
.WriteLine (" arg: uint (char)");
513 receive_uint (unchecked((uint) zero
));
514 receive_uint (unchecked((uint) min
));
515 receive_uint (unchecked((uint) max
));
516 Console
.WriteLine (" arg: short (char)");
518 receive_short (unchecked((short) zero
));
519 receive_short (unchecked((short) min
));
520 receive_short (unchecked((short) max
));
521 Console
.WriteLine (" arg: ushort (char)");
523 receive_ushort (unchecked((ushort) zero
));
524 receive_ushort (unchecked((ushort) min
));
525 receive_ushort (unchecked((ushort) max
));
526 Console
.WriteLine (" arg: long (char)");
528 receive_long (unchecked((long) zero
));
529 receive_long (unchecked((long) min
));
530 receive_long (unchecked((long) max
));
531 Console
.WriteLine (" arg: ulong (char)");
533 receive_ulong (unchecked((ulong) zero
));
534 receive_ulong (unchecked((ulong) min
));
535 receive_ulong (unchecked((ulong) max
));
536 Console
.WriteLine (" arg: sbyte (char)");
538 receive_sbyte (unchecked((sbyte) zero
));
539 receive_sbyte (unchecked((sbyte) min
));
540 receive_sbyte (unchecked((sbyte) max
));
541 Console
.WriteLine (" arg: byte (char)");
543 receive_byte (unchecked((byte) zero
));
544 receive_byte (unchecked((byte) min
));
545 receive_byte (unchecked((byte) max
));
546 Console
.WriteLine (" arg: char (char)");
548 receive_char (unchecked((char) zero
));
549 receive_char (unchecked((char) min
));
550 receive_char (unchecked((char) max
));