core/conv: Add regression testing code

It tests both a given test vector encoding/decoding, and
some random coding/decoding cycles.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
6 files changed