测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 371 字符 |
模型生成的代码 (371 字符)
import re
def find_literals(text: str, pattern: str):
"""
Search the given text for the regex pattern and return a tuple
(matching_substring, start_index, end_index) for the first match.
If no match is found, return None.
"""
match = re.search(pattern, text)
if match:
return (match.group(), match.start(), match.end())
return None
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试