Initial version of spec-generated tests

This might not yet be ready for primetime, but here's a PR to serve as a kick-starter for discussions.