aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-11-27 16:08:03 +0100
committerBjörn Gustavsson <[email protected]>2014-01-20 12:22:41 +0100
commitb39df70c54036dae66bec08402308ba094bdd3e5 (patch)
treeb9d42ea372417abbd91fb583df6411094116168a
parent1a3d2435e28d0dcb5e8f5a4bcd82c8b3d2db495b (diff)
downloadotp-b39df70c54036dae66bec08402308ba094bdd3e5.tar.gz
otp-b39df70c54036dae66bec08402308ba094bdd3e5.tar.bz2
otp-b39df70c54036dae66bec08402308ba094bdd3e5.zip
Test open types that may need more than 128 bytes
-rw-r--r--lib/asn1/test/asn1_SUITE_data/SeqPrim.asn17
-rw-r--r--lib/asn1/test/testSeqPrim.erl4
2 files changed, 11 insertions, 0 deletions
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) ->