Add type checking and code gen to the test