Skip to content

Commit

Permalink
Regenerate test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
brchiu committed Jan 24, 2018
1 parent 6b76c7c commit 6eae442
Show file tree
Hide file tree
Showing 10 changed files with 328 additions and 138 deletions.
30 changes: 28 additions & 2 deletions tests/tests-asn1c-compiler/139-component-relation-OK.asn1.-P
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,20 @@ select_Frame_value_type(const asn_TYPE_descriptor_t *parent_type, const void *pa
const asn_ioc_set_t *itable = asn_IOS_FrameTypes_1;
size_t constraining_column = 0; /* &id */
size_t for_column = 1; /* &Type */
size_t row;
size_t row, presence_index = 0;
const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Frame, ident));

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

if(type_cell->cell_kind == aioc__undefined)
continue;

presence_index++;
if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
result.type_descriptor = type_cell->type_descriptor;
result.presence_index = row + 1;
result.presence_index = presence_index;
break;
}
}
Expand Down Expand Up @@ -316,3 +320,25 @@ asn_TYPE_descriptor_t asn_DEF_ComplexMessage = {
&asn_SPC_ComplexMessage_specs_1 /* Additional specs */
};


/*** <<< asn_constant.h >>> ***/

/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
*/

#ifndef _ASN_CONSTANT_H
#define _ASN_CONSTANT_H

#ifdef __cplusplus
extern "C" {
#endif

#define basicMessage (1)


#ifdef __cplusplus
}
#endif

#endif /* _ASN_CONSTANT_H */
30 changes: 28 additions & 2 deletions tests/tests-asn1c-compiler/140-component-relation-OK.asn1.-P
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,20 @@ select_Frame_value_type(const asn_TYPE_descriptor_t *parent_type, const void *pa
const asn_ioc_set_t *itable = asn_IOS_FrameTypes_1;
size_t constraining_column = 0; /* &id */
size_t for_column = 1; /* &Type */
size_t row;
size_t row, presence_index = 0;
const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Frame, ident));

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

if(type_cell->cell_kind == aioc__undefined)
continue;

presence_index++;
if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
result.type_descriptor = type_cell->type_descriptor;
result.presence_index = row + 1;
result.presence_index = presence_index;
break;
}
}
Expand Down Expand Up @@ -316,3 +320,25 @@ asn_TYPE_descriptor_t asn_DEF_ComplexMessage = {
&asn_SPC_ComplexMessage_specs_1 /* Additional specs */
};


/*** <<< asn_constant.h >>> ***/

/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
*/

#ifndef _ASN_CONSTANT_H
#define _ASN_CONSTANT_H

#ifdef __cplusplus
extern "C" {
#endif

#define basicMessage (1)


#ifdef __cplusplus
}
#endif

#endif /* _ASN_CONSTANT_H */
31 changes: 29 additions & 2 deletions tests/tests-asn1c-compiler/141-component-relation-OK.asn1.-P
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,20 @@ select_Frame_value_type(const asn_TYPE_descriptor_t *parent_type, const void *pa
const asn_ioc_set_t *itable = asn_IOS_FrameTypes_1;
size_t constraining_column = 0; /* &id */
size_t for_column = 1; /* &Type */
size_t row;
size_t row, presence_index = 0;
const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Frame, ident));

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

if(type_cell->cell_kind == aioc__undefined)
continue;

presence_index++;
if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
result.type_descriptor = type_cell->type_descriptor;
result.presence_index = row + 1;
result.presence_index = presence_index;
break;
}
}
Expand Down Expand Up @@ -395,3 +399,26 @@ asn_TYPE_descriptor_t asn_DEF_ComplexMessage = {
&asn_SPC_ComplexMessage_specs_1 /* Additional specs */
};


/*** <<< asn_constant.h >>> ***/

/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
*/

#ifndef _ASN_CONSTANT_H
#define _ASN_CONSTANT_H

#ifdef __cplusplus
extern "C" {
#endif

#define primMessage (1)
#define cplxMessage (2)


#ifdef __cplusplus
}
#endif

#endif /* _ASN_CONSTANT_H */
66 changes: 35 additions & 31 deletions tests/tests-asn1c-compiler/144-ios-parameterization-OK.asn1.-P
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/*** <<< TYPE-DECLS [Message] >>> ***/

