Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
Test that the changes in the previous commit allows us to
compile ASN.1 modules in parallel.
|
|
* henrik/update-copyrightyear:
update copyright-year
|
|
Some test machines have quite small hard drives. Help them by
remove temporary files in end_per_test_case/2.
|
|
|
|
|
|
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.
|
|
|
|
|
|
Add the ASN.1 specs from RFC-5911 and RFC-5912.
|
|
The BER encoder always encodes length as definite lengths. Therefore
indefinite lengths are not well-tested. Add code to the roundtrip
functions in asn1_test_list to automatically rewrite definite
lengths to indefinite length and call the decoder again.
|
|
Running dialyzer on test suites is good for finding both bugs and
useless dialyzer warnings. Add a mechanism in asn1_test_lib for
turning on running of dialyzer on all generated code.
Turned off by default, because it is slow and because there are
still a few dialyzer warnings left.
|
|
Even if the roundtrip functions are very simply, putting them here
makes it possible to change its behavior in one place (e.g. if we
are to change encode and decode not to wrap the result in a ok tuple
in some future release).
|
|
asn1_test_lib is supposed to be a general-purpose helper module for
test cases. Move all specific test cases into asn1_SUITE.
|
|
asn1ct:compile/2 calls c:c/2 to invoke the compiler and to load
the compiled code. That means that there is no need load the module
after having invoked the ASN.1 compiler.
To make sure that we'll notice if that behavior changes in the future,
extend the rtUI/1 test case to verify that the loaded module has
the correct encoding rule (if asn1ct:compile/2 would fail to reload
the module, the previous encoding rule would be returned).
While at it, it also makes sense to test calling M:bit_string_format/0
to ensure that it continues working.
|
|
|
|
|
|
|
|
In the 64-bit run-time, there is about 40Mb in old code after
running the asn1 test suite. Since it is very easy to reclaim
that memory, let's do it. Also get rid of the unnecessary call
to code:soft_purge/1 just before loading the new code.
|
|
Ensure that compilation errors of Erlang code gets printed.
If compilation of an ASN.1 specification goes wrong, print out
the filename of the offending specification. It can be seen
in the test case log, but because most test cases run in a
parallel group, the test case log is not available until all
test case in the group have finished.
|
|
|
|
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.
|
|
|
|
|
|
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.
|