测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 408 字符 |
模型生成的代码 (408 字符)
def replace_char(string: str, old_char: str, new_char: str) -> str:
"""
Replace all occurrences of old_char with new_char in the given string.
Args:
string: The original string.
old_char: The character to be replaced.
new_char: The character to replace with.
Returns:
A new string with replacements made.
"""
return string.replace(old_char, new_char)
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试