CodeGen: Fix test to work with assertions as well