Use a single helper function t(type, expected)