aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/testContextSwitchingTypes.erl
AgeCommit message (Collapse)Author
2017-05-04Update copyright yearRaimo Niskanen
2017-02-06Teach the ASN.1 compiler the 'maps' optionBjörn Gustavsson
When the 'maps' option is given, the SEQUENCE and SET types are represented as maps instead of as records. Optional and default values must be not be given as asn1_NOVALUE or asn1_DEFAULT in a map passed to the M:encode/2 function; they must be omitted from the map. Similarly, when decoding missing values will be omitted from the map. No .hrl files will be generated when the 'maps' options is used. That means values in an ASN.1 module must be retrieved by calling the appropriate function in generated module. Since we one day hope to get rid of the options 'compact_bit_string', 'legacy_bit_string', and 'legacy_erlang_types', we will not allow them to be combined with the 'maps' option.
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-03-18Replace ?config() macro with proplists:get_value()Björn Gustavsson
2016-03-15update copyright-yearHenrik Nord
2016-02-17Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson
As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
2015-06-18Change license text to APLv2Bruce Yinhe
2014-11-26asn1: Fix EXTERNAL (1994 variant) type conversionDan Gudmundsson
Missed to add seqtag handling for EXTERNAL type conversion, bug introduced in c266196c016fc1156c7a18cfeec4920ee4075519
2013-09-18Eliminate the use of asn1_wrapperBjörn Gustavsson
The asn1_wrapper made some sense when encode functions could either produce a list or a binary, depending on the backend. Now encode functions always produce a binary. To improve readbility of the test suites, eliminate the asn1_wrapper functions by replacing them with calls to one of the roundtrip functions in asn1_test_lib. When it is not possible to use the roundtrip functions, call the module in question directly. While at it, also remove ?line macros that are near to the touched code and use asn1_test_lib:hex_to_bin/1 instead of home-brewn hex conversion routines.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-22Fix EXTERNAL 1990/1994 conversion information lossBjörn Gustavsson
There are two different definitions of the EXTERNAL data type in ASN.1: the original from 1990 and an updated from 1994. Both defintions are encoded in the same way (in BER). There are still systems in use that use the old definition of EXTERNAL, so the asn1 application must still support both. It has been decided that the asn1 application should handle both the forms without any compiler options. Internally the asn1 application uses the 1990 definition. The encode functions will accept both definitions, but translate the 1994 format to the 1990 format if needed. When decoding, it will decode to the 1990 definition format first and then translate to the 1994 defintion format. One problem with this approach is that the conversion to the 1994 format may not be loss-less (where the 1990 defintion had a CHOICE between an OPEN TYPE, OCTET STRING, or BIT STRING, the 1994 definition only supports an OCTET STRING), and therefore it might not be possible to correctly re-encode the data in the 1990 format. It seems that the only reliable way to handle that problem is to not do the conversion to the 1994 format if the conversion is not loss-less. (There is an attempt when translating to the 1990 format to recover the CHOICE alternative based on the Erlang type of the data value, but that is neither reliable nor future-proof.) That is, when decoding an EXTERNAL value, the resulting tuple could either conform to the 1990 or 1994 definition, and applications must be prepared to handle that. The mail conversation where this issue was first reported can be found here: http://erlang.org/pipermail/erlang-questions/2011-April/057697.html Reported-by: Harald Welte <[email protected]>
2012-02-28[asn1] Parallelize test suitesAdam Lindberg
2012-02-28[asn1] Make tables and processes unnamedAdam Lindberg
- Refactor and clean up asn1_db process - Remove unused stop function in asn1ct.erl - Remove infinite loop possibilites in asn1ct_check.erl - test/1,2,3 now run in separate process - Update documentation for new test options
2011-05-19Corrected handling of long length in driver and updated test suitesKenneth Lundin
2010-03-16Merge branch 'bg/asn1-tests' into devErlang/OTP
* bg/asn1-tests: asn1 tests: Let ts:run() build the tests asn1 tests: No longer tolerate compilation warnings asn1 tests: Eliminate use of deprecated concat_binary/1 asn1 tests: Eliminate warning for an unused variable asn1 tests: Modernize guard tests asn1 tests: Clean up comments asn1 tests: Don't refer to $ERL_TOP in compiler options OTP-8520 bg/asn1-tests
2010-03-11asn1 tests: Modernize guard testsBjörn Gustavsson
2010-03-11asn1 tests: Don't refer to $ERL_TOP in compiler optionsBjörn Gustavsson
On Windows, $ERL_TOP contains a cygwin-style pathname that can be used in Makefiles to (for instance) include other Makefiles, but must not be passed to non-cygwin programs such as "erlc". Therefore, using compiler options such as "-I $(ERL_TOP)/lib/test_server/include" will not work on Windows. Fix this problem by include "test_server.hrl" using -include_lib() instead of -include(). That works because -include_lib() searches for include files in the code path without the need for any -I options.
2010-02-19OTP-8463 Support for EXTENSIBILITY IMPLIED and SET/SEQ OF NamedType isKenneth Lundin
added.