Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions noir-projects/noir-protocol-circuits/crates/types/src/hash.nr
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use crate::abis::side_effect::{SideEffect};
use crate::utils::uint256::U256;
use crate::constants::{
ARGS_HASH_CHUNK_COUNT, ARGS_HASH_CHUNK_LENGTH, CONTRACT_TREE_HEIGHT, FUNCTION_TREE_HEIGHT,
NUM_FIELDS_PER_SHA256, GENERATOR_INDEX__SILOED_NOTE_HASH,
GENERATOR_INDEX__OUTER_NULLIFIER, GENERATOR_INDEX__VK, GENERATOR_INDEX__CONSTRUCTOR,
GENERATOR_INDEX__PARTIAL_ADDRESS, GENERATOR_INDEX__CONTRACT_ADDRESS,
GENERATOR_INDEX__NOTE_HASH_NONCE, GENERATOR_INDEX__UNIQUE_NOTE_HASH, GENERATOR_INDEX__FUNCTION_ARGS
NUM_FIELDS_PER_SHA256, GENERATOR_INDEX__SILOED_NOTE_HASH, GENERATOR_INDEX__OUTER_NULLIFIER,
GENERATOR_INDEX__VK, GENERATOR_INDEX__CONSTRUCTOR, GENERATOR_INDEX__PARTIAL_ADDRESS,
GENERATOR_INDEX__CONTRACT_ADDRESS, GENERATOR_INDEX__NOTE_HASH_NONCE,
GENERATOR_INDEX__UNIQUE_NOTE_HASH, GENERATOR_INDEX__FUNCTION_ARGS
};
use crate::messaging::l2_to_l1_message::L2ToL1Message;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,13 @@ impl PreviousKernelDataBuilder {
}

fn get_mock_nullifier_value(self, nullifier_index: u64) -> Field {
let first_nullifier = self.end.new_nullifiers.get(0);
first_nullifier.value + nullifier_index as Field
let first_nullifier = if (self.end.new_nullifiers.len() > 0) {
self.end.new_nullifiers.get(0).value
} else {
0 as Field
};

first_nullifier + nullifier_index as Field
}

pub fn append_new_nullifiers_from_private(&mut self, num_extra_nullifier: u64) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/// Test to make sure the entire test suite fails, even if some of the tests pass!

#[test]
fn this_will_pass() {
assert(true);
}

#[test]
fn this_will_fail() {
assert(false);
}
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