From e00875a5e94f2953a2b06823f84f3502520e38c4 Mon Sep 17 00:00:00 2001 From: Xiao Xia <1378663164@qq.com> Date: Sun, 25 Sep 2022 00:06:48 +0800 Subject: [PATCH] Fix go inspection in inspect_result.py --- codegeex/benchmark/inspect_result.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/codegeex/benchmark/inspect_result.py b/codegeex/benchmark/inspect_result.py index c56de79..dc0298c 100644 --- a/codegeex/benchmark/inspect_result.py +++ b/codegeex/benchmark/inspect_result.py @@ -212,7 +212,9 @@ def inspect_result( result_stats[task_id]["runtime error"] += 1 elif language_type == "go": - if "undefined" in error: + if "Error: \tNot equal:" in error: + result_stats[task_id]["assertion error"] += 1 + elif "undefined" in error: result_stats[task_id]["undefined error"] += 1 elif "expected" in error and "found" in error: result_stats[task_id]["syntax error"] += 1 @@ -221,7 +223,7 @@ def inspect_result( elif "unexpected" in error: result_stats[task_id]["syntax error"] += 1 elif "FAIL" in error: - result_stats[task_id]["assertion error"] += 1 + result_stats[task_id]["runtime error"] += 1 elif "timed out" in error: result_stats[task_id]["timeout error"] += 1 elif "not used" in error: