Commit 2888f274 authored by Lev Walkin's avatar Lev Walkin

test for REAL support

parent 41ba1f24
......@@ -16,7 +16,7 @@ BEGIN
T3 ::= [4] IMPLICIT T4
T4 ::= [5] EXPLICIT T5
T5 ::= [6] IMPLICIT T6
T6 ::= INTEGER
T6 ::= REAL
T ::= [0] IMPLICIT Ts
......
......@@ -89,7 +89,7 @@ static ber_tlv_tag_t asn1_DEF_T1_all_tags[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn1_TYPE_descriptor_t asn1_DEF_T1 = {
"T1",
......@@ -199,7 +199,7 @@ static ber_tlv_tag_t asn1_DEF_T2_all_tags[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn1_TYPE_descriptor_t asn1_DEF_T2 = {
"T2",
......@@ -307,7 +307,7 @@ static ber_tlv_tag_t asn1_DEF_T3_all_tags[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn1_TYPE_descriptor_t asn1_DEF_T3 = {
"T3",
......@@ -410,7 +410,7 @@ T4_free(asn1_TYPE_descriptor_t *td,
static ber_tlv_tag_t asn1_DEF_T4_tags[] = {
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn1_TYPE_descriptor_t asn1_DEF_T4 = {
"T4",
......@@ -512,7 +512,7 @@ T5_free(asn1_TYPE_descriptor_t *td,
static ber_tlv_tag_t asn1_DEF_T5_tags[] = {
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn1_TYPE_descriptor_t asn1_DEF_T5 = {
"T5",
......@@ -536,12 +536,12 @@ asn1_TYPE_descriptor_t asn1_DEF_T5 = {
/*** <<< INCLUDES [T6] >>> ***/
#include <INTEGER.h>
#include <REAL.h>
/*** <<< TYPE-DECLS [T6] >>> ***/
typedef INTEGER_t T6_t;
typedef REAL_t T6_t;
/*** <<< FUNC-DECLS [T6] >>> ***/
......@@ -559,25 +559,25 @@ T6_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
td->check_constraints = asn1_DEF_INTEGER.check_constraints;
td->check_constraints = asn1_DEF_REAL.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
}
/*
* This type is implemented using INTEGER,
* This type is implemented using REAL,
* so adjust the DEF appropriately.
*/
static void
T6_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->ber_decoder = asn1_DEF_INTEGER.ber_decoder;
td->der_encoder = asn1_DEF_INTEGER.der_encoder;
td->free_struct = asn1_DEF_INTEGER.free_struct;
td->print_struct = asn1_DEF_INTEGER.print_struct;
td->last_tag_form = asn1_DEF_INTEGER.last_tag_form;
td->elements = asn1_DEF_INTEGER.elements;
td->elements_count = asn1_DEF_INTEGER.elements_count;
td->specifics = asn1_DEF_INTEGER.specifics;
td->ber_decoder = asn1_DEF_REAL.ber_decoder;
td->der_encoder = asn1_DEF_REAL.der_encoder;
td->free_struct = asn1_DEF_REAL.free_struct;
td->print_struct = asn1_DEF_REAL.print_struct;
td->last_tag_form = asn1_DEF_REAL.last_tag_form;
td->elements = asn1_DEF_REAL.elements;
td->elements_count = asn1_DEF_REAL.elements_count;
td->specifics = asn1_DEF_REAL.specifics;
}
ber_dec_rval_t
......@@ -613,7 +613,7 @@ T6_free(asn1_TYPE_descriptor_t *td,
/*** <<< STAT-DEFS [T6] >>> ***/
static ber_tlv_tag_t asn1_DEF_T6_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn1_TYPE_descriptor_t asn1_DEF_T6 = {
"T6",
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment