Minor refactoring in type_test.cpp.