Skip to content

Commit

Permalink
change assertion condition
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed Apr 6, 2024
1 parent 79afe3d commit 7264cff
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions crates/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ pub fn test(matches: &ArgMatches, target: Target) -> io::Result<i32> {
render: roc_reporting::report::RenderTarget::ColorTerminal,
palette: roc_reporting::report::DEFAULT_PALETTE,
threading,
exec_mode,
exec_mode: exec_mode.clone(),
};
let load_result = roc_load::load_and_monomorphize(
arena,
Expand Down Expand Up @@ -555,10 +555,12 @@ pub fn test(matches: &ArgMatches, target: Target) -> io::Result<i32> {

// Print warnings before running tests.
{
debug_assert_eq!(
problems.errors, 0,
"if there were errors, we would have already exited."
);
if matches!(exec_mode, ExecutionMode::Test) {
debug_assert_eq!(
problems.errors, 0,
"if there were errors, we would have already exited."
);
}
if problems.warnings > 0 {
problems.print_error_warning_count(start_time.elapsed());
println!(".\n\nRunning tests…\n\n\x1B[36m{}\x1B[39m", "─".repeat(80));
Expand Down

0 comments on commit 7264cff

Please sign in to comment.