aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2010-10-25 19:19:17 -0700
committerLev Walkin <vlm@lionet.info>2010-10-25 19:19:17 -0700
commit190419b23c4ad1936dd2f1c21c4b8abf0f0e2a3d (patch)
treedcc4b5dc4d6f7ebeed50f96823f2e73c79430026 /tests
parentffe79f445099764490217e07622f535b887b2c84 (diff)
PER decoding of open types fix
Diffstat (limited to 'tests')
-rw-r--r--tests/131-per-empty-OK.asn116
-rw-r--r--tests/131-per-empty-OK.asn1.-Pgen-PER55
2 files changed, 71 insertions, 0 deletions
diff --git a/tests/131-per-empty-OK.asn1 b/tests/131-per-empty-OK.asn1
new file mode 100644
index 00000000..fec5d2c9
--- /dev/null
+++ b/tests/131-per-empty-OK.asn1
@@ -0,0 +1,16 @@
+
+-- OK: Everything is fine
+
+-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
+-- .spelio.software.asn1c.test (9363.1.5.1)
+-- .131
+
+ModulePERLong
+ { iso org(3) dod(6) internet (1) private(4) enterprise(1)
+ spelio(9363) software(1) asn1c(5) test(1) 131 }
+ DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+
+ T ::= SEQUENCE { } -- Empty sequence
+
+END
diff --git a/tests/131-per-empty-OK.asn1.-Pgen-PER b/tests/131-per-empty-OK.asn1.-Pgen-PER
new file mode 100644
index 00000000..028ee3e4
--- /dev/null
+++ b/tests/131-per-empty-OK.asn1.-Pgen-PER
@@ -0,0 +1,55 @@
+
+/*** <<< INCLUDES [T] >>> ***/
+
+#include <constr_SEQUENCE.h>
+
+/*** <<< TYPE-DECLS [T] >>> ***/
+
+typedef struct T {
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} T_t;
+
+/*** <<< FUNC-DECLS [T] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_T;
+
+/*** <<< STAT-DEFS [T] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
+ sizeof(struct T),
+ offsetof(struct T, _asn_ctx),
+ 0, /* No top level tags */
+ 0, /* No tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
+ -1, /* Start extensions */
+ -1 /* Stop extensions */
+};
+asn_TYPE_descriptor_t asn_DEF_T = {
+ "T",
+ "T",
+ SEQUENCE_free,
+ SEQUENCE_print,
+ SEQUENCE_constraint,
+ SEQUENCE_decode_ber,
+ SEQUENCE_encode_der,
+ SEQUENCE_decode_xer,
+ SEQUENCE_encode_xer,
+ SEQUENCE_decode_uper,
+ SEQUENCE_encode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_T_tags_1,
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ asn_DEF_T_tags_1, /* Same as above */
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* No members */
+ &asn_SPC_T_specs_1 /* Additional specs */
+};
+