Commit a7aa90c5 authored by v0-e's avatar v0-e

jer: Enable randomized tests

parent 7be9dd86
...@@ -162,6 +162,8 @@ static syntax_selector input_encodings[] = { ...@@ -162,6 +162,8 @@ static syntax_selector input_encodings[] = {
"Input is in Aligned PER (Packed Encoding Rules)"}, "Input is in Aligned PER (Packed Encoding Rules)"},
{"xer", ATS_BASIC_XER, CODEC_OFFSET(xer_decoder), {"xer", ATS_BASIC_XER, CODEC_OFFSET(xer_decoder),
"Input is in XER (XML Encoding Rules)"}, "Input is in XER (XML Encoding Rules)"},
{"jer", ATS_JER, CODEC_OFFSET(jer_decoder),
"Input is in JER (JSON Encoding Rules)"},
{0, ATS_INVALID, 0, 0}}; {0, ATS_INVALID, 0, 0}};
static syntax_selector output_encodings[] = { static syntax_selector output_encodings[] = {
......
...@@ -23,6 +23,7 @@ static const struct encoding_map { ...@@ -23,6 +23,7 @@ static const struct encoding_map {
{"OER", "oer", ATS_CANONICAL_OER}, {"OER", "oer", ATS_CANONICAL_OER},
{"UPER", "uper", ATS_UNALIGNED_CANONICAL_PER}, {"UPER", "uper", ATS_UNALIGNED_CANONICAL_PER},
{"XER", "xer", ATS_CANONICAL_XER}, {"XER", "xer", ATS_CANONICAL_XER},
{"JER", "jer", ATS_JER},
}; };
static enum asn_transfer_syntax static enum asn_transfer_syntax
...@@ -52,7 +53,7 @@ static void __attribute__((constructor)) initialize() { ...@@ -52,7 +53,7 @@ static void __attribute__((constructor)) initialize() {
syntax = lookup_syntax(data_dir); syntax = lookup_syntax(data_dir);
if(syntax == ATS_INVALID) { if(syntax == ATS_INVALID) {
fprintf(stderr, fprintf(stderr,
"Expected ASN1_DATA_DIR={der,oer,uper,xer} environment " "Expected ASN1_DATA_DIR={der,oer,uper,xer,jer} environment "
"variable.\n"); "variable.\n");
exit(EX_UNAVAILABLE); exit(EX_UNAVAILABLE);
} }
...@@ -93,7 +94,8 @@ usage(const char *progname) { ...@@ -93,7 +94,8 @@ usage(const char *progname) {
"BER)\n" "BER)\n"
" OER Canonical Octet Encoding Rules\n" " OER Canonical Octet Encoding Rules\n"
" UPER Canonical Unaligned Packed Encoding Rules\n" " UPER Canonical Unaligned Packed Encoding Rules\n"
" XER XML Encoding Rules\n", " XER XML Encoding Rules\n"
" JER JSON Encoding Rules\n",
progname); progname);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment