13 verify(int testNo, T_t *ti) {
16 unsigned char buf[16];
19 fprintf(stderr, "%d IN: { %ld, %ld, %lu, %lu }\n", testNo,
20 ti->small32range, ti->full32range,
21 ti->unsigned32, ti->unsplit32);
23 er = uper_encode_to_buffer(&asn_DEF_T, 0, ti, buf, sizeof buf);
24 assert(er.encoded == 8 * sizeof(buf));
26 rv = uper_decode(0, &asn_DEF_T, (void *)&to, buf, sizeof buf, 0, 0);
27 assert(rv.code == RC_OK);
29 fprintf(stderr, "%d ENC: %2x%2x%2x%2x %2x%2x%2x%2x\n", testNo,
30 buf[0], buf[1], buf[2], buf[3],
31 buf[4], buf[5], buf[6], buf[7]);
32 fprintf(stderr, "%d OUT: { %ld, %ld, %lu, %lu } vs { %ld, %ld, %lu, %lu }\n",
34 ti->small32range, ti->full32range,
35 ti->unsigned32, ti->unsplit32,
36 to->small32range, to->full32range,
37 to->unsigned32, to->unsplit32);
38 assert(ti->small32range == to->small32range);
39 assert(ti->full32range == to->full32range);
40 assert(ti->unsigned32 == to->unsigned32);
41 assert(ti->unsplit32 == to->unsplit32);
43 xer_fprint(stderr, &asn_DEF_T, ti);
44 xer_fprint(stderr, &asn_DEF_T, to);
46 ASN_STRUCT_FREE(asn_DEF_T, to);
64 ti.small32range = -2000000000;
65 ti.full32range = (-2147483647L - 1);
66 ti.unsigned32 = 4000000000;
70 ti.small32range = -1999999999;
71 ti.full32range = (-2147483647L);
72 ti.unsigned32 = 4294967295UL;
76 ti.small32range = 2000000000;
77 ti.full32range = 2147483647;
78 ti.unsigned32 = 4294967295UL - 100;
79 ti.unsplit32 = 4294967290UL;
82 ti.small32range = 1999999999;
83 ti.full32range = 2147483647 - 1;
84 ti.unsigned32 = 4294967295UL - 1;
85 ti.unsplit32 = 4294967290UL - 1;