typedef struct Message {
RegionalExtension_30P0_t content;
RegionalExtension_t content;

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

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

typedef struct RegionalExtension_30P0 {
typedef struct RegionalExtension {
long id;
struct value {
value_PR present;
union RegionalExtension_30P0__value_u {
union RegionalExtension__value_u {
long INTEGER;
BOOLEAN_t BOOLEAN;
} choice;
Expand All @@ -96,13 +96,13 @@ typedef struct RegionalExtension_30P0 {

/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} RegionalExtension_30P0_t;
} RegionalExtension_t;

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

extern asn_TYPE_descriptor_t asn_DEF_RegionalExtension_30P0;
extern asn_SEQUENCE_specifics_t asn_SPC_RegionalExtension_30P0_specs_1;
extern asn_TYPE_member_t asn_MBR_RegionalExtension_30P0_1[2];
extern asn_TYPE_descriptor_t asn_DEF_RegionalExtension;
extern asn_SEQUENCE_specifics_t asn_SPC_RegionalExtension_specs_1;
extern asn_TYPE_member_t asn_MBR_RegionalExtension_1[2];

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

Expand Down Expand Up @@ -140,21 +140,25 @@ memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
}

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

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

if(type_cell->cell_kind == aioc__undefined)
continue;

presence_index++;
if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
result.type_descriptor = type_cell->type_descriptor;
result.presence_index = row + 1;
result.presence_index = presence_index;
break;
}
}
Expand Down Expand Up @@ -233,8 +237,8 @@ asn_TYPE_descriptor_t asn_DEF_value_3 = {
&asn_SPC_value_specs_3 /* Additional specs */
};

asn_TYPE_member_t asn_MBR_RegionalExtension_30P0_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct RegionalExtension_30P0, id),
asn_TYPE_member_t asn_MBR_RegionalExtension_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct RegionalExtension, id),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0,
.type = &asn_DEF_NativeInteger,
Expand All @@ -243,43 +247,43 @@ asn_TYPE_member_t asn_MBR_RegionalExtension_30P0_1[] = {
0, 0, /* No default value */
.name = "id"
},
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RegionalExtension_30P0, value),
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RegionalExtension, value),
.tag = -1 /* Ambiguous tag (ANY?) */,
.tag_mode = 0,
.type = &asn_DEF_value_3,
.type_selector = select_RegionalExtension_30P0_value_type,
.type_selector = select_RegionalExtension_value_type,
{ .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_value_constraint_1 },
0, 0, /* No default value */
.name = "value"
},
};
static const ber_tlv_tag_t asn_DEF_RegionalExtension_30P0_tags_1[] = {
static const ber_tlv_tag_t asn_DEF_RegionalExtension_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RegionalExtension_30P0_tag2el_1[] = {
static const asn_TYPE_tag2member_t asn_MAP_RegionalExtension_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
};
asn_SEQUENCE_specifics_t asn_SPC_RegionalExtension_30P0_specs_1 = {
sizeof(struct RegionalExtension_30P0),
offsetof(struct RegionalExtension_30P0, _asn_ctx),
.tag2el = asn_MAP_RegionalExtension_30P0_tag2el_1,
asn_SEQUENCE_specifics_t asn_SPC_RegionalExtension_specs_1 = {
sizeof(struct RegionalExtension),
offsetof(struct RegionalExtension, _asn_ctx),
.tag2el = asn_MAP_RegionalExtension_tag2el_1,
.tag2el_count = 1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RegionalExtension_30P0 = {
asn_TYPE_descriptor_t asn_DEF_RegionalExtension = {
"RegionalExtension",
"RegionalExtension",
&asn_OP_SEQUENCE,
asn_DEF_RegionalExtension_30P0_tags_1,
sizeof(asn_DEF_RegionalExtension_30P0_tags_1)
/sizeof(asn_DEF_RegionalExtension_30P0_tags_1[0]), /* 1 */
asn_DEF_RegionalExtension_30P0_tags_1, /* Same as above */
sizeof(asn_DEF_RegionalExtension_30P0_tags_1)
/sizeof(asn_DEF_RegionalExtension_30P0_tags_1[0]), /* 1 */
asn_DEF_RegionalExtension_tags_1,
sizeof(asn_DEF_RegionalExtension_tags_1)
/sizeof(asn_DEF_RegionalExtension_tags_1[0]), /* 1 */
asn_DEF_RegionalExtension_tags_1, /* Same as above */
sizeof(asn_DEF_RegionalExtension_tags_1)
/sizeof(asn_DEF_RegionalExtension_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_RegionalExtension_30P0_1,
asn_MBR_RegionalExtension_1,
2, /* Elements count */
&asn_SPC_RegionalExtension_30P0_specs_1 /* Additional specs */
&asn_SPC_RegionalExtension_specs_1 /* Additional specs */
};

Loading

0 comments on commit 6eae442

Please sign in to comment.