Consolidate some test cases.

The TypeCheckerTest now tests the type checker on both valid input
and input with type errors (it will look for a corresponding
.expected file to determine whether errors are expected or not).