code generation tests