From 6ef8cbdaaaa1c30a7dc4620635726f62084dbd22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 14 Nov 2012 10:15:08 +0100 Subject: Remove obsolete back-ends and simplify the options It is time to clean up the mess of back-ends. Remove all the obsolete back-ends and simplify the options used to select them. New Option Old Equivalent ---------- -------------- ber ber_bin,optimize,nif per per,optimize,nif uper uper_bin The old options will still be recognized and translated to the new options, but will also print a warning. That implies that deprecated features that only are implemented in the old 'ber' back-end will no longer work (e.g. the {Typename,Value} notation). Also make the return type for the generated encode/2 function consistent. It used to be a binary for per and uper, and an iolist for ber. Always make it a binary. --- lib/asn1/test/test_inline.erl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/asn1/test/test_inline.erl') diff --git a/lib/asn1/test/test_inline.erl b/lib/asn1/test/test_inline.erl index 62625572e3..e03ad739f9 100644 --- a/lib/asn1/test/test_inline.erl +++ b/lib/asn1/test/test_inline.erl @@ -41,16 +41,16 @@ inline1(Config, Rule, Opt) -> asn1_test_lib:compile("P-Record", Config, [{inline, 'inlined_P_Record'}|Opt]), test_inline1(), - ok=remove_inlined_files2(CaseDir, ber_bin_v2), + ok=remove_inlined_files2(CaseDir, ber), case Rule of - ber_bin_v2 -> + ber -> asn1_test_lib:compile("P-Record", Config, - [ber_bin, inline, asn1config, optimize|Opt]), + [ber, inline, asn1config|Opt]), test_inline2(Rule, 'P-Record'), remove_inlined_files3(CaseDir, Rule), asn1_test_lib:compile("p_record.set.asn", Config, - [ber_bin, inline, asn1config, optimize|Opt]), + [ber, inline, asn1config|Opt]), test_inline2(Rule, 'p_record'), remove_inlined_files4(CaseDir, Rule); _ -> @@ -71,12 +71,12 @@ test_inline1() -> ?line {ok,_}=asn1_wrapper:decode('inlined_P_Record', 'PersonnelRecord',Bytes). -test_inline2(ber_bin_v2,Mod) -> +test_inline2(ber,Mod) -> PRecMsg = {'PersonnelRecord',{'Name',"Sven","S","Svensson"}, "manager",123,"20000202",{'Name',"Inga","K","Svensson"}, asn1_DEFAULT}, ?line {ok,Bytes} = Mod:encode('PersonnelRecord',PRecMsg), - ?line {ok,_} = Mod:sel_dec(list_to_binary(Bytes)); + {ok,_} = Mod:sel_dec(Bytes); test_inline2(_,_) -> ok. @@ -243,7 +243,7 @@ remove_inlined_files2(Dir,Rule) -> ?line ok=file:delete(X) end,[TargetErl,TargetBeam]), ok. -remove_inlined_files3(Dir,ber_bin_v2) -> +remove_inlined_files3(Dir,ber) -> Erl=filename:join([Dir,"P-Record.erl"]), Beam=filename:join([Dir,"P-Record.beam"]), Asn1DB=filename:join([Dir,"P-Record.asn1db"]), @@ -255,7 +255,7 @@ remove_inlined_files3(Dir,ber_bin_v2) -> remove_inlined_files3(_,_) -> ok. -remove_inlined_files4(Dir,ber_bin_v2) -> +remove_inlined_files4(Dir,ber) -> Erl=filename:join([Dir,"p_record.erl"]), Beam=filename:join([Dir,"p_record.beam"]), Asn1DB=filename:join([Dir,"p_record.asn1db"]), -- cgit v1.2.3