Migrate the tests to use gocheck.

For some weird reason, known only to core gccgo hackers, this fixes the tests on gccgo.

The test suite now passes with both gc and gccgo.