Age | Commit message (Collapse) | Author |
|
For DER/PER/UPER, a value equal to the DEFAULT is not supposed to
be encoded.
BIT STRINGs values can be represented as Erlang terms in four
different ways: as an integer, as a list of zeroes and ones,
as a {Unused,Binary} tuple, or as an Erlang bitstring.
When encoding a BIT STRING, only certain representations of
BIT STRINGs values were recognized. All representations must
be recognized.
When decoding a DEFAULT value for a BIT STRING, the actual value
given in the decoding would be either an integer or a list
of zeroes and one (depending on how the literal was written in
the specification). We expect that the default value should be
in the same representation as any other BIT STRING value (i.e.
by default an Erlang bitstring, or a list if the 'legacy_bitstring'
option has been given, or as compact bitstring if 'compact_bitstring'
has been given).
|
|
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.
|
|
|
|
Add the option 'legacy_bit_string' to decode to the old list format.
|
|
|
|
* 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
|
|
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.
|
|
added.
|