Port tests to a new framework.

When merging this, add 'Fixes #13' to the merge commit message.