aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE_data/Constraints.py
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-10-29 12:32:29 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 11:40:26 +0100
commit079858313bb508d4b3ef4a8ea7a3240156c6b294 (patch)
tree0c7d9656092f8d21578ac5f1aae60cf23160e305 /lib/asn1/test/asn1_SUITE_data/Constraints.py
parent1c79a4fd03cea47d20f5de00bbdaa8b8bd025ad0 (diff)
downloadotp-079858313bb508d4b3ef4a8ea7a3240156c6b294.tar.gz
otp-079858313bb508d4b3ef4a8ea7a3240156c6b294.tar.bz2
otp-079858313bb508d4b3ef4a8ea7a3240156c6b294.zip
Clean up constraint checking
Diffstat (limited to 'lib/asn1/test/asn1_SUITE_data/Constraints.py')
-rw-r--r--lib/asn1/test/asn1_SUITE_data/Constraints.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/Constraints.py b/lib/asn1/test/asn1_SUITE_data/Constraints.py
index bee619348a..2df95da8a2 100644
--- a/lib/asn1/test/asn1_SUITE_data/Constraints.py
+++ b/lib/asn1/test/asn1_SUITE_data/Constraints.py
@@ -161,4 +161,30 @@ int-holder-2 INT-HOLDER ::= { ID 4 OBJ int-holder-1 }
IntObjectConstr ::= INTEGER (int-holder-2.&obj.&id..int-holder-2.&id)
+--
+-- INTEGER constraints defined using named INTEGERs.
+--
+
+ConstrainedNamedInt ::= INTEGER {v1(42)} (v1)
+constrainedNamedInt-1 INTEGER {v1(42)} (v1) ::= 42
+constrainedNamedInt-2 ConstrainedNamedInt ::= 100
+
+SeqWithNamedInt ::= SEQUENCE {
+ int INTEGER {v2(7)} (v2)
+}
+
+--
+-- Cover simpletable constraint checking code.
+--
+
+ContentInfo ::= SEQUENCE {
+ contentType ContentType
+}
+
+Contents TYPE-IDENTIFIER ::= {
+ {OCTET STRING IDENTIFIED BY {2 1 1 1 1 1 1}}
+}
+
+ContentType ::= TYPE-IDENTIFIER.&id({Contents})
+
END