hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 82a2d87352daaec9df3c0076efd30c85820878e0
parent 80e45e4d931a6e90d999846b86471cac00d2a6d5
Author: Bor Grošelj Simić <bgs@turminal.net>
Date:   Fri,  9 Feb 2024 00:12:33 +0100

test: don't count result interpretation in consumed time

That added a significant amount of overhead to shorter tests, especially
the first one ran for some reason.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>

Diffstat:
Mtest/+test.ha | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/test/+test.ha b/test/+test.ha @@ -206,11 +206,10 @@ fn do_test(ctx: *context, test: test) void = { memio::reset(&ctx.stderr); const start_time = time::now(time::clock::MONOTONIC); - const status = run_test(ctx, test); - const failed = interpret_status(ctx, test.name, status); - const end_time = time::now(time::clock::MONOTONIC); + + const failed = interpret_status(ctx, test.name, status); const time_diff = time::diff(start_time, end_time); assert(time_diff >= 0); ctx.total_time += time_diff;