From b39df70c54036dae66bec08402308ba094bdd3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 27 Nov 2013 16:08:03 +0100 Subject: Test open types that may need more than 128 bytes --- lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1 | 7 +++++++ lib/asn1/test/testSeqPrim.erl | 4 ++++ 2 files changed, 11 insertions(+) (limited to 'lib/asn1') diff --git a/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1 b/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1 index 20c4126c0b..7068674647 100644 --- a/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1 +++ b/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1 @@ -16,4 +16,11 @@ Seq ::= SEQUENCE Empty ::= SEQUENCE {} +Big ::= SEQUENCE { + ..., + os1 [1] OCTET STRING (SIZE (120..130)) OPTIONAL, + os2 [2] OCTET STRING (SIZE (128..256)) OPTIONAL, + os3 [3] OCTET STRING (SIZE (17000..30000)) OPTIONAL +} + END diff --git a/lib/asn1/test/testSeqPrim.erl b/lib/asn1/test/testSeqPrim.erl index eb21d50a37..46bac77910 100644 --- a/lib/asn1/test/testSeqPrim.erl +++ b/lib/asn1/test/testSeqPrim.erl @@ -25,6 +25,7 @@ -record('Seq',{bool, boolCon, boolPri, boolApp, boolExpCon, boolExpPri, boolExpApp}). -record('Empty',{}). +-record('Big', {os1,os2,os3}). main(_Rules) -> roundtrip('Seq', #'Seq'{bool=true,boolCon=true,boolPri=true,boolApp=true, @@ -35,6 +36,9 @@ main(_Rules) -> roundtrip('Seq', #'Seq'{bool=false,boolCon=true,boolPri=false,boolApp=true, boolExpCon=false,boolExpPri=true,boolExpApp=false}), roundtrip('Empty', #'Empty'{}), + roundtrip('Big', #'Big'{os1=lists:duplicate(120, 16#A5), + os2=lists:duplicate(128, 16#A7), + os3=lists:duplicate(17777, 16#F5)}), ok. roundtrip(Type, Value) -> -- cgit v1.2.3