Port tests to a new framework.

When merging this: add 'Fixes #13.'