A while back I wrote a small unit testing framework called "µnit", and it just occured to me that I haven't posted about it here, which is unfortunate since it was written with compression libraries in mind and works rather well for them.
It consists of a single header and a single C source file, and it doesn't require any configuration information from the build system, so it's pretty trivial to integrate. It's quite portable, and permissively licensed (MIT). There is some pretty good documentation (IMHO), so I won't go into too much detail here, but there are a few features which are very interesting for compression libraries:
First, there is a built-in pseudo-random number generator which will produce reproducible random data. This lets you increase coverage a bit without exhaustive (i.e., extremely time-consuming) tests, and you can still reproduce any failures by feeding the seed back into another execution. There are functions for generating ints, doubles, and arbitrary-sized blobs of data.
The output includes basic timing information (CPU and wall clock), so it can be used for benchmarking; you can even request that the test be run multiple times and have the results averaged.
It also supports parameterized tests, which basically provides an easy way to pass different arguments to a test (like compression level, how much memory to use, etc.). You can have multiple arguments, and every combination will be tried automatically.
Of course, it also includes everything else you probably expect from a testing framework, including nested test suites, loads of handy assertion macros (including memory comparison, which is very handy for data compression), and a rather nice CLI.
Anyways, if you're writing compression code, it might be worth taking a look. Unit tests are always nice, and µnit makes writing them relatively painless. If you have any questions/comments/hate mail let me know; it's always nice to get feedback, especially criticism.