Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions noir/noir-repo/tooling/nargo/src/ops/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{errors::try_to_diagnose_runtime_error, NargoError};

use super::{execute_circuit, DefaultForeignCallExecutor};

#[derive(Debug)]
Comment thread
TomAFrench marked this conversation as resolved.
Outdated
pub enum TestStatus {
Pass,
Fail { message: String, error_diagnostic: Option<FileDiagnostic> },
Expand Down
6 changes: 3 additions & 3 deletions noir/noir-repo/tooling/nargo_cli/src/cli/test_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ pub(crate) fn run(
};
}

if test_report.iter().any(|(_, status)| !matches!(status, TestStatus::Fail { .. })) {
Copy link
Copy Markdown
Member Author

@Maddiaa0 Maddiaa0 Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously if any tests passed it would report a pass status code

Ok(())
} else {
if test_report.iter().any(|(_, status)| matches!(status, TestStatus::Fail { .. })) {
Err(CliError::Generic(String::new()))
} else {
Ok(())
}
}

Expand Down