aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/testInfObj.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-08-30 07:51:02 +0200
committerBjörn Gustavsson <[email protected]>2013-08-30 10:13:17 +0200
commita5c7d1c0ecd8a8b78ae162aeb735501ef49e014b (patch)
tree2f6d38b3fc049f3ee36c59b6c7cbec571c1ec647 /lib/asn1/test/testInfObj.erl
parent9096522efd263f719ab9bc56670406a73ac1d818 (diff)
downloadotp-a5c7d1c0ecd8a8b78ae162aeb735501ef49e014b.tar.gz
otp-a5c7d1c0ecd8a8b78ae162aeb735501ef49e014b.tar.bz2
otp-a5c7d1c0ecd8a8b78ae162aeb735501ef49e014b.zip
BER: Handle multiple optional SEQUENCE fields with table constraints
Diffstat (limited to 'lib/asn1/test/testInfObj.erl')
-rw-r--r--lib/asn1/test/testInfObj.erl14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/asn1/test/testInfObj.erl b/lib/asn1/test/testInfObj.erl
index 7241f7b380..76f216fdad 100644
--- a/lib/asn1/test/testInfObj.erl
+++ b/lib/asn1/test/testInfObj.erl
@@ -107,8 +107,18 @@ main(_Erule) ->
roundtrip('InfObj', 'DefaultInSeq', {'DefaultInSeq',3,false}),
roundtrip('InfObj', 'DefaultInSeq', {'DefaultInSeq',3,true}),
{'DefaultInSeq',3,true} =
- enc_dec('InfObj', 'DefaultInSeq', {'DefaultInSeq',3,asn1_DEFAULT}).
-
+ enc_dec('InfObj', 'DefaultInSeq', {'DefaultInSeq',3,asn1_DEFAULT}),
+
+ roundtrip('InfObj', 'Multiple-Optionals',
+ {'Multiple-Optionals',1,42,true,"abc"}),
+ roundtrip('InfObj', 'Multiple-Optionals',
+ {'Multiple-Optionals',1,asn1_NOVALUE,true,"abc"}),
+ roundtrip('InfObj', 'Multiple-Optionals',
+ {'Multiple-Optionals',1,42,asn1_NOVALUE,"abc"}),
+ roundtrip('InfObj', 'Multiple-Optionals',
+ {'Multiple-Optionals',1,42,true,asn1_NOVALUE}),
+ roundtrip('InfObj', 'Multiple-Optionals',
+ {'Multiple-Optionals',1,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}).
roundtrip(M, T, V) ->
{ok,Enc} = M:encode(T, V),