bcr-unittest/clean -- a script for cleaning up built files
bcr-unittest/printable-string-encoded/driver.c -- the main driver for
the test case
bcr-unittest/printable-string-encoded/expected.bin -- the expected
output (from stdout)
bcr-unittest/printable-string-encoded/input.asn -- the input ASN.1
bcr-unittest/runtests -- a script for running all the tests
bcr-unittest/test-util.c -- helper code for the tests
bcr-unittest/test-util.h -- header for the helper code for the tests
The basic operation is pretty simple, and the core of the "runtests"
script is as follows:
for each directory
Compile input.asn to input.[ch]
Compile *.c plus ../test-util.c into testprog
Run testprog with input.bin (if present) as stdin, saving output to
actual.bin
Diff expected.bin and actual.bin, if there's any differences, the
process has failed
This still needs some work -- it doesn't catch compile errors for
instance.
I'll write some more tests and see how I feel about this tomorrow. Let
me know if this is interesting.
Blake