modify expression test code for simplifying type