Skip to content

Commit 6eae442

Browse files
committed
Regenerate test cases
1 parent 6b76c7c commit 6eae442

10 files changed

+328
-138
lines changed

tests/tests-asn1c-compiler/139-component-relation-OK.asn1.-P

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,20 @@ select_Frame_value_type(const asn_TYPE_descriptor_t *parent_type, const void *pa
8686
const asn_ioc_set_t *itable = asn_IOS_FrameTypes_1;
8787
size_t constraining_column = 0; /* &id */
8888
size_t for_column = 1; /* &Type */
89-
size_t row;
89+
size_t row, presence_index = 0;
9090
const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Frame, ident));
9191

9292
for(row=0; row < itable->rows_count; row++) {
9393
const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
9494
const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
9595

96+
if(type_cell->cell_kind == aioc__undefined)
97+
continue;
98+
99+
presence_index++;
96100
if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
97101
result.type_descriptor = type_cell->type_descriptor;
98-
result.presence_index = row + 1;
102+
result.presence_index = presence_index;
99103
break;
100104
}
101105
}
@@ -316,3 +320,25 @@ asn_TYPE_descriptor_t asn_DEF_ComplexMessage = {
316320
&asn_SPC_ComplexMessage_specs_1 /* Additional specs */
317321
};
318322

323+
324+
/*** <<< asn_constant.h >>> ***/
325+
326+
/*
327+
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
328+
*/
329+
330+
#ifndef _ASN_CONSTANT_H
331+
#define _ASN_CONSTANT_H
332+
333+
#ifdef __cplusplus
334+
extern "C" {
335+
#endif
336+
337+
#define basicMessage (1)
338+
339+
340+
#ifdef __cplusplus
341+
}
342+
#endif
343+
344+
#endif /* _ASN_CONSTANT_H */

tests/tests-asn1c-compiler/140-component-relation-OK.asn1.-P

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,20 @@ select_Frame_value_type(const asn_TYPE_descriptor_t *parent_type, const void *pa
8686
const asn_ioc_set_t *itable = asn_IOS_FrameTypes_1;
8787
size_t constraining_column = 0; /* &id */
8888
size_t for_column = 1; /* &Type */
89-
size_t row;
89+
size_t row, presence_index = 0;
9090
const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Frame, ident));
9191

9292
for(row=0; row < itable->rows_count; row++) {
9393
const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
9494
const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
9595

96+
if(type_cell->cell_kind == aioc__undefined)
97+
continue;
98+
99+
presence_index++;
96100
if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
97101
result.type_descriptor = type_cell->type_descriptor;
98-
result.presence_index = row + 1;
102+
result.presence_index = presence_index;
99103
break;
100104
}
101105
}
@@ -316,3 +320,25 @@ asn_TYPE_descriptor_t asn_DEF_ComplexMessage = {
316320
&asn_SPC_ComplexMessage_specs_1 /* Additional specs */
317321
};
318322

323+
324+
/*** <<< asn_constant.h >>> ***/
325+
326+
/*
327+
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
328+
*/
329+
330+
#ifndef _ASN_CONSTANT_H
331+
#define _ASN_CONSTANT_H
332+
333+
#ifdef __cplusplus
334+
extern "C" {
335+
#endif
336+
337+
#define basicMessage (1)
338+
339+
340+
#ifdef __cplusplus
341+
}
342+
#endif
343+
344+
#endif /* _ASN_CONSTANT_H */

tests/tests-asn1c-compiler/141-component-relation-OK.asn1.-P

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,20 @@ select_Frame_value_type(const asn_TYPE_descriptor_t *parent_type, const void *pa
9292
const asn_ioc_set_t *itable = asn_IOS_FrameTypes_1;
9393
size_t constraining_column = 0; /* &id */
9494
size_t for_column = 1; /* &Type */
95-
size_t row;
95+
size_t row, presence_index = 0;
9696
const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Frame, ident));
9797

9898
for(row=0; row < itable->rows_count; row++) {
9999
const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
100100
const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
101101

102+
if(type_cell->cell_kind == aioc__undefined)
103+
continue;
104+
105+
presence_index++;
102106
if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
103107
result.type_descriptor = type_cell->type_descriptor;
104-
result.presence_index = row + 1;
108+
result.presence_index = presence_index;
105109
break;
106110
}
107111
}
@@ -395,3 +399,26 @@ asn_TYPE_descriptor_t asn_DEF_ComplexMessage = {
395399
&asn_SPC_ComplexMessage_specs_1 /* Additional specs */
396400
};
397401

