aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2005-02-25 08:20:10 +0000
committerLev Walkin <vlm@lionet.info>2005-02-25 08:20:10 +0000
commit8bde64758e8388b151f6bafde7a46a9f19db6e1f (patch)
tree5b4c3927f46491d426485ebe6116df3a504664ad
parent4756e5e7d0d2d87d40176326e3326c7ffd74c87b (diff)
removed comma and added enumeration map
-rw-r--r--tests/66-ref-simple-OK.asn1.-P26
1 files changed, 23 insertions, 3 deletions
diff --git a/tests/66-ref-simple-OK.asn1.-P b/tests/66-ref-simple-OK.asn1.-P
index 8fb5e52f..1b9c1708 100644
--- a/tests/66-ref-simple-OK.asn1.-P
+++ b/tests/66-ref-simple-OK.asn1.-P
@@ -70,7 +70,7 @@ asn_TYPE_descriptor_t asn_DEF_T = {
typedef enum SimpleType {
SimpleType_one = 0,
SimpleType_two = 1,
- SimpleType_three = 2,
+ SimpleType_three = 2
} SimpleType_e;
/*** <<< TYPE-DECLS [SimpleType] >>> ***/
@@ -163,6 +163,26 @@ SimpleType_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [SimpleType] >>> ***/
+static asn_INTEGER_enum_map_t asn_MAP_SimpleType_enum2value[] = {
+ { "one", 0 },
+ { "three", 2 },
+ { "two", 1 }
+};
+static asn_INTEGER_enum_map_t asn_MAP_SimpleType_value2enum[] = {
+ { "one", 0 },
+ { "two", 1 },
+ { "three", 2 }
+};
+static asn_INTEGER_specifics_t asn_DEF_SimpleType_specs = {
+ /* Two name<->value maps sorted differently;
+ * this may seem like a waste of space,
+ * but the strings actually share it.
+ */
+ asn_MAP_SimpleType_enum2value, /* "tag" => N; sorted by tag */
+ asn_MAP_SimpleType_value2enum, /* N => "tag"; sorted by N */
+ 3, /* Number of elements in the maps */
+ 0 /* Enumeration is not extensible */
+};
static ber_tlv_tag_t asn_DEF_SimpleType_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
@@ -183,7 +203,7 @@ asn_TYPE_descriptor_t asn_DEF_SimpleType = {
asn_DEF_SimpleType_tags, /* Same as above */
sizeof(asn_DEF_SimpleType_tags)
/sizeof(asn_DEF_SimpleType_tags[0]), /* 1 */
- 0, 0, /* No members */
- 0 /* No specifics */
+ 0, 0, /* Defined elsewhere */
+ &asn_DEF_SimpleType_specs /* Additional specs */
};