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/testInfObjectClass.erl | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'lib/asn1/test/testInfObjectClass.erl') diff --git a/lib/asn1/test/testInfObjectClass.erl b/lib/asn1/test/testInfObjectClass.erl index e639066246..98408502c6 100644 --- a/lib/asn1/test/testInfObjectClass.erl +++ b/lib/asn1/test/testInfObjectClass.erl @@ -37,15 +37,12 @@ main(Rule) -> {component,'ArgumentType'}, {value,_},_}}} = asn1_wrapper:encode('InfClass','Seq', {'Seq',12,13,1}), - Bytes2 = - if - Rule==per;Rule==per_bin -> - [1,12,1,11,1,1]; - Rule == uper_bin -> - <<1,12,1,11,1,1>>; - true -> - [48,9,2,1,12,2,1,11,2,1,1] - end, + Bytes2 = case Rule of + ber -> + <<48,9,2,1,12,2,1,11,2,1,1>>; + _ -> + <<1,12,1,11,1,1>> + end, ?line {error,{asn1,{'Type not compatible with table constraint', {{component,_}, {value,_B},_}}}} = -- cgit v1.2.3