From bc1cbecaacf7bf4a0d62101dd157cb911f02d37b Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Fri, 30 Jun 2023 08:49:53 +0200 Subject: [PATCH] Fix construction of Passes for older Julia versions. --- src/test-runners.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/test-runners.jl b/src/test-runners.jl index 3726bb5..50519b4 100644 --- a/src/test-runners.jl +++ b/src/test-runners.jl @@ -719,7 +719,13 @@ function convert_results_to_be_transferrable(res::Pass) else # Ignore the `res.data` field for Test.Pass, since it can contain values interpolated # into the Expr, which may only be valid in this process. - return Pass(res.test_type, res.orig_expr, nothing, res.value, res.source, res.message_only) + if VERSION >= v"1.8" + return Pass(res.test_type, res.orig_expr, nothing, res.value, res.source, res.message_only) + elseif VERSION >= v"1.7" + return Pass(res.test_type, res.orig_expr, nothing, res.value, res.source) + else + return Pass(res.test_type, res.orig_expr, nothing, res.value) + end end return res end