aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/testInfObj.erl
AgeCommit message (Collapse)Author
2015-06-18Change license text to APLv2Bruce Yinhe
2015-01-12asn1ct_parser2: Clean up error handling and reportingBjörn Gustavsson
Errors were reported using a throw like this: throw({asn1_error,{get_line(hd(Tokens)),get(asn1_module), [got,get_token(hd(Tokens)),expected,typereference]}}). The attempt to tell the user what was expected was often mis-leading. It is time-consuming and non-trival to provide correct information of what is expected. Therefore, we will not even try. Instead we will spend more effort to report the token where the error was discovered. We will replace each throw with a function call: parse_error(Tokens). Also add the syntax_SUITE test suite to test error reporting and to cover all error reporting code. Remove the old c_syntax/1 test case. Also remove all out-commented code.
2015-01-12Clean up checking of object setsBjörn Gustavsson
2015-01-12Clean up and correct table constraint handlingBjörn Gustavsson
2015-01-12Remove special case in parserBjörn Gustavsson
The parser handled the builtin ABSTRACT-SYNTAX and TYPE-IDENTIFIER classes specially, which caused problems. It turns out that there is no longer any need to handle those classes specially.
2015-01-12Handle CLASS.&field when checking valuesBjörn Gustavsson
2015-01-12Clean up and correct validation of OBJECT IDENTIFIER/RELATIVE-OIDDan Gudmundsson
Besides simplifying the code and doing better error checking and error reporting, fix the following bugs: Support retrieving an OBJECT IDENTIFIER/RELATIVE-OID from an object. Example: oid OBJECT IDENTIFIER ::= some-object.&some-field Allow an integer constant first in an OBJECT IDENTIFIER: integer INTEGER ::= 0 oid OBJECT IDENTIFIER ::= {integer 1}
2015-01-12per/uper: Fix code generation for nested types in objectsBjörn Gustavsson
2015-01-12asn1: Fix BER generation for non optional and extended object setsDan Gudmundsson
Object sets with extension mark and without optional fields was not generated properly. It needs the default [enc|dec]_xxx function clause for the open type but no other clauses.
2014-09-01Workaround for combining two object sets separated by extensionBjörn Gustavsson
The following type of code would crash the compiler: OSET SOME-CLASS ::= {OSET1, ..., OSET2}
2014-01-24Fix OCTET STRINGBjörn Gustavsson
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-08-30BER: Handle multiple optional SEQUENCE fields with table constraintsBjörn Gustavsson
2013-08-30Test OPTIONAL and DEFAULT for open typesBjörn Gustavsson
2013-08-30PER/UPER: Fix encoding of an object set with multiple inlined constructsBjörn Gustavsson
Also extend the test suite with more tests of inlined constructs in object sets.
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-05-31asn1ct_check: Don't pass on #'ObjectClassFieldType'{} with fixed typeBjörn Gustavsson
Simplify the backends by letting asn1ct_check replacing a with the actual type.
2013-05-31BER: Fix handling of a constructed default value for a classBjörn Gustavsson
2013-05-31PER/UPER: Share all code except encoding of primitivesBjörn Gustavsson
The only code that is really different between the PER and UPER backends is encoding of primitive types.
2013-05-31UPER: Fix bug in encoding/decoding of default typesBjörn Gustavsson
The wrong backend was used.
2013-05-31testInfObj: Introduce roundtrip/3 to simplify the test suiteBjörn Gustavsson
2012-02-28[asn1] Parallelize test suitesAdam Lindberg
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: 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.