Skip to content

Commit

Permalink
jer: Enable randomized tests
Browse files Browse the repository at this point in the history
  • Loading branch information
v0-e committed Dec 8, 2023
1 parent 7be9dd8 commit a7aa90c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions skeletons/converter-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ static syntax_selector input_encodings[] = {
"Input is in Aligned PER (Packed Encoding Rules)"},
{"xer", ATS_BASIC_XER, CODEC_OFFSET(xer_decoder),
"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}};

static syntax_selector output_encodings[] = {
Expand Down
6 changes: 4 additions & 2 deletions tests/tests-randomized/random-test-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ static const struct encoding_map {
{"OER", "oer", ATS_CANONICAL_OER},
{"UPER", "uper", ATS_UNALIGNED_CANONICAL_PER},
{"XER", "xer", ATS_CANONICAL_XER},
{"JER", "jer", ATS_JER},
};

static enum asn_transfer_syntax
Expand Down Expand Up @@ -52,7 +53,7 @@ static void __attribute__((constructor)) initialize() {
syntax = lookup_syntax(data_dir);
if(syntax == ATS_INVALID) {
fprintf(stderr,
"Expected ASN1_DATA_DIR={der,oer,uper,xer} environment "
"Expected ASN1_DATA_DIR={der,oer,uper,xer,jer} environment "
"variable.\n");
exit(EX_UNAVAILABLE);
}
Expand Down Expand Up @@ -93,7 +94,8 @@ usage(const char *progname) {
"BER)\n"
" OER Canonical Octet 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);
}

Expand Down

0 comments on commit a7aa90c

Please sign in to comment.