Hello Gerel. It would be better to have the filters' testing done by the pdf-filter utility (called from say, the 'check' Makefile rule) than by writing the tests by hand, as we're currently doing.
I don't agree. The unit testing of the public functions should be done in a controlled environment. pdf-filter.c introduces an additional layer. First, we save time and code (you can see many lines repeated in pdf-stm-write/read test files), I agree in that it is a problem. We can reduce the amount of reiterated code by using initialization or finalization static functions defined in the test files. and second we avoid the mess in those files due to string formatted binary data. We are going to introduce a little library for testing providing access to a set of files that the user can download from gnupdf.org. I am writing it while developing the jbig2 filters (the jbig2 sample data is quite big). It will be up in two days, aprox.
