Skip to content

Commit

Permalink
✨ show loading bar for remaining ms
Browse files Browse the repository at this point in the history
  • Loading branch information
froz42 committed Mar 29, 2023
1 parent d96b6c0 commit 725c205
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions host/srcs/output/pretty/pretty_test_result.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ void write_test_result_pretty(t_test_result_display *result)

const size_t remaining_test = result->total_tests - result->actual_test;
const msseconds_t remaining_time = _mean_run_time * remaining_test;
// if less than 1 second remaining, we don't display the time
erase_line();
if (remaining_time > 1000)
// if it's the last test, we don't need to show the loading bar
if (result->total_tests - result->actual_test > 1)
write_loading_bar(
result->actual_test,
result->total_tests,
Expand Down

0 comments on commit 725c205

Please sign in to comment.