aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/testOpenTypeImplicitTag.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asn1/test/testOpenTypeImplicitTag.erl')
-rw-r--r--lib/asn1/test/testOpenTypeImplicitTag.erl19
1 files changed, 5 insertions, 14 deletions
diff --git a/lib/asn1/test/testOpenTypeImplicitTag.erl b/lib/asn1/test/testOpenTypeImplicitTag.erl
index a37d8004ef..0fbf70d037 100644
--- a/lib/asn1/test/testOpenTypeImplicitTag.erl
+++ b/lib/asn1/test/testOpenTypeImplicitTag.erl
@@ -24,18 +24,9 @@
-include_lib("test_server/include/test_server.hrl").
main(_Rules) ->
-
- ?line {ok,Bytes1} =
- asn1_wrapper:encode('OpenTypeImplicitTag','Seq',
- {'Seq',[1,1,255],[1,1,255],12,[1,1,255]}),
- ?line {ok,{'Seq',_,_,12,_}} =
- asn1_wrapper:decode('OpenTypeImplicitTag','Seq',
- lists:flatten(Bytes1)),
-
- ?line {ok,Bytes2} =
- asn1_wrapper:encode('OpenTypeImplicitTag','Seq',
- {'Seq',[1,1,255],asn1_NOVALUE,12,[1,1,255]}),
- ?line {ok,{'Seq',_,asn1_NOVALUE,12,_}} =
- asn1_wrapper:decode('OpenTypeImplicitTag','Seq',
- lists:flatten(Bytes2)),
+ roundtrip('Seq', {'Seq',<<1,1,255>>,<<1,1,255>>,12,<<1,1,255>>}),
+ roundtrip('Seq', {'Seq',<<1,1,255>>,asn1_NOVALUE,12,<<1,1,255>>}),
ok.
+
+roundtrip(T, V) ->
+ asn1_test_lib:roundtrip('OpenTypeImplicitTag', T, V).