aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_test_lib.erl
AgeCommit message (Collapse)Author
2015-06-18Change license text to APLv2Bruce Yinhe
2015-01-12Add the rfcs test caseBjörn Gustavsson
Add the ASN.1 specs from RFC-5911 and RFC-5912.
2014-08-11BER: Test decoding of indefinite lengthsBjörn Gustavsson
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.
2014-06-05Test suites: Add support for running Dialyzer on generated codeBjörn Gustavsson
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.
2013-09-18asn1_test_lib: Add roundtrip functions and use them everywhereBjörn Gustavsson
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).
2013-09-18Move out specific tests from asn1_test_libBjörn Gustavsson
asn1_test_lib is supposed to be a general-purpose helper module for test cases. Move all specific test cases into asn1_SUITE.
2013-09-18asn1_test_lib: Remove unnecessary loading of a compiled ASN.1 specBjörn Gustavsson
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.
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-06-07Add asn1_test_lib:hex_to_bin/1Björn Gustavsson
2013-05-31When testing, don't tolerate warnings from the BEAM compilerBjörn Gustavsson
2013-05-31asn1_test_lib: Purge old code when loading a new moduleBjörn Gustavsson
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.
2013-05-31asn1_test_lib: Give more information when things goes wrongBjörn Gustavsson
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.
2013-01-22Remove the 'inline' and '{inline,OutputFile}' optionsBjörn Gustavsson
2012-11-23Remove obsolete back-ends and simplify the optionsBjörn Gustavsson
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.
2012-02-29[asn1] Refactor test cases and remove extra suitesAdam Lindberg
2012-02-28[asn1] Parallelize test suitesAdam Lindberg
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.