test: move test from CodeGen to Sema

Move test from CodeGen to Sema to more accurately reflect what is being tested
as pointed out by Alp.