402+
403+
/*** <<< asn_constant.h >>> ***/
404+
405+
/*
406+
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
407+
*/
408+
409+
#ifndef _ASN_CONSTANT_H
410+
#define _ASN_CONSTANT_H
411+
412+
#ifdef __cplusplus
413+
extern "C" {
414+
#endif
415+
416+
#define primMessage (1)
417+
#define cplxMessage (2)
418+
419+
420+
#ifdef __cplusplus
421+
}
422+
#endif
423+
424+
#endif /* _ASN_CONSTANT_H */

tests/tests-asn1c-compiler/144-ios-parameterization-OK.asn1.-P

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/*** <<< TYPE-DECLS [Message] >>> ***/
88

99
typedef struct Message {
10-
RegionalExtension_30P0_t content;
10+
RegionalExtension_t content;
1111

1212
/* Context for parsing across buffer boundaries */
1313
asn_struct_ctx_t _asn_ctx;
@@ -23,7 +23,7 @@ static asn_TYPE_member_t asn_MBR_Message_1[] = {
2323
{ ATF_NOFLAGS, 0, offsetof(struct Message, content),
2424
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
2525
.tag_mode = 0,
26-
.type = &asn_DEF_RegionalExtension_30P0,
26+
.type = &asn_DEF_RegionalExtension,
2727
.type_selector = 0,
2828
{ .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
2929
0, 0, /* No default value */
@@ -81,11 +81,11 @@ typedef enum value_PR {
8181

8282
/*** <<< TYPE-DECLS [SpecializedContent] >>> ***/
8383

84-
typedef struct RegionalExtension_30P0 {
84+
typedef struct RegionalExtension {
8585
long id;
8686
struct value {
8787
value_PR present;
88-
union RegionalExtension_30P0__value_u {
88+
union RegionalExtension__value_u {
8989
long INTEGER;
9090
BOOLEAN_t BOOLEAN;
9191
} choice;
@@ -96,13 +96,13 @@ typedef struct RegionalExtension_30P0 {
9696

9797
/* Context for parsing across buffer boundaries */
9898
asn_struct_ctx_t _asn_ctx;
99-
} RegionalExtension_30P0_t;
99+
} RegionalExtension_t;
100100

101101
/*** <<< FUNC-DECLS [SpecializedContent] >>> ***/
102102

103-
extern asn_TYPE_descriptor_t asn_DEF_RegionalExtension_30P0;
104-
extern asn_SEQUENCE_specifics_t asn_SPC_RegionalExtension_30P0_specs_1;
105-
extern asn_TYPE_member_t asn_MBR_RegionalExtension_30P0_1[2];
103+
extern asn_TYPE_descriptor_t asn_DEF_RegionalExtension;
104+
extern asn_SEQUENCE_specifics_t asn_SPC_RegionalExtension_specs_1;
105+
extern asn_TYPE_member_t asn_MBR_RegionalExtension_1[2];
106106

107107
/*** <<< IOC-TABLES [SpecializedContent] >>> ***/
108108

@@ -140,21 +140,25 @@ memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
140140
}
141141

142142
static asn_type_selector_result_t
143-
select_RegionalExtension_30P0_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
143+
select_RegionalExtension_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
144144
asn_type_selector_result_t result = {0, 0};
145145
const asn_ioc_set_t *itable = asn_IOS_RegionalExtension_1;
146146
size_t constraining_column = 0; /* &id */
147147
size_t for_column = 1; /* &Type */
148-
size_t row;
149-
const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RegionalExtension_30P0, id));
148+
size_t row, presence_index = 0;
149+
const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RegionalExtension, id));
150150

151151
for(row=0; row < itable->rows_count; row++) {
152152
const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
153153
const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
154154

155+
if(type_cell->cell_kind == aioc__undefined)
156+
continue;
157+
158+
presence_index++;
155159
if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
156160
result.type_descriptor = type_cell->type_descriptor;
157-
result.presence_index = row + 1;
161+
result.presence_index = presence_index;
158162
break;
159163
}
160164
}
@@ -233,8 +237,8 @@ asn_TYPE_descriptor_t asn_DEF_value_3 = {
233237
&asn_SPC_value_specs_3 /* Additional specs */
234238
};
235239

236-
asn_TYPE_member_t asn_MBR_RegionalExtension_30P0_1[] = {
237-
{ ATF_NOFLAGS, 0, offsetof(struct RegionalExtension_30P0, id),
240+
asn_TYPE_member_t asn_MBR_RegionalExtension_1[] = {
241+
{ ATF_NOFLAGS, 0, offsetof(struct RegionalExtension, id),
238242
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
239243
.tag_mode = 0,
240244
.type = &asn_DEF_NativeInteger,
@@ -243,43 +247,43 @@ asn_TYPE_member_t asn_MBR_RegionalExtension_30P0_1[] = {
243247
0, 0, /* No default value */
244248
.name = "id"
245249
},
246-
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RegionalExtension_30P0, value),
250+
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RegionalExtension, value),
247251
.tag = -1 /* Ambiguous tag (ANY?) */,
248252
.tag_mode = 0,
249253
.type = &asn_DEF_value_3,
250-
.type_selector = select_RegionalExtension_30P0_value_type,
254+
.type_selector = select_RegionalExtension_value_type,
251255
{ .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_value_constraint_1 },
252256
0, 0, /* No default value */
253257
.name = "value"
254258
},
255259
};
256-
static const ber_tlv_tag_t asn_DEF_RegionalExtension_30P0_tags_1[] = {
260+
static const ber_tlv_tag_t asn_DEF_RegionalExtension_tags_1[] = {
257261
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
258262
};
259-
static const asn_TYPE_tag2member_t asn_MAP_RegionalExtension_30P0_tag2el_1[] = {
263+
static const asn_TYPE_tag2member_t asn_MAP_RegionalExtension_tag2el_1[] = {
260264
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
261265
};
262-
asn_SEQUENCE_specifics_t asn_SPC_RegionalExtension_30P0_specs_1 = {
263-
sizeof(struct RegionalExtension_30P0),
264-
offsetof(struct RegionalExtension_30P0, _asn_ctx),
265-
.tag2el = asn_MAP_RegionalExtension_30P0_tag2el_1,
266+
asn_SEQUENCE_specifics_t asn_SPC_RegionalExtension_specs_1 = {
267+
sizeof(struct RegionalExtension),
268+
offsetof(struct RegionalExtension, _asn_ctx),
269+
.tag2el = asn_MAP_RegionalExtension_tag2el_1,
266270
.tag2el_count = 1, /* Count of tags in the map */
267271
0, 0, 0, /* Optional elements (not needed) */
268272
-1, /* First extension addition */
269273
};
270-
asn_TYPE_descriptor_t asn_DEF_RegionalExtension_30P0 = {
274+
asn_TYPE_descriptor_t asn_DEF_RegionalExtension = {
271275
"RegionalExtension",
272276
"RegionalExtension",
273277
&asn_OP_SEQUENCE,
274-
asn_DEF_RegionalExtension_30P0_tags_1,
275-
sizeof(asn_DEF_RegionalExtension_30P0_tags_1)
276-
/sizeof(asn_DEF_RegionalExtension_30P0_tags_1[0]), /* 1 */
277-
asn_DEF_RegionalExtension_30P0_tags_1, /* Same as above */
278-
sizeof(asn_DEF_RegionalExtension_30P0_tags_1)
279-
/sizeof(asn_DEF_RegionalExtension_30P0_tags_1[0]), /* 1 */
278+
asn_DEF_RegionalExtension_tags_1,
279+
sizeof(asn_DEF_RegionalExtension_tags_1)
280+
/sizeof(asn_DEF_RegionalExtension_tags_1[0]), /* 1 */
281+
asn_DEF_RegionalExtension_tags_1, /* Same as above */
282+
sizeof(asn_DEF_RegionalExtension_tags_1)
283+
/sizeof(asn_DEF_RegionalExtension_tags_1[0]), /* 1 */
280284
{ 0, 0, SEQUENCE_constraint },
281-
asn_MBR_RegionalExtension_30P0_1,
285+
asn_MBR_RegionalExtension_1,
282286
2, /* Elements count */
283-
&asn_SPC_RegionalExtension_30P0_specs_1 /* Additional specs */
287+
&asn_SPC_RegionalExtension_specs_1 /* Additional specs */
284288
};
285289

0 commit comments

Comments
 (0)