diff options
author | Björn Gustavsson <[email protected]> | 2013-03-02 12:46:37 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-05-31 14:52:17 +0200 |
commit | 53022b787c723a6c4cdf153f5705bde5fb4655ea (patch) | |
tree | adbf876f8bd408de08ac2db5e8bdc089b8cb0fba /lib/asn1/test/testConstraints.erl | |
parent | c11b5a2ebb602c76d0957b67a0ca7741c45fea85 (diff) | |
download | otp-53022b787c723a6c4cdf153f5705bde5fb4655ea.tar.gz otp-53022b787c723a6c4cdf153f5705bde5fb4655ea.tar.bz2 otp-53022b787c723a6c4cdf153f5705bde5fb4655ea.zip |
Normalize SIZE constraints to simplify backends
Diffstat (limited to 'lib/asn1/test/testConstraints.erl')
-rw-r--r-- | lib/asn1/test/testConstraints.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl index d245f6d1d5..fc217e45f7 100644 --- a/lib/asn1/test/testConstraints.erl +++ b/lib/asn1/test/testConstraints.erl @@ -142,6 +142,9 @@ int_constraints(Rules) -> roundtrip('FixedSize2', "0123456789"), roundtrip('FixedSize2', "0123456789abcdefghij"), + range_error(Rules, 'FixedSize', "short"), + range_error(Rules, 'FixedSize2', "short"), + [roundtrip('VariableSize', lists:seq($A, $A+L-1)) || L <- lists:seq(1, 10)], @@ -181,7 +184,7 @@ range_error(ber, Type, Value) -> %% BER: Values outside the effective range should be rejected %% on decode. {ok,Encoded} = 'Constraints':encode(Type, Value), - {error,{asn1,{integer_range,_,_}}} = 'Constraints':decode(Type, Encoded), + {error,{asn1,_}} = 'Constraints':decode(Type, Encoded), ok; range_error(Per, Type, Value) when Per =:= per; Per =:= uper -> %% (U)PER: Values outside the effective range should be rejected |