diff options
author | Björn Gustavsson <[email protected]> | 2013-04-16 10:40:32 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-05-31 14:52:23 +0200 |
commit | a1495bd1e09dbefa8595e9388140140c143088f2 (patch) | |
tree | dc19bf40b19ca89b0c6e11b0874ffefa3ce2d05b /lib/asn1/test/testConstraints.erl | |
parent | e0a1be73c126998b37ca42bbdc1da3d40bef3723 (diff) | |
download | otp-a1495bd1e09dbefa8595e9388140140c143088f2.tar.gz otp-a1495bd1e09dbefa8595e9388140140c143088f2.tar.bz2 otp-a1495bd1e09dbefa8595e9388140140c143088f2.zip |
PER/UPER: Fix decoding of semi-constrained INTEGERs
A semi-constrained INTEGER with a non-zero lower bound would be
incorrectly decoded. This bug was introduced in R16.
Diffstat (limited to 'lib/asn1/test/testConstraints.erl')
-rw-r--r-- | lib/asn1/test/testConstraints.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl index fc217e45f7..b90ae8cab2 100644 --- a/lib/asn1/test/testConstraints.erl +++ b/lib/asn1/test/testConstraints.erl @@ -122,6 +122,16 @@ int_constraints(Rules) -> range_error(Rules, 'X1', 21), %%========================================================== + %% SemiConstrained + %%========================================================== + + roundtrip('SemiConstrained', 100), + roundtrip('SemiConstrained', 397249742397243), + roundtrip('NegSemiConstrained', -128), + roundtrip('NegSemiConstrained', -1), + roundtrip('NegSemiConstrained', 500), + + %%========================================================== %% SIZE Constraint (Duboisson p. 268) %% T ::= IA5String (SIZE (1|2, ..., SIZE (1|2|3))) %% T2 ::= IA5String (SIZE (1|2, ..., 3)) |