aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE_data/ValueTest.asn
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-10-28 14:47:50 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 11:40:25 +0100
commit0775ee9c7dc4957302a756b8b37cf94e372d3ecc (patch)
treedf646754c4e472fe6a17cd26a70a7348266e63e1 /lib/asn1/test/asn1_SUITE_data/ValueTest.asn
parent572b880ce6ad60ca0ad63aa9b4f8da01702834cf (diff)
downloadotp-0775ee9c7dc4957302a756b8b37cf94e372d3ecc.tar.gz
otp-0775ee9c7dc4957302a756b8b37cf94e372d3ecc.tar.bz2
otp-0775ee9c7dc4957302a756b8b37cf94e372d3ecc.zip
Improve handling of BIT STRING values
Diffstat (limited to 'lib/asn1/test/asn1_SUITE_data/ValueTest.asn')
-rw-r--r--lib/asn1/test/asn1_SUITE_data/ValueTest.asn30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/ValueTest.asn b/lib/asn1/test/asn1_SUITE_data/ValueTest.asn
index 156d23ee62..b2c59d686a 100644
--- a/lib/asn1/test/asn1_SUITE_data/ValueTest.asn
+++ b/lib/asn1/test/asn1_SUITE_data/ValueTest.asn
@@ -110,4 +110,34 @@ otherOctetString OCTET STRING ::= someOctetString
os-1 OCTET STRING ::= os-2
os-2 OCTET STRING ::= os-holder-1.&os
+-- Recursive BIT STRING definitions.
+
+BS-HOLDER ::= CLASS {
+ &id INTEGER UNIQUE,
+ &bs BIT STRING,
+ &named-bs NamedBsType
+} WITH SYNTAX {
+ ID &id BS &bs NAMED-BS &named-bs
+}
+bs-holder-1 BS-HOLDER ::= { ID 1 BS '101'B NAMED-BS {a,c} }
+
+NamedBsType ::= BIT STRING {a(0),b(1),c(2)}
+BsSeq ::= SEQUENCE {
+ a BIT STRING,
+ b NamedBsType
+}
+
+someBitString BIT STRING ::= '101101'B
+
+bsSeq1 BsSeq ::= { a someBitString, b someNamedBs }
+bsSeq2 BsSeq ::= { a otherBitString, b someOtherNamedBs }
+bsSeq3 BsSeq ::= { a bs-holder-1.&bs, b bs-holder-1.&named-bs }
+
+otherBitString BIT STRING ::= someBitString
+bsFromObjectInd BIT STRING ::= bsFromObject
+bsFromObject BIT STRING ::= bs-holder-1.&bs
+
+someOtherNamedBs NamedBsType ::= someNamedBs
+someNamedBs NamedBsType ::= {c}
+
END