Mbpp/560

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度413 字符
模型生成的代码 (413 字符)
def union_elements(tup1, tup2):
    """
    Return the union of the elements of two tuples in sorted order.
    
    Args:
        tup1: First tuple.
        tup2: Second tuple.
        
    Returns:
        A tuple containing all unique elements from both input tuples,
        sorted in ascending order.
    """
    # Combine the sets and sort the unique elements
    return tuple(sorted(set(tup1) | set(tup2)))
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试