Switched testing to data-driven.

Makes it easier to add new test cases for existing tests. Also makes it
easier to move towards loop tests.