aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asn1/test')
-rw-r--r--lib/asn1/test/asn1_SUITE_data/TConstr.asn134
-rw-r--r--lib/asn1/test/testDeepTConstr.erl15
2 files changed, 49 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/TConstr.asn1 b/lib/asn1/test/asn1_SUITE_data/TConstr.asn1
index e2e0a11dc4..b2b2de2f56 100644
--- a/lib/asn1/test/asn1_SUITE_data/TConstr.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/TConstr.asn1
@@ -58,6 +58,40 @@ Deeper ::= SEQUENCE {
b SEQUENCE {ba INTEGER, bb MYCLASS.&Type ({ObjectSet}{@a.s.ab})}
}
+Seq3 ::= SEQUENCE {
+ a SEQUENCE {
+ aa INTEGER,
+ ab MYCLASS.&id ({ObjectSet})
+ },
+ -- Multiple references from the same SEQUENCE...
+ b SEQUENCE {
+ ba MYCLASS.&Type ({ObjectSet}{@a.ab}),
+ bb MYCLASS.&Result ({ObjectSet}{@a.ab}),
+ -- ... and references from multiple SEQUENCEs...
+ bc SEQUENCE {
+ bca MYCLASS.&Result ({ObjectSet}{@a.ab}),
+ bcb MYCLASS.&Type ({ObjectSet}{@a.ab})
+ }
+ }
+}
+
+Seq3-Opt ::= SEQUENCE {
+ a SEQUENCE {
+ aa INTEGER,
+ ab MYCLASS.&id ({ObjectSet})
+ },
+ -- Multiple references from the same SEQUENCE...
+ b SEQUENCE {
+ ba MYCLASS.&Type ({ObjectSet}{@a.ab}) OPTIONAL,
+ bb MYCLASS.&Result ({ObjectSet}{@a.ab}) OPTIONAL,
+ -- ... and references from multiple SEQUENCEs...
+ bc SEQUENCE {
+ bca MYCLASS.&Result ({ObjectSet}{@a.ab}),
+ bcb MYCLASS.&Type ({ObjectSet}{@a.ab})
+ } OPTIONAL
+ }
+}
+
-- following from Peter's definitions
diff --git a/lib/asn1/test/testDeepTConstr.erl b/lib/asn1/test/testDeepTConstr.erl
index f17dedc043..f33e49ed7a 100644
--- a/lib/asn1/test/testDeepTConstr.erl
+++ b/lib/asn1/test/testDeepTConstr.erl
@@ -70,6 +70,21 @@ main(_Erule) ->
{'Deeper_a',12,
{'Deeper_a_s',{2,4},42}},
{'Deeper_b',13,{'Type-object1',14,true}}}),
+
+ roundtrip('TConstr', 'Seq3',
+ {'Seq3',
+ {'Seq3_a',42,'TConstr':'id-object1'()},
+ {'Seq3_b',
+ {'Type-object1',-777,true},
+ 12345,
+ {'Seq3_b_bc',12345789,{'Type-object1',-999,true}}}}),
+ roundtrip('TConstr', 'Seq3-Opt',
+ {'Seq3-Opt',
+ {'Seq3-Opt_a',42,'TConstr':'id-object1'()},
+ {'Seq3-Opt_b',
+ {'Type-object1',-777,true},
+ 12345,
+ {'Seq3-Opt_b_bc',12345789,{'Type-object1',-999,true}}}}),
ok.