diff options
Diffstat (limited to 'lib/asn1/test/testChoExtension.erl')
-rw-r--r-- | lib/asn1/test/testChoExtension.erl | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/asn1/test/testChoExtension.erl b/lib/asn1/test/testChoExtension.erl index c6a07646c2..09e19ceebb 100644 --- a/lib/asn1/test/testChoExtension.erl +++ b/lib/asn1/test/testChoExtension.erl @@ -31,16 +31,13 @@ extension(_Rules) -> %% A trick to encode with another compatible CHOICE type to test reception %% extension alternative - {ok,Bytes2x} = asn1_wrapper:encode('ChoExtension','ChoExt1x',{str,"abc"}), - {ok,Val2x} = - asn1_wrapper:decode('ChoExtension','ChoExt1',lists:flatten(Bytes2x)), - io:format("Choice extension alternative = ~p~n",[Val2x]), + roundtrip('ChoExt1x', {str,<<"abc">>}), roundtrip('ChoExt2', {bool,true}), roundtrip('ChoExt2', {int,33}), roundtrip('ChoExt3', {bool,true}), roundtrip('ChoExt3', {int,33}), - roundtrip('ChoExt4', {str,"abc"}), + roundtrip('ChoExt4', {str,<<"abc">>}), roundtrip('ChoEmptyRoot', {bool,false}), roundtrip('ChoEmptyRoot', {bool,true}), @@ -51,6 +48,4 @@ extension(_Rules) -> roundtrip(Type, Value) -> - {ok,Encoded} = 'ChoExtension':encode(Type, Value), - {ok,Value} = 'ChoExtension':decode(Type, Encoded), - ok. + asn1_test_lib:roundtrip('ChoExtension', Type, Value). |