asn1: Make templating less fragile: test it more
`lib/asn1/check-gen.c` almost works with templates, and is a pretty extensive test. The only thing that fails is everything to do with IMPLICIT tags (so, `test_implicit()`). So now we compile `lib/asn1/test.asn1` both, w/ and w/o templating, and we build two programs from `lib/asn1/check-gen.c`: `check-gen` and `check-gen-template`, respectively linking with the non-templated and the templated compilation of `lib/asn1/test.asn1`. Because the template compiler still doesn't support IMPLICIT tagging well, we disable testing of IMPLICIT tags in `check-gen-template`. This will make it much harder to break the template compiler in the future.
This commit is contained in:
@@ -1016,6 +1016,7 @@ test_choice (void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef IMPLICIT_TAGGING_WORKS
|
||||
static int
|
||||
cmp_TESTImplicit (void *a, void *b)
|
||||
{
|
||||
@@ -1104,6 +1105,7 @@ test_implicit (void)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
cmp_TESTAlloc (void *a, void *b)
|
||||
@@ -1881,7 +1883,9 @@ main(int argc, char **argv)
|
||||
DO_ONE(test_large_tag);
|
||||
DO_ONE(test_choice);
|
||||
|
||||
#ifdef IMPLICIT_TAGGING_WORKS
|
||||
DO_ONE(test_implicit);
|
||||
#endif
|
||||
|
||||
DO_ONE(test_taglessalloc);
|
||||
DO_ONE(test_optional);
|
||||
|
Reference in New Issue
Block a user