diff options
author | Kenneth Lundin <[email protected]> | 2012-03-29 17:16:31 +0200 |
---|---|---|
committer | Kenneth Lundin <[email protected]> | 2012-03-29 17:17:39 +0200 |
commit | 6a3780b940c9406a48df6d55a0623e6d01892ac4 (patch) | |
tree | 358719f79a59d8d58fb3d91dd3effa6d257af533 /lib/asn1/test/testConstraints.erl | |
parent | e1dda02164dfff667c7247502de442195a4b7d42 (diff) | |
parent | f2802b90d02f41079dd7db4e14dbe9b6fea91255 (diff) | |
download | otp-6a3780b940c9406a48df6d55a0623e6d01892ac4.tar.gz otp-6a3780b940c9406a48df6d55a0623e6d01892ac4.tar.bz2 otp-6a3780b940c9406a48df6d55a0623e6d01892ac4.zip |
Merge branch 'kenneth/asn1/integer_range/OTP-9946' into maint
* kenneth/asn1/integer_range/OTP-9946:
replace 5 sec timeout (too short) with monitor in asn1_db requests
Correct handling of INTEGER (1..4 | 8 | 10 | 20)
Diffstat (limited to 'lib/asn1/test/testConstraints.erl')
-rw-r--r-- | lib/asn1/test/testConstraints.erl | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl index cb15a24359..1ce68ec522 100644 --- a/lib/asn1/test/testConstraints.erl +++ b/lib/asn1/test/testConstraints.erl @@ -127,17 +127,26 @@ int_constraints(Rules) -> ?line {ok,0} = asn1_wrapper:decode('Constraints','I',Bytes12), ?line {ok,Bytes13} = asn1_wrapper:encode('Constraints','I',20), ?line {ok,20} = asn1_wrapper:decode('Constraints','I',Bytes13), - + + %%========================================================== + %% Constraint Combinations (Duboisson p. 285) + %% X1 ::= INTEGER (1..4|8|10|20) + %%========================================================== + + ?line {ok,Bytes14} = asn1_wrapper:encode('Constraints','X1',1), + ?line {ok,1} = asn1_wrapper:decode('Constraints','X1',Bytes14), + ?line {ok,Bytes15} = asn1_wrapper:encode('Constraints','X1',20), + ?line {ok,20} = asn1_wrapper:decode('Constraints','X1',Bytes15), %%========================================================== %% SIZE Constraint (Duboisson p. 268) %% T ::= IA5String (SIZE (1|2, ..., SIZE (1|2|3))) %% T2 ::= IA5String (SIZE (1|2, ..., 3)) %%========================================================== - ?line {ok,Bytes14} = asn1_wrapper:encode('Constraints','T',"IA"), - ?line {ok,"IA"} = asn1_wrapper:decode('Constraints','T',Bytes14), - ?line {ok,Bytes15} = asn1_wrapper:encode('Constraints','T2',"IA"), - ?line {ok,"IA"} = asn1_wrapper:decode('Constraints','T2',Bytes15). + ?line {ok,Bytes16} = asn1_wrapper:encode('Constraints','T',"IA"), + ?line {ok,"IA"} = asn1_wrapper:decode('Constraints','T',Bytes16), + ?line {ok,Bytes17} = asn1_wrapper:encode('Constraints','T2',"IA"), + ?line {ok,"IA"} = asn1_wrapper:decode('Constraints','T2',Bytes17). refed_NNL_name(_Erule) -> |