Remove unused args in fmt_test_json

This commit is contained in:
Riley-Kilgore 2024-09-16 09:37:28 -07:00 committed by KtorZ
parent 8ac09025f5
commit d1a1d0ec01
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
2 changed files with 4 additions and 9 deletions

View File

@ -285,7 +285,7 @@ where
property_max_success, property_max_success,
} }
}, },
json: json, json,
}; };
self.compile(options) self.compile(options)

View File

@ -197,7 +197,7 @@ impl EventListener for Terminal {
"modules": group_by_module(&tests).iter().map(|(module, results)| { "modules": group_by_module(&tests).iter().map(|(module, results)| {
serde_json::json!({ serde_json::json!({
"name": module, "name": module,
"tests": results.iter().map(|r| fmt_test_json(r, max_mem, max_cpu, max_iter)).collect::<Vec<_>>(), "tests": results.iter().map(|r| fmt_test_json(r)).collect::<Vec<_>>(),
"summary": fmt_test_summary_json(results) "summary": fmt_test_summary_json(results)
}) })
}).collect::<Vec<_>>(), }).collect::<Vec<_>>(),
@ -520,12 +520,7 @@ fn fmt_test_summary<T>(tests: &[&TestResult<T, T>], styled: bool) -> String {
) )
} }
fn fmt_test_json( fn fmt_test_json(result: &TestResult<UntypedExpr, UntypedExpr>) -> serde_json::Value {
result: &TestResult<UntypedExpr, UntypedExpr>,
max_mem: usize,
max_cpu: usize,
max_iter: usize,
) -> serde_json::Value {
let mut test = json!({ let mut test = json!({
"name": result.title(), "name": result.title(),
"status": if result.is_success() { "PASS" } else { "FAIL" }, "status": if result.is_success() { "PASS" } else { "FAIL" },
@ -609,7 +604,7 @@ fn fmt_overall_summary_json(tests: &[TestResult<UntypedExpr, UntypedExpr>]) -> s
"modules": modules.into_iter().map(|(module, results)| { "modules": modules.into_iter().map(|(module, results)| {
json!({ json!({
"name": module, "name": module,
"tests": results.iter().map(|r| fmt_test_json(r, max_mem, max_cpu, max_iter)).collect::<Vec<_>>(), "tests": results.iter().map(|r| fmt_test_json(r)).collect::<Vec<_>>(),
"summary": fmt_test_summary_json(&results), "summary": fmt_test_summary_json(&results),
}) })
}).collect::<Vec<_>>(), }).collect::<Vec<_>>(),