diff options
author | Björn Gustavsson <[email protected]> | 2014-10-29 12:32:29 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-01-12 11:40:26 +0100 |
commit | 079858313bb508d4b3ef4a8ea7a3240156c6b294 (patch) | |
tree | 0c7d9656092f8d21578ac5f1aae60cf23160e305 /lib/asn1/test/testConstraints.erl | |
parent | 1c79a4fd03cea47d20f5de00bbdaa8b8bd025ad0 (diff) | |
download | otp-079858313bb508d4b3ef4a8ea7a3240156c6b294.tar.gz otp-079858313bb508d4b3ef4a8ea7a3240156c6b294.tar.bz2 otp-079858313bb508d4b3ef4a8ea7a3240156c6b294.zip |
Clean up constraint checking
Diffstat (limited to 'lib/asn1/test/testConstraints.erl')
-rw-r--r-- | lib/asn1/test/testConstraints.erl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl index aab4f1d4c6..5d65cb8d73 100644 --- a/lib/asn1/test/testConstraints.erl +++ b/lib/asn1/test/testConstraints.erl @@ -240,6 +240,19 @@ int_constraints(Rules) -> roundtrip('IntObjectConstr', 4), range_error(Rules, 'IntObjectConstr', 5), + + %%========================================================== + %% INTEGER constraints defined using named INTEGERs. + %%========================================================== + 42 = 'Constraints':'constrainedNamedInt-1'(), + 100 = 'Constraints':'constrainedNamedInt-2'(), + range_error(Rules, 'ConstrainedNamedInt', 41), + roundtrip('ConstrainedNamedInt', v1), + range_error(Rules, 'ConstrainedNamedInt', 43), + + range_error(Rules, 'SeqWithNamedInt', {'SeqWithNamedInt',-100}), + roundtrip('SeqWithNamedInt', {'SeqWithNamedInt',v2}), + ok. %% PER: Ensure that if the lower bound is Lb, Lb+16#80 is encoded |