Move examples to tests and add to cargo

The tests could probably be organized a bit and named more descriptively but
for now I'd just like to give us some coverage.