diff --git a/noir-projects/aztec-nr/authwit/src/auth_witness.nr b/noir-projects/aztec-nr/authwit/src/auth_witness.nr index a5d2474c633..b87d9d0ab39 100644 --- a/noir-projects/aztec-nr/authwit/src/auth_witness.nr +++ b/noir-projects/aztec-nr/authwit/src/auth_witness.nr @@ -3,7 +3,7 @@ unconstrained fn get_auth_witness_oracle(_message_hash: Field) -> [F /** * Oracle wrapper to fetch an `auth_witness` for a given `message_hash` from the PXE. - * + * * @param message_hash The hash of the message for which the `auth_witness` is to be fetched. * @return The `auth_witness` for the given `message_hash` as Field array. */ diff --git a/noir-projects/aztec-nr/aztec/src/keys/getters/test.nr b/noir-projects/aztec-nr/aztec/src/keys/getters/test.nr index 273e370658f..a0147001bed 100644 --- a/noir-projects/aztec-nr/aztec/src/keys/getters/test.nr +++ b/noir-projects/aztec-nr/aztec/src/keys/getters/test.nr @@ -12,7 +12,7 @@ unconstrained fn setup() -> TestAccount { account } -#[test(should_fail_with="Invalid public keys hint for address")] +#[test(should_fail_with = "Invalid public keys hint for address")] unconstrained fn test_get_public_keys_unknown() { let account = setup(); diff --git a/noir-projects/aztec-nr/aztec/src/note/note_getter/test.nr b/noir-projects/aztec-nr/aztec/src/note/note_getter/test.nr index c25608bc0d6..0d8b660a142 100644 --- a/noir-projects/aztec-nr/aztec/src/note/note_getter/test.nr +++ b/noir-projects/aztec-nr/aztec/src/note/note_getter/test.nr @@ -106,7 +106,7 @@ unconstrained fn can_return_zero_notes() { assert_eq(returned.len(), 0); } -#[test(should_fail_with="Got more notes than limit.")] +#[test(should_fail_with = "Got more notes than limit.")] unconstrained fn rejects_mote_notes_than_limit() { let mut env = setup(); let mut context = env.private(); @@ -155,7 +155,7 @@ unconstrained fn applies_filter_before_constraining() { assert_eq(context.note_hash_read_requests.len(), 1); } -#[test(should_fail_with="Mismatch note header contract address.")] +#[test(should_fail_with = "Mismatch note header contract address.")] unconstrained fn rejects_mismatched_address() { let mut env = setup(); let mut context = env.private(); @@ -169,7 +169,7 @@ unconstrained fn rejects_mismatched_address() { let _ = constrain_get_notes_internal(&mut context, storage_slot, opt_notes, options); } -#[test(should_fail_with="Mismatch note header storage slot.")] +#[test(should_fail_with = "Mismatch note header storage slot.")] unconstrained fn rejects_mismatched_storage_slot() { let mut env = setup(); let mut context = env.private(); @@ -183,7 +183,7 @@ unconstrained fn rejects_mismatched_storage_slot() { let _ = constrain_get_notes_internal(&mut context, storage_slot, opt_notes, options); } -#[test(should_fail_with="Mismatch return note field.")] +#[test(should_fail_with = "Mismatch return note field.")] unconstrained fn rejects_mismatched_selector() { let mut env = setup(); let mut context = env.private(); @@ -204,7 +204,7 @@ unconstrained fn rejects_mismatched_selector() { let _ = constrain_get_notes_internal(&mut context, storage_slot, opt_notes, options); } -#[test(should_fail_with="Return notes not sorted in descending order.")] +#[test(should_fail_with = "Return notes not sorted in descending order.")] unconstrained fn rejects_mismatched_desc_sort_order() { let mut env = setup(); let mut context = env.private(); @@ -222,7 +222,7 @@ unconstrained fn rejects_mismatched_desc_sort_order() { let _ = constrain_get_notes_internal(&mut context, storage_slot, opt_notes, options); } -#[test(should_fail_with="Return notes not sorted in ascending order.")] +#[test(should_fail_with = "Return notes not sorted in ascending order.")] unconstrained fn rejects_mismatched_asc_sort_order() { let mut env = setup(); let mut context = env.private(); diff --git a/noir-projects/aztec-nr/aztec/src/state_vars/public_immutable/test.nr b/noir-projects/aztec-nr/aztec/src/state_vars/public_immutable/test.nr index 7614ffff1d1..b7d78e8763b 100644 --- a/noir-projects/aztec-nr/aztec/src/state_vars/public_immutable/test.nr +++ b/noir-projects/aztec-nr/aztec/src/state_vars/public_immutable/test.nr @@ -33,7 +33,7 @@ fn test_initialize_uninitialized() { assert(state_var.read() == value); } -#[test(should_fail_with="PublicImmutable already initialized")] +#[test(should_fail_with = "PublicImmutable already initialized")] fn test_initialize_already_initialized() { let env = setup(); let state_var = in_public(env); @@ -44,7 +44,7 @@ fn test_initialize_already_initialized() { state_var.initialize(value); } -#[test(should_fail_with="PublicImmutable not initialized")] +#[test(should_fail_with = "PublicImmutable not initialized")] fn test_read_uninitialized() { let env = setup(); let state_var = in_public(env); diff --git a/noir-projects/aztec-nr/aztec/src/state_vars/shared_mutable/test.nr b/noir-projects/aztec-nr/aztec/src/state_vars/shared_mutable/test.nr index ee5a1f67cf0..41964e6190b 100644 --- a/noir-projects/aztec-nr/aztec/src/state_vars/shared_mutable/test.nr +++ b/noir-projects/aztec-nr/aztec/src/state_vars/shared_mutable/test.nr @@ -267,7 +267,7 @@ unconstrained fn test_get_current_value_in_private_with_non_initial_delay() { assert_eq(private_state_var.context.max_block_number.unwrap(), historical_block_number + new_delay); } -#[test(should_fail_with="Hint values do not match hash")] +#[test(should_fail_with = "Hint values do not match hash")] unconstrained fn test_get_current_value_in_private_bad_value_hints() { let mut env = setup(); @@ -287,7 +287,7 @@ unconstrained fn test_get_current_value_in_private_bad_value_hints() { let _ = private_state_var.get_current_value_in_private(); } -#[test(should_fail_with="Hint values do not match hash")] +#[test(should_fail_with = "Hint values do not match hash")] unconstrained fn test_get_current_value_in_private_bad_delay_hints() { let mut env = setup(); @@ -307,7 +307,7 @@ unconstrained fn test_get_current_value_in_private_bad_delay_hints() { let _ = private_state_var.get_current_value_in_private(); } -#[test(should_fail_with="Non-zero value change for zero hash")] +#[test(should_fail_with = "Non-zero value change for zero hash")] unconstrained fn test_get_current_value_in_private_bad_zero_hash_value_hints() { let mut env = setup(); @@ -324,7 +324,7 @@ unconstrained fn test_get_current_value_in_private_bad_zero_hash_value_hints() { let _ = state_var.get_current_value_in_private(); } -#[test(should_fail_with="Non-zero delay change for zero hash")] +#[test(should_fail_with = "Non-zero delay change for zero hash")] unconstrained fn test_get_current_value_in_private_bad_zero_hash_delay_hints() { let mut env = setup(); diff --git a/noir-projects/aztec-nr/aztec/src/utils/test.nr b/noir-projects/aztec-nr/aztec/src/utils/test.nr index 39521ca8a31..7919429d1bc 100644 --- a/noir-projects/aztec-nr/aztec/src/utils/test.nr +++ b/noir-projects/aztec-nr/aztec/src/utils/test.nr @@ -57,7 +57,7 @@ unconstrained fn verify_collapse_hints_good_hints() { verify_collapse_hints(original, collapsed, collapsed_to_input_index_mapping); } -#[test(should_fail_with="Wrong collapsed vec length")] +#[test(should_fail_with = "Wrong collapsed vec length")] unconstrained fn verify_collapse_hints_wrong_length() { let original = [Option::some(7), Option::none(), Option::some(3)]; let collapsed = BoundedVec::from_array([7]); @@ -66,7 +66,7 @@ unconstrained fn verify_collapse_hints_wrong_length() { verify_collapse_hints(original, collapsed, collapsed_to_input_index_mapping); } -#[test(should_fail_with="Collapse hint vec length mismatch")] +#[test(should_fail_with = "Collapse hint vec length mismatch")] unconstrained fn verify_collapse_hints_hint_length_mismatch() { let original = [Option::some(7), Option::none(), Option::some(3)]; let collapsed = BoundedVec::from_array([7, 3]); @@ -75,7 +75,7 @@ unconstrained fn verify_collapse_hints_hint_length_mismatch() { verify_collapse_hints(original, collapsed, collapsed_to_input_index_mapping); } -#[test(should_fail_with="Out of bounds index hint")] +#[test(should_fail_with = "Out of bounds index hint")] unconstrained fn verify_collapse_hints_out_of_bounds_index_hint() { let original = [Option::some(7), Option::none(), Option::some(3)]; let collapsed = BoundedVec::from_array([7, 3]); @@ -93,7 +93,7 @@ unconstrained fn verify_collapse_hints_hint_to_none() { verify_collapse_hints(original, collapsed, collapsed_to_input_index_mapping); } -#[test(should_fail_with="Wrong collapsed vec content")] +#[test(should_fail_with = "Wrong collapsed vec content")] unconstrained fn verify_collapse_hints_wrong_vec_content() { let original = [Option::some(7), Option::none(), Option::some(3)]; let collapsed = BoundedVec::from_array([7, 42]); @@ -102,7 +102,7 @@ unconstrained fn verify_collapse_hints_wrong_vec_content() { verify_collapse_hints(original, collapsed, collapsed_to_input_index_mapping); } -#[test(should_fail_with="Wrong collapsed vec order")] +#[test(should_fail_with = "Wrong collapsed vec order")] unconstrained fn verify_collapse_hints_wrong_vec_order() { let original = [Option::some(7), Option::none(), Option::some(3)]; let collapsed = BoundedVec::from_array([3, 7]); @@ -111,7 +111,7 @@ unconstrained fn verify_collapse_hints_wrong_vec_order() { verify_collapse_hints(original, collapsed, collapsed_to_input_index_mapping); } -#[test(should_fail_with="Dirty collapsed vec storage")] +#[test(should_fail_with = "Dirty collapsed vec storage")] unconstrained fn verify_collapse_hints_dirty_storage() { let original = [Option::some(7), Option::none(), Option::some(3)]; diff --git a/noir-projects/noir-contracts/contracts/easy_private_voting_contract/src/main.nr b/noir-projects/noir-contracts/contracts/easy_private_voting_contract/src/main.nr index 55539d9e4b5..5d65675ab8a 100644 --- a/noir-projects/noir-contracts/contracts/easy_private_voting_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/easy_private_voting_contract/src/main.nr @@ -21,7 +21,8 @@ contract EasyPrivateVoting { // docs:start:constructor #[public] - #[initializer] // annotation to mark function as a constructor + #[initializer] + // annotation to mark function as a constructor fn constructor(admin: AztecAddress) { storage.admin.write(admin); storage.vote_ended.write(false); @@ -30,7 +31,8 @@ contract EasyPrivateVoting { // docs:end:constructor // docs:start:cast_vote - #[private] // annotation to mark function as private and expose private context + #[private] + // annotation to mark function as private and expose private context fn cast_vote(candidate: Field) { let msg_sender_npk_m_hash = get_public_keys(context.msg_sender()).npk_m.hash(); diff --git a/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_in_private.nr b/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_in_private.nr index 4fd1d663504..63934ac4fa7 100644 --- a/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_in_private.nr +++ b/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_in_private.nr @@ -59,7 +59,7 @@ unconstrained fn transfer_in_private_on_behalf_of_other() { utils::assert_owns_private_nft(nft_contract_address, recipient, token_id); } -#[test(should_fail_with="NFT not found when transferring")] +#[test(should_fail_with = "NFT not found when transferring")] unconstrained fn transfer_in_private_failure_not_an_owner() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, nft_contract_address, owner, not_owner, token_id) = utils::setup_mint_and_transfer_to_private(/* with_account_contracts */ false); @@ -68,7 +68,7 @@ unconstrained fn transfer_in_private_failure_not_an_owner() { env.call_private_void(NFT::at(nft_contract_address).transfer_in_private(not_owner, owner, token_id, 0)); } -#[test(should_fail_with="invalid nonce")] +#[test(should_fail_with = "invalid nonce")] unconstrained fn transfer_in_private_failure_on_behalf_of_self_non_zero_nonce() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough. // The nonce check is in the beginning so we don't need to waste time on minting the NFT and transferring @@ -82,7 +82,7 @@ unconstrained fn transfer_in_private_failure_on_behalf_of_self_non_zero_nonce() env.call_private_void(NFT::at(nft_contract_address).transfer_in_private(sender, recipient, token_id, 1)); } -#[test(should_fail_with="Authorization not found for message hash")] +#[test(should_fail_with = "Authorization not found for message hash")] unconstrained fn transfer_in_private_failure_on_behalf_of_other_without_approval() { // Setup with account contracts. Slower since we actually deploy them, but needed for authwits. // The authwit check is in the beginning so we don't need to waste time on minting the NFT and transferring @@ -98,7 +98,7 @@ unconstrained fn transfer_in_private_failure_on_behalf_of_other_without_approval env.call_private_void(NFT::at(nft_contract_address).transfer_in_private(sender, recipient, token_id, 1)); } -#[test(should_fail_with="Authorization not found for message hash")] +#[test(should_fail_with = "Authorization not found for message hash")] unconstrained fn transfer_in_private_failure_on_behalf_of_other_wrong_caller() { // Setup with account contracts. Slower since we actually deploy them, but needed for authwits. // The authwit check is in the beginning so we don't need to waste time on minting the NFT and transferring diff --git a/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_in_public.nr b/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_in_public.nr index d08ccb821ac..dd081516269 100644 --- a/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_in_public.nr +++ b/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_in_public.nr @@ -42,7 +42,7 @@ unconstrained fn transfer_in_public_on_behalf_of_other() { utils::assert_owns_public_nft(env, nft_contract_address, recipient, token_id); } -#[test(should_fail_with="invalid nonce")] +#[test(should_fail_with = "invalid nonce")] unconstrained fn transfer_in_public_failure_on_behalf_of_self_non_zero_nonce() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough. // The authwit check is in the beginning so we don't need to waste time on minting the NFT and transferring @@ -56,7 +56,7 @@ unconstrained fn transfer_in_public_failure_on_behalf_of_self_non_zero_nonce() { env.call_public(NFT::at(nft_contract_address).transfer_in_public(sender, recipient, token_id, random())); } -#[test(should_fail_with="invalid owner")] +#[test(should_fail_with = "invalid owner")] unconstrained fn transfer_in_public_non_existent_nft() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, nft_contract_address, sender, recipient) = utils::setup(/* with_account_contracts */ false); diff --git a/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_to_private.nr b/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_to_private.nr index 49bde9031d5..22106d8810b 100644 --- a/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_to_private.nr +++ b/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_to_private.nr @@ -64,7 +64,7 @@ unconstrained fn transfer_to_private_to_a_different_account() { utils::assert_owns_public_nft(env, nft_contract_address, AztecAddress::zero(), token_id); } -#[test(should_fail_with="transfer not prepared")] +#[test(should_fail_with = "transfer not prepared")] unconstrained fn transfer_to_private_to_self_transfer_not_prepared() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, nft_contract_address, _, _, token_id) = utils::setup_and_mint(/* with_account_contracts */ false); @@ -78,7 +78,7 @@ unconstrained fn transfer_to_private_to_self_transfer_not_prepared() { ); } -#[test(should_fail_with="transfer not prepared")] +#[test(should_fail_with = "transfer not prepared")] unconstrained fn transfer_to_private_finalizing_from_incorrect_sender() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, nft_contract_address, incorrect_sender, recipient, token_id) = utils::setup_and_mint(/* with_account_contracts */ false); @@ -106,7 +106,7 @@ unconstrained fn transfer_to_private_finalizing_from_incorrect_sender() { ); } -#[test(should_fail_with="invalid NFT owner")] +#[test(should_fail_with = "invalid NFT owner")] unconstrained fn transfer_to_private_failure_not_an_owner() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, nft_contract_address, _, not_owner, token_id) = utils::setup_and_mint(/* with_account_contracts */ false); diff --git a/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_to_public.nr b/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_to_public.nr index bfc027e06d1..900f9bb6186 100644 --- a/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_to_public.nr +++ b/noir-projects/noir-contracts/contracts/nft_contract/src/test/transfer_to_public.nr @@ -40,7 +40,7 @@ unconstrained fn transfer_to_public_on_behalf_of_other() { utils::assert_owns_public_nft(env, nft_contract_address, recipient, token_id); } -#[test(should_fail_with="NFT not found when transferring to public")] +#[test(should_fail_with = "NFT not found when transferring to public")] unconstrained fn transfer_to_public_failure_not_an_owner() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, nft_contract_address, _, not_owner, token_id) = utils::setup_mint_and_transfer_to_private(/* with_account_contracts */ false); @@ -49,7 +49,7 @@ unconstrained fn transfer_to_public_failure_not_an_owner() { env.call_private_void(NFT::at(nft_contract_address).transfer_to_public(not_owner, not_owner, token_id, 0)); } -#[test(should_fail_with="invalid nonce")] +#[test(should_fail_with = "invalid nonce")] unconstrained fn transfer_to_public_failure_on_behalf_of_self_non_zero_nonce() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, nft_contract_address, user, _, token_id) = utils::setup_mint_and_transfer_to_private(/* with_account_contracts */ false); @@ -57,7 +57,7 @@ unconstrained fn transfer_to_public_failure_on_behalf_of_self_non_zero_nonce() { env.call_private_void(NFT::at(nft_contract_address).transfer_to_public(user, user, token_id, random())); } -#[test(should_fail_with="Authorization not found for message hash")] +#[test(should_fail_with = "Authorization not found for message hash")] unconstrained fn transfer_to_public_failure_on_behalf_of_other_invalid_designated_caller() { let (env, nft_contract_address, sender, recipient, token_id) = utils::setup_mint_and_transfer_to_private(/* with_account_contracts */ true); @@ -69,7 +69,7 @@ unconstrained fn transfer_to_public_failure_on_behalf_of_other_invalid_designate env.call_private_void(transfer_to_public_call_interface); } -#[test(should_fail_with="Authorization not found for message hash")] +#[test(should_fail_with = "Authorization not found for message hash")] unconstrained fn transfer_to_public_failure_on_behalf_of_other_no_approval() { let (env, nft_contract_address, sender, recipient, token_id) = utils::setup_mint_and_transfer_to_private(/* with_account_contracts */ true); diff --git a/noir-projects/noir-contracts/contracts/token_blacklist_contract/src/main.nr b/noir-projects/noir-contracts/contracts/token_blacklist_contract/src/main.nr index 42ae2f7fd74..7640690f749 100644 --- a/noir-projects/noir-contracts/contracts/token_blacklist_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/token_blacklist_contract/src/main.nr @@ -249,7 +249,6 @@ contract TokenBlacklist { } /// Internal /// - #[public] #[internal] fn _increase_public_balance(to: AztecAddress, amount: Field) { @@ -266,7 +265,6 @@ contract TokenBlacklist { } /// Unconstrained /// - unconstrained fn balance_of_private(owner: AztecAddress) -> pub Field { storage.balances.balance_of(owner).to_field() } diff --git a/noir-projects/noir-contracts/contracts/token_bridge_contract/src/main.nr b/noir-projects/noir-contracts/contracts/token_bridge_contract/src/main.nr index 76c04213dc3..ba0560efc9b 100644 --- a/noir-projects/noir-contracts/contracts/token_bridge_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/token_bridge_contract/src/main.nr @@ -132,7 +132,6 @@ contract TokenBridge { Token::at(token).burn(context.msg_sender(), amount, nonce).call(&mut context); } /// docs:end:exit_to_l1_private - // docs:start:get_token #[public] #[view] diff --git a/noir-projects/noir-contracts/contracts/token_contract/src/test/burn.nr b/noir-projects/noir-contracts/contracts/token_contract/src/test/burn.nr index be4f0eb788e..3b97b66e5ba 100644 --- a/noir-projects/noir-contracts/contracts/token_contract/src/test/burn.nr +++ b/noir-projects/noir-contracts/contracts/token_contract/src/test/burn.nr @@ -112,7 +112,7 @@ unconstrained fn burn_private_on_behalf_of_other() { utils::check_private_balance(token_contract_address, owner, mint_amount - burn_amount); } -#[test(should_fail_with="Balance too low")] +#[test(should_fail_with = "Balance too low")] unconstrained fn burn_private_failure_more_than_balance() { let (env, token_contract_address, owner, _, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ false); @@ -123,7 +123,7 @@ unconstrained fn burn_private_failure_more_than_balance() { // Private doesnt revert, so we cannot check balances here since notes have already been nullified. Test is done. } -#[test(should_fail_with="invalid nonce")] +#[test(should_fail_with = "invalid nonce")] unconstrained fn burn_private_failure_on_behalf_of_self_non_zero_nonce() { let (env, token_contract_address, owner, _, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ false); diff --git a/noir-projects/noir-contracts/contracts/token_contract/src/test/minting.nr b/noir-projects/noir-contracts/contracts/token_contract/src/test/minting.nr index de65b5dbab7..45fc958fe78 100644 --- a/noir-projects/noir-contracts/contracts/token_contract/src/test/minting.nr +++ b/noir-projects/noir-contracts/contracts/token_contract/src/test/minting.nr @@ -88,7 +88,7 @@ unconstrained fn mint_private_success() { utils::check_private_balance(token_contract_address, owner, mint_amount); } -#[test(should_fail_with="note not popped")] +#[test(should_fail_with = "note not popped")] unconstrained fn mint_private_failure_double_spend() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, owner, recipient) = utils::setup(/* with_account_contracts */ false); @@ -123,7 +123,7 @@ unconstrained fn mint_private_failure_double_spend() { env.call_private_void(redeem_shield_call_interface); } -#[test(should_fail_with="caller is not minter")] +#[test(should_fail_with = "caller is not minter")] unconstrained fn mint_private_failure_non_minter() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, _, recipient) = utils::setup(/* with_account_contracts */ false); @@ -137,7 +137,7 @@ unconstrained fn mint_private_failure_non_minter() { env.call_public(mint_private_call_interface); } -#[test(should_fail_with="call to assert_max_bit_size")] +#[test(should_fail_with = "call to assert_max_bit_size")] unconstrained fn mint_private_failure_overflow() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, _, _) = utils::setup(/* with_account_contracts */ false); @@ -150,7 +150,7 @@ unconstrained fn mint_private_failure_overflow() { env.call_public(mint_private_call_interface); } -#[test(should_fail_with="attempt to add with overflow")] +#[test(should_fail_with = "attempt to add with overflow")] unconstrained fn mint_private_failure_overflow_recipient() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, owner, _) = utils::setup(/* with_account_contracts */ false); @@ -185,7 +185,7 @@ unconstrained fn mint_private_failure_overflow_recipient() { env.call_public(mint_private_call_interface); } -#[test(should_fail_with="attempt to add with overflow")] +#[test(should_fail_with = "attempt to add with overflow")] unconstrained fn mint_private_failure_overflow_total_supply() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, owner, recipient) = utils::setup(/* with_account_contracts */ false); diff --git a/noir-projects/noir-contracts/contracts/token_contract/src/test/transfer_private.nr b/noir-projects/noir-contracts/contracts/token_contract/src/test/transfer_private.nr index 08f22fd47f1..f4e339d7df8 100644 --- a/noir-projects/noir-contracts/contracts/token_contract/src/test/transfer_private.nr +++ b/noir-projects/noir-contracts/contracts/token_contract/src/test/transfer_private.nr @@ -67,7 +67,7 @@ unconstrained fn transfer_private_on_behalf_of_other() { utils::check_private_balance(token_contract_address, recipient, transfer_amount); } -#[test(should_fail_with="Balance too low")] +#[test(should_fail_with = "Balance too low")] unconstrained fn transfer_private_failure_more_than_balance() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, _, recipient, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ false); @@ -78,7 +78,7 @@ unconstrained fn transfer_private_failure_more_than_balance() { } // docs:start:fail_with_message -#[test(should_fail_with="invalid nonce")] +#[test(should_fail_with = "invalid nonce")] unconstrained fn transfer_private_failure_on_behalf_of_self_non_zero_nonce() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, owner, recipient, _) = utils::setup_and_mint(/* with_account_contracts */ false); @@ -90,7 +90,7 @@ unconstrained fn transfer_private_failure_on_behalf_of_self_non_zero_nonce() { } // docs:end:fail_with_message -#[test(should_fail_with="Balance too low")] +#[test(should_fail_with = "Balance too low")] unconstrained fn transfer_private_failure_on_behalf_of_more_than_balance() { // Setup with account contracts. Slower since we actually deploy them, but needed for authwits. let (env, token_contract_address, owner, recipient, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ true); @@ -104,7 +104,7 @@ unconstrained fn transfer_private_failure_on_behalf_of_more_than_balance() { env.call_private_void(transfer_private_from_call_interface); } -#[test(should_fail_with="Authorization not found for message hash")] +#[test(should_fail_with = "Authorization not found for message hash")] unconstrained fn transfer_private_failure_on_behalf_of_other_without_approval() { // Setup with account contracts. Slower since we actually deploy them, but needed for authwits. let (env, token_contract_address, owner, recipient, _) = utils::setup_and_mint(/* with_account_contracts */ true); @@ -117,7 +117,7 @@ unconstrained fn transfer_private_failure_on_behalf_of_other_without_approval() env.call_private_void(transfer_private_from_call_interface); } -#[test(should_fail_with="Authorization not found for message hash")] +#[test(should_fail_with = "Authorization not found for message hash")] unconstrained fn transfer_private_failure_on_behalf_of_other_wrong_caller() { // Setup with account contracts. Slower since we actually deploy them, but needed for authwits. let (env, token_contract_address, owner, recipient, _) = utils::setup_and_mint(/* with_account_contracts */ true); diff --git a/noir-projects/noir-contracts/contracts/token_contract/src/test/transfer_public.nr b/noir-projects/noir-contracts/contracts/token_contract/src/test/transfer_public.nr index 13e389d6f31..7d0376236cf 100644 --- a/noir-projects/noir-contracts/contracts/token_contract/src/test/transfer_public.nr +++ b/noir-projects/noir-contracts/contracts/token_contract/src/test/transfer_public.nr @@ -63,7 +63,7 @@ unconstrained fn public_transfer_failure_more_than_balance() { utils::check_public_balance(token_contract_address, owner, mint_amount); } -#[test(should_fail_with="invalid nonce")] +#[test(should_fail_with = "invalid nonce")] unconstrained fn public_transfer_failure_on_behalf_of_self_non_zero_nonce() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, owner, recipient, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ false); @@ -90,7 +90,7 @@ unconstrained fn public_transfer_failure_on_behalf_of_other_without_approval() { utils::check_public_balance(token_contract_address, recipient, 0); } -#[test(should_fail_with="attempt to subtract with underflow")] +#[test(should_fail_with = "attempt to subtract with underflow")] unconstrained fn public_transfer_failure_on_behalf_of_other_more_than_balance() { // Setup with account contracts. Slower since we actually deploy them, but needed for authwits. let (env, token_contract_address, owner, recipient, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ true); diff --git a/noir-projects/noir-contracts/contracts/token_contract/src/test/unshielding.nr b/noir-projects/noir-contracts/contracts/token_contract/src/test/unshielding.nr index 50ce65ec2a3..de659b9b871 100644 --- a/noir-projects/noir-contracts/contracts/token_contract/src/test/unshielding.nr +++ b/noir-projects/noir-contracts/contracts/token_contract/src/test/unshielding.nr @@ -30,7 +30,7 @@ unconstrained fn unshield_on_behalf_of_other() { utils::check_public_balance(token_contract_address, recipient, unshield_amount); } -#[test(should_fail_with="Balance too low")] +#[test(should_fail_with = "Balance too low")] unconstrained fn unshield_failure_more_than_balance() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, owner, _, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ false); @@ -40,7 +40,7 @@ unconstrained fn unshield_failure_more_than_balance() { env.call_private_void(unshield_call_interface); } -#[test(should_fail_with="invalid nonce")] +#[test(should_fail_with = "invalid nonce")] unconstrained fn unshield_failure_on_behalf_of_self_non_zero_nonce() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, owner, _, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ false); @@ -50,7 +50,7 @@ unconstrained fn unshield_failure_on_behalf_of_self_non_zero_nonce() { env.call_private_void(unshield_call_interface); } -#[test(should_fail_with="Balance too low")] +#[test(should_fail_with = "Balance too low")] unconstrained fn unshield_failure_on_behalf_of_other_more_than_balance() { let (env, token_contract_address, owner, recipient, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ true); @@ -63,7 +63,7 @@ unconstrained fn unshield_failure_on_behalf_of_other_more_than_balance() { env.call_private_void(unshield_call_interface); } -#[test(should_fail_with="Authorization not found for message hash")] +#[test(should_fail_with = "Authorization not found for message hash")] unconstrained fn unshield_failure_on_behalf_of_other_invalid_designated_caller() { let (env, token_contract_address, owner, recipient, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ true); @@ -76,7 +76,7 @@ unconstrained fn unshield_failure_on_behalf_of_other_invalid_designated_caller() env.call_private_void(unshield_call_interface); } -#[test(should_fail_with="Authorization not found for message hash")] +#[test(should_fail_with = "Authorization not found for message hash")] unconstrained fn unshield_failure_on_behalf_of_other_no_approval() { let (env, token_contract_address, owner, recipient, mint_amount) = utils::setup_and_mint(/* with_account_contracts */ true); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_call_data_validator/validate_split_ranges.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_call_data_validator/validate_split_ranges.nr index b15ba665b3e..83b687e09ba 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_call_data_validator/validate_split_ranges.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_call_data_validator/validate_split_ranges.nr @@ -106,7 +106,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="min_revertible_side_effect_counter must be greater than the end counter of the last non revertible item")] + #[test(should_fail_with = "min_revertible_side_effect_counter must be greater than the end counter of the last non revertible item")] fn validate_split_ranges_less_than_last_non_revertible_fails() { let mut builder = TestBuilder::new(); @@ -119,7 +119,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="min_revertible_side_effect_counter must be greater than the end counter of the last non revertible item")] + #[test(should_fail_with = "min_revertible_side_effect_counter must be greater than the end counter of the last non revertible item")] fn validate_split_ranges_equal_last_non_revertible_fails() { let mut builder = TestBuilder::new(); @@ -131,7 +131,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="min_revertible_side_effect_counter must be less than or equal to the start counter of the first revertible item")] + #[test(should_fail_with = "min_revertible_side_effect_counter must be less than or equal to the start counter of the first revertible item")] fn validate_split_ranges_greater_than_first_revertible_fails() { let mut builder = TestBuilder::new(); @@ -156,7 +156,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="min_revertible_side_effect_counter must be greater than the end counter of the last non revertible item")] + #[test(should_fail_with = "min_revertible_side_effect_counter must be greater than the end counter of the last non revertible item")] fn validate_split_ranges_0_wrong_hint_fails() { let mut builder = TestBuilder::new(); @@ -169,7 +169,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="min_revertible_side_effect_counter must be less than or equal to the start counter of the first revertible item")] + #[test(should_fail_with = "min_revertible_side_effect_counter must be less than or equal to the start counter of the first revertible item")] fn validate_split_ranges_index_hint_greater_than_len_fails() { let mut builder = TestBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer.nr index 5dc692b568c..818ea635972 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer.nr @@ -26,7 +26,7 @@ impl TailOutputComposer { TailOutputComposer { output_composer } } - unconstrained pub fn finish(self) -> KernelCircuitPublicInputs { + unconstrained pub fn finish(self) -> KernelCircuitPublicInputs { let source = self.output_composer.finish(); let mut output = KernelCircuitPublicInputs::empty(); output.rollup_validation_requests = source.validation_requests.for_rollup; diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_reset.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_reset.nr index 2317649881a..6c649ac31d2 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_reset.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_reset.nr @@ -309,7 +309,7 @@ mod tests { builder.succeeded(); } - #[test(should_fail_with="Value of the note hash does not match read request")] + #[test(should_fail_with = "Value of the note hash does not match read request")] fn pending_note_hash_read_request_wrong_hint_fails() { let mut builder = PrivateKernelResetInputsBuilder::new(); @@ -343,7 +343,7 @@ mod tests { builder.succeeded(); } - #[test(should_fail_with="Value of the nullifier does not match read request")] + #[test(should_fail_with = "Value of the nullifier does not match read request")] fn pending_nullifier_read_request_wrong_hint_fails() { let mut builder = PrivateKernelResetInputsBuilder::new(); @@ -357,7 +357,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Read request counter must be greater than the counter of the nullifier")] + #[test(should_fail_with = "Read request counter must be greater than the counter of the nullifier")] fn pending_nullifier_read_request_reads_before_value_fails() { let mut builder = PrivateKernelResetInputsBuilder::new(); @@ -496,7 +496,7 @@ mod tests { assert(is_empty_array(public_inputs.end.note_encrypted_logs_hashes)); } - #[test(should_fail_with="Value of the hinted transient note hash does not match")] + #[test(should_fail_with = "Value of the hinted transient note hash does not match")] fn wrong_transient_nullifier_index_for_note_hash_fails() { let mut builder = PrivateKernelResetInputsBuilder::new(); builder.previous_kernel.append_note_hashes(1); @@ -576,7 +576,7 @@ mod tests { assert_array_eq(public_inputs.end.encrypted_logs_hashes, output_logs); } - #[test(should_fail_with="note hashes have been siloed in a previous reset")] + #[test(should_fail_with = "note hashes have been siloed in a previous reset")] fn siloing_note_hashes_again_fails() { let mut builder = PrivateKernelResetInputsBuilder::new().with_siloing(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail.nr index 26b48c38174..6afb97a19a6 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail.nr @@ -167,35 +167,35 @@ mod tests { ); } - #[test(should_fail_with="Private call stack must be empty when executing the tail circuit")] + #[test(should_fail_with = "Private call stack must be empty when executing the tail circuit")] fn non_empty_private_call_stack_should_fail() { let mut builder = PrivateKernelTailInputsBuilder::new(); builder.previous_kernel.append_private_call_requests(1); builder.failed(); } - #[test(should_fail_with="Public call stack must be empty when executing the tail circuit")] + #[test(should_fail_with = "Public call stack must be empty when executing the tail circuit")] fn non_empty_public_call_stack_should_fail() { let mut builder = PrivateKernelTailInputsBuilder::new(); builder.previous_kernel.append_public_call_requests(1); builder.failed(); } - #[test(should_fail_with="Public teardown call request must be empty when executing the tail circuit")] + #[test(should_fail_with = "Public teardown call request must be empty when executing the tail circuit")] fn non_empty_public_teardown_call_request_should_fail() { let mut builder = PrivateKernelTailInputsBuilder::new(); builder.previous_kernel.set_public_teardown_call_request(); builder.failed(); } - #[test(should_fail_with="split_counter must be 0 for pure private tx")] + #[test(should_fail_with = "split_counter must be 0 for pure private tx")] fn non_zero_validation_requests_split_counter_fail() { let mut builder = PrivateKernelTailInputsBuilder::new(); builder.previous_kernel.validation_requests_split_counter = Option::some(123); builder.failed(); } - #[test(should_fail_with="Non empty note hash read requests")] + #[test(should_fail_with = "Non empty note hash read requests")] fn non_empty_note_hash_read_requests() { let mut builder = PrivateKernelTailInputsBuilder::new(); builder.previous_kernel.append_note_hashes(3); @@ -203,7 +203,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Non empty nullifier read requests")] + #[test(should_fail_with = "Non empty nullifier read requests")] fn non_empty_nullifier_read_requests() { let mut builder = PrivateKernelTailInputsBuilder::new(); builder.previous_kernel.append_nullifiers(3); @@ -211,7 +211,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Non empty key validation requests")] + #[test(should_fail_with = "Non empty key validation requests")] fn non_empty_key_validations() { let mut builder = PrivateKernelTailInputsBuilder::new(); let _void = builder.previous_kernel.add_request_for_key_validation( @@ -278,7 +278,7 @@ mod tests { ); } - #[test(should_fail_with="The gas used exceeds the gas limits")] + #[test(should_fail_with = "The gas used exceeds the gas limits")] fn gas_limits_are_enforced() { let mut builder = PrivateKernelTailInputsBuilder::new(); builder.previous_kernel.tx_context.gas_settings.teardown_gas_limits = Gas::new(300, 300); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail_to_public.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail_to_public.nr index c9e3c4682db..4ee6fbe4d03 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail_to_public.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail_to_public.nr @@ -129,21 +129,21 @@ mod tests { } } - #[test(should_fail_with="Private call stack must be empty when executing the tail circuit")] + #[test(should_fail_with = "Private call stack must be empty when executing the tail circuit")] fn non_empty_private_call_stack_should_fail() { let mut builder = PrivateKernelTailToPublicInputsBuilder::new(); builder.previous_kernel.append_private_call_requests(1); builder.failed(); } - #[test(should_fail_with="min_revertible_side_effect_counter must not be 0")] + #[test(should_fail_with = "min_revertible_side_effect_counter must not be 0")] fn zero_min_revertible_side_effect_counter_fails() { let mut builder = PrivateKernelTailToPublicInputsBuilder::new(); builder.previous_kernel.min_revertible_side_effect_counter = 0; builder.failed(); } - #[test(should_fail_with="split_counter does not match min_revertible_side_effect_counter")] + #[test(should_fail_with = "split_counter does not match min_revertible_side_effect_counter")] fn mismatch_validation_requests_split_counter_fail() { let mut builder = PrivateKernelTailToPublicInputsBuilder::new(); @@ -153,7 +153,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Must have public calls when exporting public kernel data from the tail circuit")] + #[test(should_fail_with = "Must have public calls when exporting public kernel data from the tail circuit")] fn no_public_calls_should_fail() { let mut builder = PrivateKernelTailToPublicInputsBuilder::new(); builder.previous_kernel.public_call_requests = BoundedVec::new(); @@ -250,7 +250,7 @@ mod tests { ); } - #[test(should_fail_with="Non empty note hash read requests")] + #[test(should_fail_with = "Non empty note hash read requests")] fn non_empty_note_hash_read_requests() { let mut builder = PrivateKernelTailToPublicInputsBuilder::new(); builder.previous_kernel.append_note_hashes(3); @@ -258,7 +258,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Non empty nullifier read requests")] + #[test(should_fail_with = "Non empty nullifier read requests")] fn non_empty_nullifier_read_requests() { let mut builder = PrivateKernelTailToPublicInputsBuilder::new(); builder.previous_kernel.append_nullifiers(3); @@ -266,7 +266,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Non empty key validation requests")] + #[test(should_fail_with = "Non empty key validation requests")] fn non_empty_key_validations() { let mut builder = PrivateKernelTailToPublicInputsBuilder::new(); let _void = builder.previous_kernel.add_request_for_key_validation( @@ -358,7 +358,7 @@ mod tests { ); } - #[test(should_fail_with="The gas used exceeds the gas limits")] + #[test(should_fail_with = "The gas used exceeds the gas limits")] fn gas_limits_are_enforced() { let mut builder = PrivateKernelTailToPublicInputsBuilder::new(); builder.previous_kernel.tx_context.gas_settings.teardown_gas_limits = Gas::new(300, 300); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/previous_kernel_validator_builder/validate_no_transient_data.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/previous_kernel_validator_builder/validate_no_transient_data.nr index ac9a535e01d..624f4179ed2 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/previous_kernel_validator_builder/validate_no_transient_data.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/previous_kernel_validator_builder/validate_no_transient_data.nr @@ -40,7 +40,7 @@ fn validate_no_transient_data_nullifiers_for_note_hashes_succeeds() { builder.validate_for_private_tail(); } -#[test(should_fail_with="Cannot link a note hash emitted after a nullifier")] +#[test(should_fail_with = "Cannot link a note hash emitted after a nullifier")] fn validate_no_transient_data_nullifiers_for_note_hashes_emitted_after_fails() { let mut builder = PreviousKernelValidatorBuilder::new(); @@ -53,7 +53,7 @@ fn validate_no_transient_data_nullifiers_for_note_hashes_emitted_after_fails() { builder.validate_for_private_tail(); } -#[test(should_fail_with="Hinted siloed note hash does not match nullified note hash")] +#[test(should_fail_with = "Hinted siloed note hash does not match nullified note hash")] fn validate_no_transient_data_nullifiers_for_note_hashes_not_found_fails() { let mut builder = PreviousKernelValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_call_request.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_call_request.nr index fa24782af29..18fd98b68f0 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_call_request.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_call_request.nr @@ -27,7 +27,7 @@ fn validate_against_call_request_static_call_succeeds() { builder.validate_against_call_request(request); } -#[test(should_fail_with="contract_address does not match call request")] +#[test(should_fail_with = "contract_address does not match call request")] fn validate_against_call_request_mismatch_contract_address_fails() { let builder = PrivateCallDataValidatorBuilder::new(); @@ -38,7 +38,7 @@ fn validate_against_call_request_mismatch_contract_address_fails() { builder.validate_against_call_request(request); } -#[test(should_fail_with="call_context does not match call request")] +#[test(should_fail_with = "call_context does not match call request")] fn validate_against_call_request_mismatch_call_context_storage_contract_address_fails() { let builder = PrivateCallDataValidatorBuilder::new(); @@ -49,7 +49,7 @@ fn validate_against_call_request_mismatch_call_context_storage_contract_address_ builder.validate_against_call_request(request); } -#[test(should_fail_with="args_hash does not match call request")] +#[test(should_fail_with = "args_hash does not match call request")] fn validate_against_call_request_mismatch_args_hash_fails() { let builder = PrivateCallDataValidatorBuilder::new(); @@ -60,7 +60,7 @@ fn validate_against_call_request_mismatch_args_hash_fails() { builder.validate_against_call_request(request); } -#[test(should_fail_with="returns_hash does not match call request")] +#[test(should_fail_with = "returns_hash does not match call request")] fn validate_against_call_request_mismatch_returns_hash_fails() { let builder = PrivateCallDataValidatorBuilder::new(); @@ -71,7 +71,7 @@ fn validate_against_call_request_mismatch_returns_hash_fails() { builder.validate_against_call_request(request); } -#[test(should_fail_with="start_side_effect_counter does not match call request")] +#[test(should_fail_with = "start_side_effect_counter does not match call request")] fn validate_against_call_request_mismatch_start_side_effect_counter_fails() { let builder = PrivateCallDataValidatorBuilder::new(); @@ -82,7 +82,7 @@ fn validate_against_call_request_mismatch_start_side_effect_counter_fails() { builder.validate_against_call_request(request); } -#[test(should_fail_with="end_side_effect_counter does not match call request")] +#[test(should_fail_with = "end_side_effect_counter does not match call request")] fn validate_against_call_request_mismatch_end_side_effect_counter_fails() { let builder = PrivateCallDataValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_previous_kernel.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_previous_kernel.nr index 20eebb7c838..e8a547d4a1b 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_previous_kernel.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_previous_kernel.nr @@ -28,7 +28,7 @@ fn validate_against_previous_kernel_succeeds() { builder.validate_against_previous_kernel(previous_kernel); } -#[test(should_fail_with="mismatch historical header")] +#[test(should_fail_with = "mismatch historical header")] fn validate_against_previous_kernel_mismatch_header_version_fails() { let builder = PrivateCallDataValidatorBuilder::new(); @@ -38,7 +38,7 @@ fn validate_against_previous_kernel_mismatch_header_version_fails() { builder.validate_against_previous_kernel(previous_kernel); } -#[test(should_fail_with="mismatch tx context")] +#[test(should_fail_with = "mismatch tx context")] fn validate_against_previous_kernel_mismatch_chain_id_fails() { let builder = PrivateCallDataValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_tx_request.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_tx_request.nr index 6c02f0bff56..7833fa33d8e 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_tx_request.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_against_tx_request.nr @@ -9,7 +9,7 @@ fn validate_against_tx_request_succeeds() { builder.validate_against_tx_request(request); } -#[test(should_fail_with="origin address does not match call stack items contract address")] +#[test(should_fail_with = "origin address does not match call stack items contract address")] fn validate_against_tx_request_mismatch_contract_address_fails() { let builder = PrivateCallDataValidatorBuilder::new(); @@ -20,7 +20,7 @@ fn validate_against_tx_request_mismatch_contract_address_fails() { builder.validate_against_tx_request(request); } -#[test(should_fail_with="tx_request function_data must match call_stack_item function_data")] +#[test(should_fail_with = "tx_request function_data must match call_stack_item function_data")] fn validate_against_tx_request_mismatch_function_data_fails() { let builder = PrivateCallDataValidatorBuilder::new(); @@ -31,7 +31,7 @@ fn validate_against_tx_request_mismatch_function_data_fails() { builder.validate_against_tx_request(request); } -#[test(should_fail_with="noir function args passed to tx_request must match args in the call_stack_item")] +#[test(should_fail_with = "noir function args passed to tx_request must match args in the call_stack_item")] fn validate_against_tx_request_mismatch_args_hash_fails() { let builder = PrivateCallDataValidatorBuilder::new(); @@ -42,7 +42,7 @@ fn validate_against_tx_request_mismatch_args_hash_fails() { builder.validate_against_tx_request(request); } -#[test(should_fail_with="tx_context in tx_request must match tx_context in call_stack_item")] +#[test(should_fail_with = "tx_context in tx_request must match tx_context in call_stack_item")] fn validate_against_tx_request_mismatch_chain_id_fails() { let builder = PrivateCallDataValidatorBuilder::new(); @@ -53,7 +53,7 @@ fn validate_against_tx_request_mismatch_chain_id_fails() { builder.validate_against_tx_request(request); } -#[test(should_fail_with="tx_context in tx_request must match tx_context in call_stack_item")] +#[test(should_fail_with = "tx_context in tx_request must match tx_context in call_stack_item")] fn validate_against_tx_request_mismatch_version_fails() { let builder = PrivateCallDataValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_arrays.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_arrays.nr index 9d1869537ef..34eac0ae3b7 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_arrays.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_arrays.nr @@ -8,7 +8,7 @@ fn unshift_empty_item(vec: &mut BoundedVec) { vec.storage[0] = empty_item; } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_note_hash_read_requests_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -18,7 +18,7 @@ fn validate_arrays_malformed_note_hash_read_requests_fails() { builder.validate(); } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_nullifier_read_requests_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -28,7 +28,7 @@ fn validate_arrays_malformed_nullifier_read_requests_fails() { builder.validate(); } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_key_validation_requests_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -38,7 +38,7 @@ fn validate_arrays_malformed_key_validation_requests_fails() { builder.validate(); } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_note_hashes_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -48,7 +48,7 @@ fn validate_arrays_malformed_note_hashes_fails() { builder.validate(); } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_nullifiers_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -58,7 +58,7 @@ fn validate_arrays_malformed_nullifiers_fails() { builder.validate(); } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_l2_to_l1_msgs_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -68,7 +68,7 @@ fn validate_arrays_malformed_l2_to_l1_msgs_fails() { builder.validate(); } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_private_call_requests_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -78,7 +78,7 @@ fn validate_arrays_malformed_private_call_requests_fails() { builder.validate(); } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_public_call_stack_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -88,7 +88,7 @@ fn validate_arrays_malformed_public_call_stack_fails() { builder.validate(); } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_note_encrypted_logs_hashes() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -98,7 +98,7 @@ fn validate_arrays_malformed_note_encrypted_logs_hashes() { builder.validate(); } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_encrypted_logs_hashes_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -108,7 +108,7 @@ fn validate_arrays_malformed_encrypted_logs_hashes_fails() { builder.validate(); } -#[test(should_fail_with="invalid array")] +#[test(should_fail_with = "invalid array")] fn validate_arrays_malformed_unencrypted_logs_hashes_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_as_first_call.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_as_first_call.nr index db2a1591064..c4f40540eef 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_as_first_call.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_as_first_call.nr @@ -6,19 +6,19 @@ fn validate_as_first_call_regular_call_succeeds() { builder.validate_as_first_call(); } -#[test(should_fail_with="Users cannot make a static call")] +#[test(should_fail_with = "Users cannot make a static call")] fn validate_as_first_call_static_call_fails() { let builder = PrivateCallDataValidatorBuilder::new().is_first_call().is_static_call(); builder.validate_as_first_call(); } -#[test(should_fail_with="Users cannot make a delegatecall")] +#[test(should_fail_with = "Users cannot make a delegatecall")] fn validate_as_first_call_delegate_call_fails() { let builder = PrivateCallDataValidatorBuilder::new().is_first_call().is_delegate_call(); builder.validate_as_first_call(); } -#[test(should_fail_with="Users cannot set msg_sender in first call")] +#[test(should_fail_with = "Users cannot set msg_sender in first call")] fn validate_as_first_call_msg_sender_fails() { let builder = PrivateCallDataValidatorBuilder::new(); builder.validate_as_first_call(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call.nr index 92fe29e3ba3..6033c3a2450 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call.nr @@ -6,7 +6,7 @@ fn validate_call_is_regular_succeeds() { builder.validate(); } -#[test(should_fail_with="call stack storage address does not match expected contract address")] +#[test(should_fail_with = "call stack storage address does not match expected contract address")] fn validate_call_is_regular_mismatch_storage_contract_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -28,7 +28,7 @@ fn validate_call_is_delegate_static_succeeds() { builder.validate(); } -#[test(should_fail_with="current contract address must not match storage contract address for delegate calls")] +#[test(should_fail_with = "current contract address must not match storage contract address for delegate calls")] fn validate_call_is_delegate_call_from_same_contract_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_delegate_call(); @@ -38,7 +38,7 @@ fn validate_call_is_delegate_call_from_same_contract_fails() { builder.validate(); } -#[test(should_fail_with="function selector in call context does not match call stack item")] +#[test(should_fail_with = "function selector in call context does not match call stack item")] fn validate_call_mismatch_function_selector_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -55,7 +55,7 @@ fn validate_call_is_static_succeeds() { builder.validate(); } -#[test(should_fail_with="call stack storage address does not match expected contract address")] +#[test(should_fail_with = "call stack storage address does not match expected contract address")] fn validate_call_is_static_mismatch_storage_contract_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_static_call(); @@ -65,7 +65,7 @@ fn validate_call_is_static_mismatch_storage_contract_fails() { builder.validate(); } -#[test(should_fail_with="note_hashes must be empty for static calls")] +#[test(should_fail_with = "note_hashes must be empty for static calls")] fn validate_call_is_static_creating_note_hashes_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_static_call(); @@ -74,7 +74,7 @@ fn validate_call_is_static_creating_note_hashes_fails() { builder.validate(); } -#[test(should_fail_with="nullifiers must be empty for static calls")] +#[test(should_fail_with = "nullifiers must be empty for static calls")] fn validate_call_is_static_creating_nullifiers_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_static_call(); @@ -83,7 +83,7 @@ fn validate_call_is_static_creating_nullifiers_fails() { builder.validate(); } -#[test(should_fail_with="l2_to_l1_msgs must be empty for static calls")] +#[test(should_fail_with = "l2_to_l1_msgs must be empty for static calls")] fn validate_call_is_static_creating_l2_to_l1_msgs_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_static_call(); @@ -92,7 +92,7 @@ fn validate_call_is_static_creating_l2_to_l1_msgs_fails() { builder.validate(); } -#[test(should_fail_with="note_encrypted_logs_hashes must be empty for static calls")] +#[test(should_fail_with = "note_encrypted_logs_hashes must be empty for static calls")] fn validate_call_is_static_creating_note_encrypted_logs_hashes_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_static_call(); @@ -101,7 +101,7 @@ fn validate_call_is_static_creating_note_encrypted_logs_hashes_fails() { builder.validate(); } -#[test(should_fail_with="encrypted_logs_hashes must be empty for static calls")] +#[test(should_fail_with = "encrypted_logs_hashes must be empty for static calls")] fn validate_call_is_static_creating_encrypted_logs_hashes_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_static_call(); @@ -110,7 +110,7 @@ fn validate_call_is_static_creating_encrypted_logs_hashes_fails() { builder.validate(); } -#[test(should_fail_with="unencrypted_logs_hashes must be empty for static calls")] +#[test(should_fail_with = "unencrypted_logs_hashes must be empty for static calls")] fn validate_call_is_static_creating_unencrypted_logs_hashes_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_static_call(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call_requests.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call_requests.nr index 2b725f15f84..ce5bfa52a33 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call_requests.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call_requests.nr @@ -3,7 +3,6 @@ use crate::tests::private_call_data_validator_builder::PrivateCallDataValidatorB /** * validate_public_call_requests */ - #[test] fn validate_public_call_requests_succeeds() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -44,7 +43,7 @@ fn validate_public_call_requests_from_static_call_succeeds() { builder.validate(); } -#[test(should_fail_with="incorrect msg_sender for delegate call request")] +#[test(should_fail_with = "incorrect msg_sender for delegate call request")] fn validate_public_call_requests_incorrect_msg_sender_for_delegate_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -55,7 +54,7 @@ fn validate_public_call_requests_incorrect_msg_sender_for_delegate_call_fails() builder.validate(); } -#[test(should_fail_with="incorrect storage_contract_address for delegate call request")] +#[test(should_fail_with = "incorrect storage_contract_address for delegate call request")] fn validate_public_call_requests_incorrect_storage_contract_address_for_delegate_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -67,7 +66,7 @@ fn validate_public_call_requests_incorrect_storage_contract_address_for_delegate builder.validate(); } -#[test(should_fail_with="incorrect msg_sender for call request")] +#[test(should_fail_with = "incorrect msg_sender for call request")] fn validate_public_call_requests_incorrect_msg_sender_for_regular_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -78,7 +77,7 @@ fn validate_public_call_requests_incorrect_msg_sender_for_regular_call_fails() { builder.validate(); } -#[test(should_fail_with="incorrect storage_contract_address for call request")] +#[test(should_fail_with = "incorrect storage_contract_address for call request")] fn validate_public_call_requests_incorrect_storage_contract_address_for_regular_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -89,7 +88,7 @@ fn validate_public_call_requests_incorrect_storage_contract_address_for_regular_ builder.validate(); } -#[test(should_fail_with="static call cannot make non-static calls")] +#[test(should_fail_with = "static call cannot make non-static calls")] fn validate_public_call_requests_static_call_regular_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_static_call(); @@ -103,7 +102,6 @@ fn validate_public_call_requests_static_call_regular_call_fails() { /** * validate_teardown_call_request */ - #[test] fn validate_teardown_call_request_succeeds() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -140,7 +138,7 @@ fn validate_teardown_call_request_delegate_from_static_call_succeeds() { builder.validate(); } -#[test(should_fail_with="incorrect msg_sender for delegate call request")] +#[test(should_fail_with = "incorrect msg_sender for delegate call request")] fn validate_teardown_call_request_incorrect_msg_sender_for_delegate_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -151,7 +149,7 @@ fn validate_teardown_call_request_incorrect_msg_sender_for_delegate_call_fails() builder.validate(); } -#[test(should_fail_with="incorrect storage_contract_address for delegate call request")] +#[test(should_fail_with = "incorrect storage_contract_address for delegate call request")] fn validate_teardown_call_request_incorrect_storage_contract_address_for_delegate_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -163,7 +161,7 @@ fn validate_teardown_call_request_incorrect_storage_contract_address_for_delegat builder.validate(); } -#[test(should_fail_with="incorrect msg_sender for call request")] +#[test(should_fail_with = "incorrect msg_sender for call request")] fn validate_teardown_call_request_incorrect_msg_sender_for_regular_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -174,7 +172,7 @@ fn validate_teardown_call_request_incorrect_msg_sender_for_regular_call_fails() builder.validate(); } -#[test(should_fail_with="incorrect storage_contract_address for call request")] +#[test(should_fail_with = "incorrect storage_contract_address for call request")] fn validate_teardown_call_request_incorrect_storage_contract_address_for_regular_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -185,7 +183,7 @@ fn validate_teardown_call_request_incorrect_storage_contract_address_for_regular builder.validate(); } -#[test(should_fail_with="static call cannot make non-static calls")] +#[test(should_fail_with = "static call cannot make non-static calls")] fn validate_teardown_call_request_static_call_regular_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_static_call(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_contract_address.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_contract_address.nr index 9e017afe54c..cadf3cc2998 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_contract_address.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_contract_address.nr @@ -15,7 +15,7 @@ impl PrivateCallDataValidatorBuilder { } } -#[test(should_fail_with="contract address cannot be zero")] +#[test(should_fail_with = "contract address cannot be zero")] fn validate_contract_address_zero_storage_contract_address_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_regular_contract(); @@ -26,7 +26,7 @@ fn validate_contract_address_zero_storage_contract_address_fails() { builder.validate(); } -#[test(should_fail_with="computed contract address does not match expected one")] +#[test(should_fail_with = "computed contract address does not match expected one")] fn validate_contract_address_incorrect_function_leaf_index_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_regular_contract(); @@ -37,7 +37,7 @@ fn validate_contract_address_incorrect_function_leaf_index_fails() { builder.validate(); } -#[test(should_fail_with="computed contract address does not match expected one")] +#[test(should_fail_with = "computed contract address does not match expected one")] fn validate_contract_address_incorrect_function_leaf_sibling_path_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_regular_contract(); @@ -48,7 +48,7 @@ fn validate_contract_address_incorrect_function_leaf_sibling_path_fails() { builder.validate(); } -#[test(should_fail_with="computed contract address does not match expected one")] +#[test(should_fail_with = "computed contract address does not match expected one")] fn validate_contract_address_incorrect_contract_class_preimage_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_regular_contract(); @@ -57,7 +57,7 @@ fn validate_contract_address_incorrect_contract_class_preimage_fails() { builder.validate(); } -#[test(should_fail_with="computed contract address does not match expected one")] +#[test(should_fail_with = "computed contract address does not match expected one")] fn validate_contract_address_incorrect_partial_address_preimage_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_regular_contract(); @@ -66,7 +66,7 @@ fn validate_contract_address_incorrect_partial_address_preimage_fails() { builder.validate(); } -#[test(should_fail_with="computed contract address does not match expected one")] +#[test(should_fail_with = "computed contract address does not match expected one")] fn validate_contract_address_incorrect_address_preimage_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_regular_contract(); @@ -81,7 +81,7 @@ fn validate_contract_address_protocol_contract_succeeds() { builder.validate(); } -#[test(should_fail_with="computed contract address does not match expected one")] +#[test(should_fail_with = "computed contract address does not match expected one")] fn validate_contract_address_protocol_contract_wrong_index_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_protocol_contract(); @@ -90,7 +90,7 @@ fn validate_contract_address_protocol_contract_wrong_index_fails() { builder.validate(); } -#[test(should_fail_with="computed contract address does not match expected one")] +#[test(should_fail_with = "computed contract address does not match expected one")] fn validate_contract_address_protocol_contract_wrong_computed_address_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_protocol_contract(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_counters.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_counters.nr index 76882fe2a2e..aef197599da 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_counters.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_counters.nr @@ -3,7 +3,6 @@ use crate::tests::private_call_data_validator_builder::PrivateCallDataValidatorB /** * Private call. */ - #[test] fn validate_counters_private_call_succeeds() { let builder = PrivateCallDataValidatorBuilder::new_from_counter(23); @@ -16,7 +15,7 @@ fn validate_counters_private_call_from_0_counter_succeeds() { builder.validate(); } -#[test(should_fail_with="private call has incorrect counter range")] +#[test(should_fail_with = "private call has incorrect counter range")] fn validate_counters_private_call_no_counter_range_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -25,7 +24,7 @@ fn validate_counters_private_call_no_counter_range_fails() { builder.validate(); } -#[test(should_fail_with="private call has incorrect counter range")] +#[test(should_fail_with = "private call has incorrect counter range")] fn validate_counters_private_call_negative_call_counter_range_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -37,7 +36,6 @@ fn validate_counters_private_call_negative_call_counter_range_fails() { /** * Note hashes */ - #[test] fn validate_counters_note_hashes_succeeds() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -47,7 +45,7 @@ fn validate_counters_note_hashes_succeeds() { builder.validate(); } -#[test(should_fail_with="counter must be larger than the counter of the previous item")] +#[test(should_fail_with = "counter must be larger than the counter of the previous item")] fn validate_counters_note_hash_counter_same_as_call_counter_start_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -58,7 +56,7 @@ fn validate_counters_note_hash_counter_same_as_call_counter_start_fails() { builder.validate(); } -#[test(should_fail_with="counter must be larger than the counter of the previous item")] +#[test(should_fail_with = "counter must be larger than the counter of the previous item")] fn validate_counters_note_hash_counter_smaller_than_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -69,7 +67,7 @@ fn validate_counters_note_hash_counter_smaller_than_call_fails() { builder.validate(); } -#[test(should_fail_with="counter must be larger than the counter of the previous item")] +#[test(should_fail_with = "counter must be larger than the counter of the previous item")] fn validate_counters_note_hash_identical_counters_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -82,7 +80,7 @@ fn validate_counters_note_hash_identical_counters_fails() { builder.validate(); } -#[test(should_fail_with="counter must be larger than the counter of the previous item")] +#[test(should_fail_with = "counter must be larger than the counter of the previous item")] fn validate_counters_note_hash_unordered_counters_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -95,7 +93,7 @@ fn validate_counters_note_hash_unordered_counters_fails() { builder.validate(); } -#[test(should_fail_with="counter must be smaller than the end counter of the call")] +#[test(should_fail_with = "counter must be smaller than the end counter of the call")] fn validate_counters_note_hash_counter_larger_than_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -106,7 +104,7 @@ fn validate_counters_note_hash_counter_larger_than_call_fails() { builder.validate(); } -#[test(should_fail_with="counter must be smaller than the end counter of the call")] +#[test(should_fail_with = "counter must be smaller than the end counter of the call")] fn validate_counters_note_hash_counter_same_as_call_counter_end_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -120,7 +118,6 @@ fn validate_counters_note_hash_counter_same_as_call_counter_end_fails() { /** * Private call requests. */ - #[test] fn validate_counters_private_call_requests_succeeds() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -130,7 +127,7 @@ fn validate_counters_private_call_requests_succeeds() { builder.validate(); } -#[test(should_fail_with="start counter must be larger than the end counter of the previous call")] +#[test(should_fail_with = "start counter must be larger than the end counter of the previous call")] fn validate_counters_private_call_requests_less_than_call_start_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -142,7 +139,7 @@ fn validate_counters_private_call_requests_less_than_call_start_fails() { builder.validate(); } -#[test(should_fail_with="start counter must be larger than the end counter of the previous call")] +#[test(should_fail_with = "start counter must be larger than the end counter of the previous call")] fn validate_counters_private_call_requests_equal_call_start_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -154,7 +151,7 @@ fn validate_counters_private_call_requests_equal_call_start_fails() { builder.validate(); } -#[test(should_fail_with="start counter must be larger than the end counter of the previous call")] +#[test(should_fail_with = "start counter must be larger than the end counter of the previous call")] fn validate_counters_private_call_requests_less_than_previous_end_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -166,7 +163,7 @@ fn validate_counters_private_call_requests_less_than_previous_end_fails() { builder.validate(); } -#[test(should_fail_with="start counter must be larger than the end counter of the previous call")] +#[test(should_fail_with = "start counter must be larger than the end counter of the previous call")] fn validate_counters_private_call_requests_same_as_previous_end_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -178,7 +175,7 @@ fn validate_counters_private_call_requests_same_as_previous_end_fails() { builder.validate(); } -#[test(should_fail_with="nested call has incorrect counter range")] +#[test(should_fail_with = "nested call has incorrect counter range")] fn validate_counters_private_call_requests_end_less_than_start_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -190,7 +187,7 @@ fn validate_counters_private_call_requests_end_less_than_start_fails() { builder.validate(); } -#[test(should_fail_with="nested call has incorrect counter range")] +#[test(should_fail_with = "nested call has incorrect counter range")] fn validate_counters_private_call_requests_end_equal_start_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -202,7 +199,7 @@ fn validate_counters_private_call_requests_end_equal_start_fails() { builder.validate(); } -#[test(should_fail_with="end counter must be smaller than the end counter of the parent call")] +#[test(should_fail_with = "end counter must be smaller than the end counter of the parent call")] fn validate_counters_private_call_requests_greater_than_call_end_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -214,7 +211,7 @@ fn validate_counters_private_call_requests_greater_than_call_end_fails() { builder.validate(); } -#[test(should_fail_with="end counter must be smaller than the end counter of the parent call")] +#[test(should_fail_with = "end counter must be smaller than the end counter of the parent call")] fn validate_counters_private_call_requests_equal_call_end_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_note_logs.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_note_logs.nr index d2200d771e2..f0c3442bfbb 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_note_logs.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_note_logs.nr @@ -10,7 +10,7 @@ fn validate_note_logs_succeeds() { builder.validate(); } -#[test(should_fail_with="could not find note hash linked to note log")] +#[test(should_fail_with = "could not find note hash linked to note log")] fn validate_note_logs_random_note_hash_counter_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -21,7 +21,7 @@ fn validate_note_logs_random_note_hash_counter_fails() { builder.validate(); } -#[test(should_fail_with="could not link a note log to a note hash in another contract")] +#[test(should_fail_with = "could not link a note log to a note hash in another contract")] fn validate_note_logs_zero_note_hash_counter_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -32,7 +32,7 @@ fn validate_note_logs_zero_note_hash_counter_fails() { builder.validate(); } -#[test(should_fail_with="could not link a note log to a note hash in another contract")] +#[test(should_fail_with = "could not link a note log to a note hash in another contract")] fn validate_note_logs_mismatch_contract_address_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_from_counter(50); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_private_call_requests.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_private_call_requests.nr index 3ce78ba5a03..e6f3ca46491 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_private_call_requests.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_private_call_requests.nr @@ -59,7 +59,7 @@ fn validate_private_call_requests_from_static_call_succeeds() { builder.validate(); } -#[test(should_fail_with="incorrect msg_sender for delegate call request")] +#[test(should_fail_with = "incorrect msg_sender for delegate call request")] fn validate_private_call_requests_incorrect_msg_sender_for_delegate_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -70,7 +70,7 @@ fn validate_private_call_requests_incorrect_msg_sender_for_delegate_call_fails() builder.validate(); } -#[test(should_fail_with="incorrect storage_contract_address for delegate call request")] +#[test(should_fail_with = "incorrect storage_contract_address for delegate call request")] fn validate_private_call_requests_incorrect_storage_contract_address_for_delegate_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -82,7 +82,7 @@ fn validate_private_call_requests_incorrect_storage_contract_address_for_delegat builder.validate(); } -#[test(should_fail_with="incorrect msg_sender for call request")] +#[test(should_fail_with = "incorrect msg_sender for call request")] fn validate_private_call_requests_incorrect_msg_sender_for_regular_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -93,7 +93,7 @@ fn validate_private_call_requests_incorrect_msg_sender_for_regular_call_fails() builder.validate(); } -#[test(should_fail_with="incorrect storage_contract_address for call request")] +#[test(should_fail_with = "incorrect storage_contract_address for call request")] fn validate_private_call_requests_incorrect_storage_contract_address_for_regular_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new(); @@ -104,7 +104,7 @@ fn validate_private_call_requests_incorrect_storage_contract_address_for_regular builder.validate(); } -#[test(should_fail_with="static call cannot make non-static calls")] +#[test(should_fail_with = "static call cannot make non-static calls")] fn validate_private_call_requests_static_call_regular_call_fails() { let mut builder = PrivateCallDataValidatorBuilder::new().is_static_call(); @@ -118,7 +118,6 @@ fn validate_private_call_requests_static_call_regular_call_fails() { /** * Splitting call requests. */ - #[test] fn validate_private_call_requests_split_private_calls_succeeds() { let mut builder = PrivateCallDataValidatorBuilder::new_first_call(); @@ -176,7 +175,7 @@ fn validate_private_call_requests_split_private_calls_less_than_first_revertible builder.validate(); } -#[test(should_fail_with="min_revertible_side_effect_counter must be greater than the end counter of the last non revertible item")] +#[test(should_fail_with = "min_revertible_side_effect_counter must be greater than the end counter of the last non revertible item")] fn validate_private_call_requests_split_private_calls_less_than_last_non_revertible_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_first_call(); @@ -189,7 +188,7 @@ fn validate_private_call_requests_split_private_calls_less_than_last_non_reverti builder.validate(); } -#[test(should_fail_with="min_revertible_side_effect_counter must be greater than the end counter of the last non revertible item")] +#[test(should_fail_with = "min_revertible_side_effect_counter must be greater than the end counter of the last non revertible item")] fn validate_private_call_requests_split_private_calls_equal_last_non_revertible_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_first_call(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_aggregated_values.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_aggregated_values.nr index 0a30597cf8c..a61407d9819 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_aggregated_values.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_aggregated_values.nr @@ -9,7 +9,6 @@ fn validate_aggregated_values_empty_data_succeeds() { /** * min_revertible_side_effect_counter */ - #[test] fn validate_aggregated_values_min_revertible_side_effect_counter_from_previous_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -30,7 +29,7 @@ fn validate_aggregated_values_min_revertible_side_effect_counter_from_private_ca builder.validate_as_inner_call(); } -#[test(should_fail_with="cannot overwrite min_revertible_side_effect_counter")] +#[test(should_fail_with = "cannot overwrite min_revertible_side_effect_counter")] fn validate_aggregated_values_min_revertible_side_effect_counter_overwrite_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -41,7 +40,7 @@ fn validate_aggregated_values_min_revertible_side_effect_counter_overwrite_fails builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output min_revertible_side_effect_counter")] +#[test(should_fail_with = "incorrect output min_revertible_side_effect_counter")] fn validate_aggregated_values_min_revertible_side_effect_counter_from_previous_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -51,7 +50,7 @@ fn validate_aggregated_values_min_revertible_side_effect_counter_from_previous_m builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output min_revertible_side_effect_counter")] +#[test(should_fail_with = "incorrect output min_revertible_side_effect_counter")] fn validate_aggregated_values_min_revertible_side_effect_counter_from_private_call_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -61,7 +60,7 @@ fn validate_aggregated_values_min_revertible_side_effect_counter_from_private_ca builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output min_revertible_side_effect_counter")] +#[test(should_fail_with = "incorrect output min_revertible_side_effect_counter")] fn validate_aggregated_values_min_revertible_side_effect_counter_random_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -73,7 +72,6 @@ fn validate_aggregated_values_min_revertible_side_effect_counter_random_output_f /** * max_block_number */ - #[test] fn validate_aggregated_values_max_block_number_from_previous_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -127,7 +125,7 @@ fn validate_aggregated_values_max_block_number_from_both_pick_private_call_succe builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output max_block_number")] +#[test(should_fail_with = "incorrect output max_block_number")] fn validate_aggregated_values_max_block_number_from_both_pick_larger_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -138,7 +136,7 @@ fn validate_aggregated_values_max_block_number_from_both_pick_larger_fails() { builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output max_block_number")] +#[test(should_fail_with = "incorrect output max_block_number")] fn validate_aggregated_values_max_block_number_random_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -150,7 +148,6 @@ fn validate_aggregated_values_max_block_number_random_output_fails() { /** * public_teardown_call_request */ - #[test] fn validate_aggregated_values_public_teardown_call_request_from_previous_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -171,7 +168,7 @@ fn validate_aggregated_values_public_teardown_call_request_from_private_call_suc builder.validate_as_inner_call(); } -#[test(should_fail_with="cannot overwrite public_teardown_call_request")] +#[test(should_fail_with = "cannot overwrite public_teardown_call_request")] fn validate_aggregated_values_public_teardown_call_request_from_both_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -182,7 +179,7 @@ fn validate_aggregated_values_public_teardown_call_request_from_both_fails() { builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output public_teardown_call_request")] +#[test(should_fail_with = "incorrect output public_teardown_call_request")] fn validate_aggregated_values_public_teardown_call_request_from_previous_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -194,7 +191,7 @@ fn validate_aggregated_values_public_teardown_call_request_from_previous_mismatc builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output public_teardown_call_request")] +#[test(should_fail_with = "incorrect output public_teardown_call_request")] fn validate_aggregated_values_public_teardown_call_request_from_private_call_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -206,7 +203,7 @@ fn validate_aggregated_values_public_teardown_call_request_from_private_call_mis builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output public_teardown_call_request")] +#[test(should_fail_with = "incorrect output public_teardown_call_request")] fn validate_aggregated_values_public_teardown_call_request_random_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -218,7 +215,6 @@ fn validate_aggregated_values_public_teardown_call_request_random_output_fails() /** * fee_payer */ - #[test] fn validate_aggregated_values_fee_payer_from_previous_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -239,7 +235,7 @@ fn validate_aggregated_values_fee_payer_from_private_call_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="cannot overwrite fee_payer")] +#[test(should_fail_with = "cannot overwrite fee_payer")] fn validate_aggregated_values_fee_payer_from_both_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -250,7 +246,7 @@ fn validate_aggregated_values_fee_payer_from_both_fails() { builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output fee_payer")] +#[test(should_fail_with = "incorrect output fee_payer")] fn validate_aggregated_values_fee_payer_from_previous_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -262,7 +258,7 @@ fn validate_aggregated_values_fee_payer_from_previous_mismatch_fails() { builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output fee_payer")] +#[test(should_fail_with = "incorrect output fee_payer")] fn validate_aggregated_values_fee_payer_from_private_call_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -274,7 +270,7 @@ fn validate_aggregated_values_fee_payer_from_private_call_mismatch_fails() { builder.validate_as_inner_call(); } -#[test(should_fail_with="incorrect output fee_payer")] +#[test(should_fail_with = "incorrect output fee_payer")] fn validate_aggregated_values_fee_payer_random_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_initial_values.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_initial_values.nr index 391ce60e561..98c59019fd2 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_initial_values.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_initial_values.nr @@ -10,8 +10,7 @@ fn validate_initial_values_empty_data_succeeds() { /** * constants */ - -#[test(should_fail_with="mismatch tx_context")] +#[test(should_fail_with = "mismatch tx_context")] fn validate_initial_values_constants_mismatch_chain_id_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -20,7 +19,7 @@ fn validate_initial_values_constants_mismatch_chain_id_fails() { builder.validate_as_first_call(); } -#[test(should_fail_with="mismatch historical_header")] +#[test(should_fail_with = "mismatch historical_header")] fn validate_initial_values_constants_mismatch_txs_effects_hash_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -29,7 +28,7 @@ fn validate_initial_values_constants_mismatch_txs_effects_hash_fails() { builder.validate_as_first_call(); } -#[test(should_fail_with="constants.global_variables must be empty")] +#[test(should_fail_with = "constants.global_variables must be empty")] fn validate_initial_values_constants_non_empty_global_variables_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -41,8 +40,7 @@ fn validate_initial_values_constants_non_empty_global_variables_fails() { /** * First nullifier. */ - -#[test(should_fail_with="first nullifier must be the tx request nullifier")] +#[test(should_fail_with = "first nullifier must be the tx request nullifier")] fn validate_initial_values_constants_incorrect_first_nullifier_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -51,7 +49,7 @@ fn validate_initial_values_constants_incorrect_first_nullifier_fails() { builder.validate_as_first_call(); } -#[test(should_fail_with="first nullifier must be the tx request nullifier")] +#[test(should_fail_with = "first nullifier must be the tx request nullifier")] fn validate_initial_values_constants_empty_first_nullifier_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -63,7 +61,6 @@ fn validate_initial_values_constants_empty_first_nullifier_fails() { /** * min_revertible_side_effect_counter */ - #[test] fn validate_initial_values_min_revertible_side_effect_counter_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -74,7 +71,7 @@ fn validate_initial_values_min_revertible_side_effect_counter_succeeds() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial min_revertible_side_effect_counter")] +#[test(should_fail_with = "incorrect initial min_revertible_side_effect_counter")] fn validate_initial_values_min_revertible_side_effect_counter_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -84,7 +81,7 @@ fn validate_initial_values_min_revertible_side_effect_counter_mismatch_fails() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial min_revertible_side_effect_counter")] +#[test(should_fail_with = "incorrect initial min_revertible_side_effect_counter")] fn validate_initial_values_min_revertible_side_effect_counter_empty_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -93,7 +90,7 @@ fn validate_initial_values_min_revertible_side_effect_counter_empty_output_fails builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial min_revertible_side_effect_counter")] +#[test(should_fail_with = "incorrect initial min_revertible_side_effect_counter")] fn validate_initial_values_min_revertible_side_effect_counter_random_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -105,7 +102,6 @@ fn validate_initial_values_min_revertible_side_effect_counter_random_output_fail /** * max_block_number */ - #[test] fn validate_initial_values_max_block_number_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -116,7 +112,7 @@ fn validate_initial_values_max_block_number_succeeds() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial max_block_number")] +#[test(should_fail_with = "incorrect initial max_block_number")] fn validate_initial_values_max_block_number_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -126,7 +122,7 @@ fn validate_initial_values_max_block_number_mismatch_fails() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial max_block_number")] +#[test(should_fail_with = "incorrect initial max_block_number")] fn validate_initial_values_max_block_number_empty_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -135,7 +131,7 @@ fn validate_initial_values_max_block_number_empty_output_fails() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial max_block_number")] +#[test(should_fail_with = "incorrect initial max_block_number")] fn validate_initial_values_max_block_number_random_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -147,7 +143,6 @@ fn validate_initial_values_max_block_number_random_output_fails() { /** * public_teardown_call_request */ - #[test] fn validate_initial_values_public_teardown_call_request_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -158,7 +153,7 @@ fn validate_initial_values_public_teardown_call_request_succeeds() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial public_teardown_call_request")] +#[test(should_fail_with = "incorrect initial public_teardown_call_request")] fn validate_initial_values_public_teardown_call_request_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -170,7 +165,7 @@ fn validate_initial_values_public_teardown_call_request_mismatch_fails() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial public_teardown_call_request")] +#[test(should_fail_with = "incorrect initial public_teardown_call_request")] fn validate_initial_values_public_teardown_call_request_empty_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -179,7 +174,7 @@ fn validate_initial_values_public_teardown_call_request_empty_output_fails() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial public_teardown_call_request")] +#[test(should_fail_with = "incorrect initial public_teardown_call_request")] fn validate_initial_values_public_teardown_call_request_random_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -191,7 +186,6 @@ fn validate_initial_values_public_teardown_call_request_random_output_fails() { /** * fee_payer */ - #[test] fn validate_initial_values_fee_payer_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -202,7 +196,7 @@ fn validate_initial_values_fee_payer_succeeds() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial fee_payer")] +#[test(should_fail_with = "incorrect initial fee_payer")] fn validate_initial_values_fee_payer_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -214,7 +208,7 @@ fn validate_initial_values_fee_payer_mismatch_fails() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial fee_payer")] +#[test(should_fail_with = "incorrect initial fee_payer")] fn validate_initial_values_fee_payer_empty_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -223,7 +217,7 @@ fn validate_initial_values_fee_payer_empty_output_fails() { builder.validate_as_first_call(); } -#[test(should_fail_with="incorrect initial fee_payer")] +#[test(should_fail_with = "incorrect initial fee_payer")] fn validate_initial_values_fee_payer_random_output_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_propagated_from_previous_kernel.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_propagated_from_previous_kernel.nr index 14422620ccf..8ac4bb62749 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_propagated_from_previous_kernel.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_propagated_from_previous_kernel.nr @@ -9,8 +9,7 @@ fn validate_propagated_from_previous_kernel_empty_data_succeeds() { /** * constants */ - -#[test(should_fail_with="mismatch constants")] +#[test(should_fail_with = "mismatch constants")] fn validate_propagated_from_previous_kernel_constants_mismatch_chain_id_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -19,7 +18,7 @@ fn validate_propagated_from_previous_kernel_constants_mismatch_chain_id_fails() builder.validate_as_inner_call(); } -#[test(should_fail_with="mismatch constants")] +#[test(should_fail_with = "mismatch constants")] fn validate_propagated_from_previous_kernel_constants_mismatch_txs_effects_hash_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -28,7 +27,7 @@ fn validate_propagated_from_previous_kernel_constants_mismatch_txs_effects_hash_ builder.validate_as_inner_call(); } -#[test(should_fail_with="mismatch constants")] +#[test(should_fail_with = "mismatch constants")] fn validate_propagated_from_previous_kernel_constants_non_empty_global_variables_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -40,7 +39,6 @@ fn validate_propagated_from_previous_kernel_constants_non_empty_global_variables /** * validation_requests */ - #[test] fn validate_propagated_from_previous_kernel_validation_requests_split_counter_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -51,7 +49,7 @@ fn validate_propagated_from_previous_kernel_validation_requests_split_counter_su builder.validate_as_inner_call(); } -#[test(should_fail_with="mismatch validation requests split counter")] +#[test(should_fail_with = "mismatch validation requests split counter")] fn validate_propagated_from_previous_kernel_validation_requests_split_counter_mismatch_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -61,7 +59,7 @@ fn validate_propagated_from_previous_kernel_validation_requests_split_counter_mi builder.validate_as_inner_call(); } -#[test(should_fail_with="mismatch validation requests split counter")] +#[test(should_fail_with = "mismatch validation requests split counter")] fn validate_propagated_from_previous_kernel_validation_requests_split_counter_unexpected_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -74,7 +72,6 @@ fn validate_propagated_from_previous_kernel_validation_requests_split_counter_un /** * note_hash_read_requests */ - #[test] fn validate_propagated_from_previous_kernel_note_hash_read_requests_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -85,7 +82,7 @@ fn validate_propagated_from_previous_kernel_note_hash_read_requests_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_note_hash_read_requests_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -99,7 +96,6 @@ fn validate_propagated_from_previous_kernel_note_hash_read_requests_less_than_fa /** * nullifier_read_requests */ - #[test] fn validate_propagated_from_previous_kernel_nullifier_read_requests_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -110,7 +106,7 @@ fn validate_propagated_from_previous_kernel_nullifier_read_requests_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_nullifier_read_requests_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -124,7 +120,6 @@ fn validate_propagated_from_previous_kernel_nullifier_read_requests_less_than_fa /** * key_validation_requests */ - #[test] fn validate_propagated_from_previous_kernel_key_validation_requests_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -135,7 +130,7 @@ fn validate_propagated_from_previous_kernel_key_validation_requests_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_key_validation_requests_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -149,7 +144,6 @@ fn validate_propagated_from_previous_kernel_key_validation_requests_less_than_fa /** * note_hashes */ - #[test] fn validate_propagated_from_previous_kernel_note_hashes_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -160,7 +154,7 @@ fn validate_propagated_from_previous_kernel_note_hashes_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_note_hashes_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -174,7 +168,6 @@ fn validate_propagated_from_previous_kernel_note_hashes_less_than_fails() { /** * nullifiers */ - #[test] fn validate_propagated_from_previous_kernel_nullifiers_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -185,7 +178,7 @@ fn validate_propagated_from_previous_kernel_nullifiers_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_nullifiers_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -199,7 +192,6 @@ fn validate_propagated_from_previous_kernel_nullifiers_less_than_fails() { /** * l2_to_l1_msgs */ - #[test] fn validate_propagated_from_previous_kernel_l2_to_l1_msgs_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -210,7 +202,7 @@ fn validate_propagated_from_previous_kernel_l2_to_l1_msgs_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_l2_to_l1_msgs_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -224,7 +216,6 @@ fn validate_propagated_from_previous_kernel_l2_to_l1_msgs_less_than_fails() { /** * note_encrypted_log_hashes */ - #[test] fn validate_propagated_from_previous_kernel_note_encrypted_log_hashes_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -235,7 +226,7 @@ fn validate_propagated_from_previous_kernel_note_encrypted_log_hashes_succeeds() builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_note_encrypted_log_hashes_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -249,7 +240,6 @@ fn validate_propagated_from_previous_kernel_note_encrypted_log_hashes_less_than_ /** * encrypted_log_hashes */ - #[test] fn validate_propagated_from_previous_kernel_encrypted_log_hashes_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -260,7 +250,7 @@ fn validate_propagated_from_previous_kernel_encrypted_log_hashes_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_encrypted_log_hashes_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -274,7 +264,6 @@ fn validate_propagated_from_previous_kernel_encrypted_log_hashes_less_than_fails /** * unencrypted_log_hashes */ - #[test] fn validate_propagated_from_previous_kernel_unencrypted_log_hashes_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -285,7 +274,7 @@ fn validate_propagated_from_previous_kernel_unencrypted_log_hashes_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_unencrypted_log_hashes_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -299,7 +288,6 @@ fn validate_propagated_from_previous_kernel_unencrypted_log_hashes_less_than_fai /** * private_call_requests */ - #[test] fn validate_propagated_from_previous_kernel_private_call_requests_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -310,7 +298,7 @@ fn validate_propagated_from_previous_kernel_private_call_requests_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_private_call_requests_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -324,7 +312,6 @@ fn validate_propagated_from_previous_kernel_private_call_requests_less_than_fail /** * public_call_requests */ - #[test] fn validate_propagated_from_previous_kernel_public_call_requests_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -335,7 +322,7 @@ fn validate_propagated_from_previous_kernel_public_call_requests_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not prepend to dest")] +#[test(should_fail_with = "source item does not prepend to dest")] fn validate_propagated_from_previous_kernel_public_call_requests_less_than_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_propagated_from_private_call.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_propagated_from_private_call.nr index 4b7888665cc..275eea46eea 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_propagated_from_private_call.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/validate_propagated_from_private_call.nr @@ -10,7 +10,6 @@ fn validate_propagated_from_private_call_empty_data_succeeds() { * note_hash_read_requests * With private call data only. */ - #[test] fn validate_propagated_from_private_call_note_hash_read_requests_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -21,7 +20,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not append to dest")] +#[test(should_fail_with = "source item does not append to dest")] fn validate_propagated_from_private_call_note_hash_read_requests_output_mismatch_value_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -33,7 +32,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_output_mismatch builder.validate_as_inner_call(); } -#[test(should_fail_with="propagated contract address does not match")] +#[test(should_fail_with = "propagated contract address does not match")] fn validate_propagated_from_private_call_note_hash_read_requests_mismatch_contract_address_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -45,7 +44,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_mismatch_contra builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not append to dest")] +#[test(should_fail_with = "source item does not append to dest")] fn validate_propagated_from_private_call_note_hash_read_requests_output_one_less_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -56,7 +55,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_output_one_less builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_note_hash_read_requests_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -67,7 +66,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_output_one_more builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_note_hash_read_requests_output_extra_non_empty_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -84,7 +83,6 @@ fn validate_propagated_from_private_call_note_hash_read_requests_output_extra_no * note_hash_read_requests * With previous kernel. */ - fn append_note_hash_read_requests_to_previous_kernel(builder: &mut PrivateKernelCircuitOutputValidatorBuilder, num_requests: u32) { builder.previous_kernel.append_note_hash_read_requests(num_requests); builder.output.append_note_hash_read_requests(num_requests); @@ -102,7 +100,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_s builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not append to dest")] +#[test(should_fail_with = "source item does not append to dest")] fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_mismatch_value_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -115,7 +113,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_m builder.validate_as_inner_call(); } -#[test(should_fail_with="propagated contract address does not match")] +#[test(should_fail_with = "propagated contract address does not match")] fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_mismatch_contract_address_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -128,7 +126,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_m builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not append to dest")] +#[test(should_fail_with = "source item does not append to dest")] fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_output_one_less_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -140,7 +138,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_o builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -152,7 +150,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_o builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_output_extra_non_empty_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -166,7 +164,7 @@ fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_o builder.validate_as_inner_call(); } -#[test(should_fail_with="number of total items exceeds limit")] +#[test(should_fail_with = "number of total items exceeds limit")] fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_output_exceeds_max_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -184,7 +182,6 @@ fn validate_propagated_from_private_call_note_hash_read_requests_with_previous_o /** * nullifier_read_requests */ - #[test] fn validate_propagated_from_private_call_nullifier_read_requests_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -195,7 +192,7 @@ fn validate_propagated_from_private_call_nullifier_read_requests_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_nullifier_read_requests_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -209,7 +206,6 @@ fn validate_propagated_from_private_call_nullifier_read_requests_output_one_more /** * key_validation_requests */ - #[test] fn validate_propagated_from_private_call_key_validation_requests_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -220,7 +216,7 @@ fn validate_propagated_from_private_call_key_validation_requests_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_key_validation_requests_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -234,7 +230,6 @@ fn validate_propagated_from_private_call_key_validation_requests_output_one_more /** * note_hashes */ - #[test] fn validate_propagated_from_private_call_note_hashes_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -245,7 +240,7 @@ fn validate_propagated_from_private_call_note_hashes_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_note_hashes_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -259,7 +254,6 @@ fn validate_propagated_from_private_call_note_hashes_output_one_more_fails() { /** * nullifiers */ - #[test] fn validate_propagated_from_private_call_nullifiers_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -271,7 +265,7 @@ fn validate_propagated_from_private_call_nullifiers_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_nullifiers_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -286,7 +280,6 @@ fn validate_propagated_from_private_call_nullifiers_output_one_more_fails() { /** * l2_to_l1_msgs */ - #[test] fn validate_propagated_from_private_call_l2_to_l1_msgs_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -297,7 +290,7 @@ fn validate_propagated_from_private_call_l2_to_l1_msgs_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_l2_to_l1_msgs_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -311,7 +304,6 @@ fn validate_propagated_from_private_call_l2_to_l1_msgs_output_one_more_fails() { /** * note_encrypted_log_hashes */ - #[test] fn validate_propagated_from_private_call_note_encrypted_log_hashes_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -322,7 +314,7 @@ fn validate_propagated_from_private_call_note_encrypted_log_hashes_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_note_encrypted_log_hashes_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -333,7 +325,7 @@ fn validate_propagated_from_private_call_note_encrypted_log_hashes_output_one_mo builder.validate_as_inner_call(); } -#[test(should_fail_with="number of total items exceeds limit")] +#[test(should_fail_with = "number of total items exceeds limit")] fn validate_propagated_from_private_call_note_encrypted_log_hashes_with_previous_output_exceeds_max_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -350,7 +342,6 @@ fn validate_propagated_from_private_call_note_encrypted_log_hashes_with_previous /** * encrypted_log_hashes */ - #[test] fn validate_propagated_from_private_call_encrypted_log_hashes_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -361,7 +352,7 @@ fn validate_propagated_from_private_call_encrypted_log_hashes_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_encrypted_log_hashes_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -375,7 +366,6 @@ fn validate_propagated_from_private_call_encrypted_log_hashes_output_one_more_fa /** * unencrypted_log_hashes */ - #[test] fn validate_propagated_from_private_call_unencrypted_log_hashes_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -386,7 +376,7 @@ fn validate_propagated_from_private_call_unencrypted_log_hashes_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_unencrypted_log_hashes_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -400,7 +390,6 @@ fn validate_propagated_from_private_call_unencrypted_log_hashes_output_one_more_ /** * private_call_requests */ - #[test] fn validate_propagated_from_private_call_private_call_requests_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -411,7 +400,7 @@ fn validate_propagated_from_private_call_private_call_requests_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="source item does not reversed append to dest")] +#[test(should_fail_with = "source item does not reversed append to dest")] fn validate_propagated_from_private_call_private_call_requests_not_reversed_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -445,7 +434,7 @@ fn validate_propagated_from_private_call_private_call_requests_with_previous_out builder.validate_as_inner_call(); } -#[test(should_fail_with="number of total items exceeds limit")] +#[test(should_fail_with = "number of total items exceeds limit")] fn validate_propagated_from_private_call_private_call_requests_with_previous_output_exceeds_max_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -463,7 +452,6 @@ fn validate_propagated_from_private_call_private_call_requests_with_previous_out /** * public_call_requests */ - #[test] fn validate_propagated_from_private_call_public_call_requests_succeeds() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); @@ -474,7 +462,7 @@ fn validate_propagated_from_private_call_public_call_requests_succeeds() { builder.validate_as_inner_call(); } -#[test(should_fail_with="output should be appended with empty items")] +#[test(should_fail_with = "output should be appended with empty items")] fn validate_propagated_from_private_call_public_call_requests_output_one_more_fails() { let mut builder = PrivateKernelCircuitOutputValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_public_inputs_composer_builder/new_from_previous_kernel_with_private_call.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_public_inputs_composer_builder/new_from_previous_kernel_with_private_call.nr index ada950b4a87..a82ee6b7f87 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_public_inputs_composer_builder/new_from_previous_kernel_with_private_call.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_public_inputs_composer_builder/new_from_previous_kernel_with_private_call.nr @@ -41,7 +41,7 @@ fn new_from_previous_kernel_with_private_call_min_revertible_side_effect_counter assert_eq(output.min_revertible_side_effect_counter, 123); } -#[test(should_fail_with="cannot overwrite non-zero min_revertible_side_effect_counter")] +#[test(should_fail_with = "cannot overwrite non-zero min_revertible_side_effect_counter")] fn new_from_previous_kernel_with_private_call_min_revertible_side_effect_counter_overwrite_fails() { let mut builder = PrivateKernelCircuitPublicInputsComposerBuilder::new(); @@ -288,7 +288,7 @@ fn new_from_previous_kernel_with_private_call_public_teardown_call_request_succe assert_eq(output.public_teardown_call_request, request); } -#[test(should_fail_with="Public teardown call request already set")] +#[test(should_fail_with = "Public teardown call request already set")] fn new_from_previous_kernel_with_private_call_public_teardown_call_request_overwrite_fails() { let mut builder = PrivateKernelCircuitPublicInputsComposerBuilder::new(); @@ -309,7 +309,7 @@ fn new_from_previous_kernel_with_private_call_fee_payer_succeeds() { assert_eq(output.fee_payer, fee_payer); } -#[test(should_fail_with="Cannot overwrite non-empty fee_payer")] +#[test(should_fail_with = "Cannot overwrite non-empty fee_payer")] fn new_from_previous_kernel_with_private_call_fee_payer_overwrite_fails() { let mut builder = PrivateKernelCircuitPublicInputsComposerBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/reset_output_validator_builder/validate_sorted_siloed_note_hashes.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/reset_output_validator_builder/validate_sorted_siloed_note_hashes.nr index 6c510b37292..11ce9f3f70c 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/reset_output_validator_builder/validate_sorted_siloed_note_hashes.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/reset_output_validator_builder/validate_sorted_siloed_note_hashes.nr @@ -31,7 +31,7 @@ fn validate_sorted_siloed_note_hashes_unordered_succeeds() { builder.validate(); } -#[test(should_fail_with="incorrect siloed note hashes")] +#[test(should_fail_with = "incorrect siloed note hashes")] fn validate_sorted_siloed_note_hashes_mismatch_sorted_hash_fails() { let mut builder = ResetOutputValidatorBuilder::new_with_note_hash_siloing(); @@ -46,7 +46,7 @@ fn validate_sorted_siloed_note_hashes_mismatch_sorted_hash_fails() { builder.validate(); } -#[test(should_fail_with="unexpected non-empty item")] +#[test(should_fail_with = "unexpected non-empty item")] fn validate_sorted_siloed_note_hashes_extra_item_fails() { let mut builder = ResetOutputValidatorBuilder::new_with_note_hash_siloing(); @@ -61,7 +61,7 @@ fn validate_sorted_siloed_note_hashes_extra_item_fails() { builder.validate_with_hints(hints); } -#[test(should_fail_with="note hashes have been siloed in a previous reset")] +#[test(should_fail_with = "note hashes have been siloed in a previous reset")] fn validate_sorted_siloed_note_hashes_repeat_siloing_fails() { let mut builder = ResetOutputValidatorBuilder::new_with_note_hash_siloing(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/reset_output_validator_builder/validate_sorted_siloed_nullifiers.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/reset_output_validator_builder/validate_sorted_siloed_nullifiers.nr index 17bdc8b371a..e7f41c8f1df 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/reset_output_validator_builder/validate_sorted_siloed_nullifiers.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/reset_output_validator_builder/validate_sorted_siloed_nullifiers.nr @@ -44,7 +44,7 @@ fn validate_sorted_siloed_nullifiers_repeatedly_succeeds() { builder.validate(); } -#[test(should_fail_with="incorrect transformed value")] +#[test(should_fail_with = "incorrect transformed value")] fn validate_sorted_siloed_nullifiers_mismatch_sorted_hash_fails() { let mut builder = ResetOutputValidatorBuilder::new_with_nullifier_siloing(); @@ -59,7 +59,7 @@ fn validate_sorted_siloed_nullifiers_mismatch_sorted_hash_fails() { builder.validate(); } -#[test(should_fail_with="unexpected non-empty item")] +#[test(should_fail_with = "unexpected non-empty item")] fn validate_sorted_siloed_nullifiers_extra_item_fails() { let mut builder = ResetOutputValidatorBuilder::new_with_nullifier_siloing(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_empty_values.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_empty_values.nr index cc502022079..0ba030cc914 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_empty_values.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_empty_values.nr @@ -6,7 +6,7 @@ fn validate_empty_values_succeeds() { builder.validate(); } -#[test(should_fail_with="start_state must be empty")] +#[test(should_fail_with = "start_state must be empty")] fn validate_empty_values_non_empty_start_state_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -15,7 +15,7 @@ fn validate_empty_values_non_empty_start_state_fails() { builder.validate(); } -#[test(should_fail_with="revert_code must be empty")] +#[test(should_fail_with = "revert_code must be empty")] fn validate_empty_values_non_empty_revert_code_fails() { let mut builder = TailOutputValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_gas_used.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_gas_used.nr index 07099801415..5f9b63587f2 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_gas_used.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_gas_used.nr @@ -21,7 +21,7 @@ fn validate_gas_used_succeeds() { builder.validate_with_output(output); } -#[test(should_fail_with="incorrect metered gas used")] +#[test(should_fail_with = "incorrect metered gas used")] fn validate_gas_used_wrong_da_gas_fails() { let builder = TailOutputValidatorBuilder::new_with_data(); let mut output = builder.export_output(); @@ -32,7 +32,7 @@ fn validate_gas_used_wrong_da_gas_fails() { builder.validate_with_output(output); } -#[test(should_fail_with="incorrect metered gas used")] +#[test(should_fail_with = "incorrect metered gas used")] fn validate_gas_used_wrong_l2_gas_fails() { let builder = TailOutputValidatorBuilder::new_with_data(); let mut output = builder.export_output(); @@ -43,7 +43,7 @@ fn validate_gas_used_wrong_l2_gas_fails() { builder.validate_with_output(output); } -#[test(should_fail_with="The gas used exceeds the gas limits")] +#[test(should_fail_with = "The gas used exceeds the gas limits")] fn validate_gas_used_exceed_da_limit_fails() { let mut builder = TailOutputValidatorBuilder::new_with_data(); let mut output = builder.export_output(); @@ -57,7 +57,7 @@ fn validate_gas_used_exceed_da_limit_fails() { builder.validate_with_output(output); } -#[test(should_fail_with="The gas used exceeds the gas limits")] +#[test(should_fail_with = "The gas used exceeds the gas limits")] fn validate_gas_used_exceed_l2_limit_fails() { let mut builder = TailOutputValidatorBuilder::new_with_data(); let mut output = builder.export_output(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_sorted_values.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_sorted_values.nr index beabe6d5a5d..e927ed83e6a 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_sorted_values.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_sorted_values.nr @@ -4,7 +4,6 @@ use dep::types::tests::utils::swap_items; /** * l2_to_l1_msgs */ - #[test] fn validate_propagated_sorted_values_l2_to_l1_msgs_succeeds() { let mut builder = TailOutputValidatorBuilder::new(); @@ -26,7 +25,7 @@ fn validate_propagated_sorted_values_l2_to_l1_msgs_unordered_succeeds() { builder.validate(); } -#[test(should_fail_with="incorrect transformed value")] +#[test(should_fail_with = "incorrect transformed value")] fn validate_propagated_sorted_values_l2_to_l1_msgs_mismatch_hash_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -41,7 +40,6 @@ fn validate_propagated_sorted_values_l2_to_l1_msgs_mismatch_hash_fails() { /** * unencrypted_log_hashes */ - #[test] fn validate_propagated_sorted_values_unencrypted_log_hashes_succeeds() { let mut builder = TailOutputValidatorBuilder::new(); @@ -66,7 +64,7 @@ fn validate_propagated_sorted_values_unencrypted_log_hashes_unordered_succeeds() builder.validate(); } -#[test(should_fail_with="incorrect transformed value")] +#[test(should_fail_with = "incorrect transformed value")] fn validate_propagated_sorted_values_unencrypted_log_hashes_wrong_order_fails() { let mut builder = TailOutputValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_values.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_values.nr index a45b16018bb..edce9cb4745 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_values.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_values.nr @@ -4,7 +4,6 @@ use dep::types::address::AztecAddress; /** * constants */ - #[test] fn validate_propagated_values_constants_succeeds() { let mut builder = TailOutputValidatorBuilder::new(); @@ -15,7 +14,7 @@ fn validate_propagated_values_constants_succeeds() { builder.validate(); } -#[test(should_fail_with="mismatch constants")] +#[test(should_fail_with = "mismatch constants")] fn validate_propagated_values_constants_mismatch_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -29,7 +28,6 @@ fn validate_propagated_values_constants_mismatch_fails() { /** * max_block_number */ - #[test] fn validate_propagated_values_max_block_number_succeeds() { let mut builder = TailOutputValidatorBuilder::new(); @@ -40,7 +38,7 @@ fn validate_propagated_values_max_block_number_succeeds() { builder.validate(); } -#[test(should_fail_with="mismatch rollup_validation_requests")] +#[test(should_fail_with = "mismatch rollup_validation_requests")] fn validate_propagated_values_max_block_number_mismatch_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -54,7 +52,6 @@ fn validate_propagated_values_max_block_number_mismatch_fails() { /** * fee_payer */ - #[test] fn validate_propagated_values_fee_payer_succeeds() { let mut builder = TailOutputValidatorBuilder::new(); @@ -65,7 +62,7 @@ fn validate_propagated_values_fee_payer_succeeds() { builder.validate(); } -#[test(should_fail_with="mismatch fee_payer")] +#[test(should_fail_with = "mismatch fee_payer")] fn validate_propagated_values_fee_payer_mismatch_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -79,7 +76,6 @@ fn validate_propagated_values_fee_payer_mismatch_fails() { /** * note_hashes */ - #[test] fn validate_propagated_values_note_hashes_succeeds() { let mut builder = TailOutputValidatorBuilder::new(); @@ -90,7 +86,7 @@ fn validate_propagated_values_note_hashes_succeeds() { builder.validate(); } -#[test(should_fail_with="mismatch note_hashes")] +#[test(should_fail_with = "mismatch note_hashes")] fn validate_propagated_values_note_hashes_mismatch_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -103,7 +99,7 @@ fn validate_propagated_values_note_hashes_mismatch_fails() { builder.validate(); } -#[test(should_fail_with="mismatch note_hashes")] +#[test(should_fail_with = "mismatch note_hashes")] fn validate_propagated_values_note_hashes_extra_item_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -117,7 +113,6 @@ fn validate_propagated_values_note_hashes_extra_item_fails() { /** * nullifiers */ - #[test] fn validate_propagated_values_nullifiers_succeeds() { let mut builder = TailOutputValidatorBuilder::new(); @@ -128,7 +123,7 @@ fn validate_propagated_values_nullifiers_succeeds() { builder.validate(); } -#[test(should_fail_with="mismatch nullifiers")] +#[test(should_fail_with = "mismatch nullifiers")] fn validate_propagated_values_nullifiers_mismatch_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -141,7 +136,7 @@ fn validate_propagated_values_nullifiers_mismatch_fails() { builder.validate(); } -#[test(should_fail_with="mismatch nullifiers")] +#[test(should_fail_with = "mismatch nullifiers")] fn validate_propagated_values_nullifiers_extra_item_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -155,7 +150,6 @@ fn validate_propagated_values_nullifiers_extra_item_fails() { /** * note_encrypted_log_hashes */ - #[test] fn validate_propagated_values_note_encrypted_log_hashes_succeeds() { let mut builder = TailOutputValidatorBuilder::new(); @@ -166,7 +160,7 @@ fn validate_propagated_values_note_encrypted_log_hashes_succeeds() { builder.validate(); } -#[test(should_fail_with="mismatch note_encrypted_logs_hashes")] +#[test(should_fail_with = "mismatch note_encrypted_logs_hashes")] fn validate_propagated_values_note_encrypted_log_hashes_mismatch_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -179,7 +173,7 @@ fn validate_propagated_values_note_encrypted_log_hashes_mismatch_fails() { builder.validate(); } -#[test(should_fail_with="mismatch note_encrypted_logs_hashes")] +#[test(should_fail_with = "mismatch note_encrypted_logs_hashes")] fn validate_propagated_values_note_encrypted_log_hashes_non_zero_counter_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -196,7 +190,6 @@ fn validate_propagated_values_note_encrypted_log_hashes_non_zero_counter_fails() /** * encrypted_log_hashes */ - #[test] fn validate_propagated_values_encrypted_log_hashes_succeeds() { let mut builder = TailOutputValidatorBuilder::new(); @@ -207,7 +200,7 @@ fn validate_propagated_values_encrypted_log_hashes_succeeds() { builder.validate(); } -#[test(should_fail_with="mismatch encrypted_logs_hashes")] +#[test(should_fail_with = "mismatch encrypted_logs_hashes")] fn validate_propagated_values_encrypted_logs_hashes_mismatch_fails() { let mut builder = TailOutputValidatorBuilder::new(); @@ -220,7 +213,7 @@ fn validate_propagated_values_encrypted_logs_hashes_mismatch_fails() { builder.validate(); } -#[test(should_fail_with="mismatch encrypted_logs_hashes")] +#[test(should_fail_with = "mismatch encrypted_logs_hashes")] fn validate_propagated_values_encrypted_logs_hashes_non_zero_counter_fails() { let mut builder = TailOutputValidatorBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/components/public_tail_output_validator/validate_linked_public_data_writes.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/components/public_tail_output_validator/validate_linked_public_data_writes.nr index 40fcb6415f7..f0402b94bbc 100644 --- a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/components/public_tail_output_validator/validate_linked_public_data_writes.nr +++ b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/components/public_tail_output_validator/validate_linked_public_data_writes.nr @@ -111,7 +111,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="hinted leaf has different slot")] + #[test(should_fail_with = "hinted leaf has different slot")] fn validate_linked_public_data_writes_link_prev_to_empty_leaf_fails() { let mut builder = TestBuilder::new(); @@ -121,7 +121,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="hinted leaf does not link to current write")] + #[test(should_fail_with = "hinted leaf does not link to current write")] fn validate_linked_public_data_writes_link_two_writes_to_same_leaf_fails() { let mut builder = TestBuilder::new(); @@ -131,7 +131,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="hinted write has different slot")] + #[test(should_fail_with = "hinted write has different slot")] fn validate_linked_public_data_writes_link_prev_to_empty_write_fails() { let mut builder = TestBuilder::new(); @@ -141,7 +141,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="previous write must have a smaller counter")] + #[test(should_fail_with = "previous write must have a smaller counter")] fn validate_linked_public_data_writes_not_sorted_by_counter_fails() { let mut builder = TestBuilder::new(); @@ -163,7 +163,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="hinted previous write does not link to current write")] + #[test(should_fail_with = "hinted previous write does not link to current write")] fn validate_linked_public_data_writes_link_two_writes_to_same_prev_write_fails() { let mut builder = TestBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/components/public_tail_output_validator/validate_unique_leaf_slots.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/components/public_tail_output_validator/validate_unique_leaf_slots.nr index 6aa8a79d41f..8e9675ae592 100644 --- a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/components/public_tail_output_validator/validate_unique_leaf_slots.nr +++ b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/components/public_tail_output_validator/validate_unique_leaf_slots.nr @@ -107,7 +107,7 @@ mod tests { builder.execute() } - #[test(should_fail_with="sorted value does not link to leaf")] + #[test(should_fail_with = "sorted value does not link to leaf")] fn validate_unique_leaf_slots_duplicates_remove_hint_fails() { let mut builder = TestBuilder::new(); @@ -119,7 +119,7 @@ mod tests { builder.execute() } - #[test(should_fail_with="hinted slots are not sorted")] + #[test(should_fail_with = "hinted slots are not sorted")] fn validate_unique_leaf_slots_duplicates_extra_hint_fails() { let mut builder = TestBuilder::new(); @@ -131,7 +131,7 @@ mod tests { builder.execute() } - #[test(should_fail_with="hinted slots are not sorted")] + #[test(should_fail_with = "hinted slots are not sorted")] fn validate_unique_leaf_slots_duplicates_extra_hint_in_padded_first_zero_fails() { let mut builder = TestBuilder::new(); @@ -143,7 +143,7 @@ mod tests { builder.execute() } - #[test(should_fail_with="mismatch hinted slot")] + #[test(should_fail_with = "mismatch hinted slot")] fn validate_unique_leaf_slots_duplicates_extra_hint_in_padded_first_non_zero_fails() { let mut builder = TestBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_app_logic.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_app_logic.nr index 4bcb3ad9d9d..25daec75bcc 100644 --- a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_app_logic.nr +++ b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_app_logic.nr @@ -148,7 +148,7 @@ mod tests { builder.succeeded(); } - #[test(should_fail_with="Cannot run unnecessary app logic circuit")] + #[test(should_fail_with = "Cannot run unnecessary app logic circuit")] fn public_previous_kernel_private_previous_kernel_should_fail() { let mut builder = PublicKernelAppLogicCircuitPrivateInputsBuilder::new(); builder.previous_kernel = FixtureBuilder::new().in_vk_tree(PUBLIC_KERNEL_APP_LOGIC_INDEX); @@ -303,7 +303,7 @@ mod tests { ); } - #[test(should_fail_with="No contract storage update requests are allowed for static calls")] + #[test(should_fail_with = "No contract storage update requests are allowed for static calls")] fn previous_public_kernel_fails_if_contract_storage_update_requests_on_static_call() { let mut builder = PublicKernelAppLogicCircuitPrivateInputsBuilder::new(); builder.public_call.is_static_call = true; @@ -312,7 +312,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="curent contract address must not match storage contract address for delegate calls")] + #[test(should_fail_with = "curent contract address must not match storage contract address for delegate calls")] fn previous_public_kernel_fails_if_incorrect_storage_contract_on_delegate_call() { let mut builder = PublicKernelAppLogicCircuitPrivateInputsBuilder::new().is_delegate_call(); @@ -321,7 +321,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="note_hashes must be empty for static calls")] + #[test(should_fail_with = "note_hashes must be empty for static calls")] fn public_kernel_fails_creating_note_hashes_on_static_call() { let mut builder = PublicKernelAppLogicCircuitPrivateInputsBuilder::new(); builder.public_call.is_static_call = true; @@ -330,7 +330,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="nullifiers must be empty for static calls")] + #[test(should_fail_with = "nullifiers must be empty for static calls")] fn public_kernel_fails_creating_nullifiers_on_static_call() { let mut builder = PublicKernelAppLogicCircuitPrivateInputsBuilder::new(); builder.public_call.is_static_call = true; @@ -339,7 +339,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="call stack item does not match item at the top of the call stack")] + #[test(should_fail_with = "call stack item does not match item at the top of the call stack")] fn public_kernel_circuit_fails_on_incorrect_storage_contract_in_delegate_call() { let mut builder = PublicKernelAppLogicCircuitPrivateInputsBuilder::new().is_delegate_call(); @@ -368,7 +368,7 @@ mod tests { ); } - #[test(should_fail_with="Cannot run app logic circuit before setup circuit")] + #[test(should_fail_with = "Cannot run app logic circuit before setup circuit")] fn previous_kernel_non_empty_non_revertible_public_call_requests_should_fail() { let mut builder = PublicKernelAppLogicCircuitPrivateInputsBuilder::new(); @@ -413,7 +413,7 @@ mod tests { assert_eq(output.end_non_revertible.gas_used, Gas::new(0, 0)); } - #[test(should_fail_with="Start gas for public phase does not match transaction gas left")] + #[test(should_fail_with = "Start gas for public phase does not match transaction gas left")] fn validates_start_gas() { let mut builder = PublicKernelAppLogicCircuitPrivateInputsBuilder::new(); @@ -423,7 +423,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Transaction fee must be zero on setup and app phases")] + #[test(should_fail_with = "Transaction fee must be zero on setup and app phases")] fn validates_transaction_fee() { let mut builder = PublicKernelAppLogicCircuitPrivateInputsBuilder::new(); @@ -443,7 +443,7 @@ mod tests { assert_eq(public_inputs.constants.global_variables.block_number, 11); } - #[test(should_fail_with="Global variables injected into the public call do not match constants")] + #[test(should_fail_with = "Global variables injected into the public call do not match constants")] fn validates_global_variables() { let mut builder = PublicKernelAppLogicCircuitPrivateInputsBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_setup.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_setup.nr index 04a1fdbe9da..753079969e5 100644 --- a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_setup.nr +++ b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_setup.nr @@ -143,7 +143,7 @@ mod tests { } } - #[test(should_fail_with="Bytecode hash cannot be zero")] + #[test(should_fail_with = "Bytecode hash cannot be zero")] fn no_bytecode_hash_should_fail() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); builder.public_call.bytecode_hash = 0; @@ -151,7 +151,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Contract address cannot be zero")] + #[test(should_fail_with = "Contract address cannot be zero")] fn contract_address_must_be_valid() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); @@ -161,7 +161,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Function signature cannot be zero")] + #[test(should_fail_with = "Function signature cannot be zero")] fn function_selector_must_be_valid() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); builder.public_call.function_data.selector = FunctionSelector::zero(); @@ -169,7 +169,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Cannot execute a private function with the public kernel circuit")] + #[test(should_fail_with = "Cannot execute a private function with the public kernel circuit")] fn private_call_should_fail() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); builder.public_call.function_data.is_private = true; @@ -177,7 +177,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="call stack item does not match item at the top of the call stack")] + #[test(should_fail_with = "call stack item does not match item at the top of the call stack")] fn inconsistent_call_request_item_should_fail() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); @@ -188,7 +188,7 @@ mod tests { builder.failed_with_call_request_item(item); } - #[test(should_fail_with="call stack item does not match item at the top of the call stack")] + #[test(should_fail_with = "call stack item does not match item at the top of the call stack")] fn incorrect_msg_sender_fails_for_regular_calls() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); @@ -199,7 +199,7 @@ mod tests { builder.failed_with_call_request_item(item); } - #[test(should_fail_with="call stack storage address does not match expected contract address")] + #[test(should_fail_with = "call stack storage address does not match expected contract address")] fn incorrect_storage_contract_address_fails_for_regular_calls() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); @@ -215,7 +215,7 @@ mod tests { builder.succeeded(); } - #[test(should_fail_with="call stack item does not match item at the top of the call stack")] + #[test(should_fail_with = "call stack item does not match item at the top of the call stack")] fn incorrect_msg_sender_for_delegate_calls_fails() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new().is_delegate_call(); @@ -226,7 +226,7 @@ mod tests { builder.failed_with_call_request_item(item); } - #[test(should_fail_with="curent contract address must not match storage contract address for delegate calls")] + #[test(should_fail_with = "curent contract address must not match storage contract address for delegate calls")] fn previous_private_kernel_fails_if_incorrect_storage_contract_on_delegate_call() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new().is_delegate_call(); @@ -248,7 +248,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="incorrect storage_contract_address for delegate call request")] + #[test(should_fail_with = "incorrect storage_contract_address for delegate call request")] fn incorrect_call_context_for_delegate_call_request_fails() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); @@ -302,7 +302,7 @@ mod tests { ); } - #[test(should_fail_with="Cannot run unnecessary setup circuit")] + #[test(should_fail_with = "Cannot run unnecessary setup circuit")] fn previous_kernel_empty_public_call_stack_should_fail() { let builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); let previous_kernel = builder.previous_kernel.to_public_kernel_data(false); @@ -311,7 +311,7 @@ mod tests { let _ = kernel.execute(); } - #[test(should_fail_with="No contract storage update requests are allowed for static calls")] + #[test(should_fail_with = "No contract storage update requests are allowed for static calls")] fn previous_private_kernel_fails_if_contract_storage_update_requests_on_static_call() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); builder.public_call.is_static_call = true; @@ -373,7 +373,7 @@ mod tests { assert_array_eq(end_requests, [request_0, request_1]); } - #[test(should_fail_with="Public call cannot be reverted")] + #[test(should_fail_with = "Public call cannot be reverted")] fn fails_if_public_call_reverted() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); builder.public_call.revert_code = 1; @@ -406,7 +406,7 @@ mod tests { assert_eq(output.end.gas_used, Gas::new(100, 100)); } - #[test(should_fail_with="Start gas for public phase does not match transaction gas left")] + #[test(should_fail_with = "Start gas for public phase does not match transaction gas left")] fn validates_start_gas() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); @@ -416,7 +416,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Transaction fee must be zero on setup and app phases")] + #[test(should_fail_with = "Transaction fee must be zero on setup and app phases")] fn validates_transaction_fee() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); @@ -436,7 +436,7 @@ mod tests { assert_eq(public_inputs.constants.global_variables.block_number, 11); } - #[test(should_fail_with="Global variables injected into the public call do not match constants")] + #[test(should_fail_with = "Global variables injected into the public call do not match constants")] fn validates_global_variables() { let mut builder = PublicKernelSetupCircuitPrivateInputsBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_tail.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_tail.nr index 6dc88bee1c0..1c12f1c414e 100644 --- a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_tail.nr +++ b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_tail.nr @@ -443,7 +443,7 @@ mod tests { builder.succeeded(); } - #[test(should_fail_with="Value of the nullifier does not match read request")] + #[test(should_fail_with = "Value of the nullifier does not match read request")] unconstrained fn pending_nullifier_read_request_wrong_hint_fails() { let mut builder = PublicKernelTailCircuitPrivateInputsBuilder::new(); @@ -456,7 +456,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Read request counter must be greater than the counter of the nullifier")] + #[test(should_fail_with = "Read request counter must be greater than the counter of the nullifier")] unconstrained fn pending_nullifier_read_request_reads_before_value_fails() { let mut builder = PublicKernelTailCircuitPrivateInputsBuilder::new(); @@ -485,7 +485,7 @@ mod tests { builder.succeeded(); } - #[test(should_fail_with="Value exists in pending set")] + #[test(should_fail_with = "Value exists in pending set")] unconstrained fn nullifier_non_existent_read_request_failed_read_exist() { let mut builder = PublicKernelTailCircuitPrivateInputsBuilder::new().with_nullifier_tree(); @@ -540,7 +540,7 @@ mod tests { ); } - #[test(should_fail_with="value in OverridablePublicDataTreeLeaf does not match read request")] + #[test(should_fail_with = "value in OverridablePublicDataTreeLeaf does not match read request")] unconstrained fn reading_uninitialized_public_data_non_zero_value_fails() { let mut builder = PublicKernelTailCircuitPrivateInputsBuilder::new().with_public_data_tree(); diff --git a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_teardown.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_teardown.nr index 23150b26090..5cda012b135 100644 --- a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_teardown.nr +++ b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_teardown.nr @@ -113,7 +113,7 @@ mod tests { } } - #[test(should_fail_with="Bytecode hash cannot be zero")] + #[test(should_fail_with = "Bytecode hash cannot be zero")] fn no_bytecode_hash_should_fail() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); builder.public_call.bytecode_hash = 0; @@ -121,7 +121,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Contract address cannot be zero")] + #[test(should_fail_with = "Contract address cannot be zero")] fn contract_address_must_be_valid() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); @@ -131,7 +131,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Function signature cannot be zero")] + #[test(should_fail_with = "Function signature cannot be zero")] fn function_selector_must_be_valid() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); builder.public_call.function_data.selector = FunctionSelector::zero(); @@ -139,7 +139,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Cannot execute a private function with the public kernel circuit")] + #[test(should_fail_with = "Cannot execute a private function with the public kernel circuit")] fn private_call_should_fail() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); builder.public_call.function_data.is_private = true; @@ -147,7 +147,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="call stack item does not match item at the top of the call stack")] + #[test(should_fail_with = "call stack item does not match item at the top of the call stack")] fn inconsistent_call_request_item_should_fail() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); @@ -158,7 +158,7 @@ mod tests { builder.failed_with_call_request_item(item); } - #[test(should_fail_with="call stack item does not match item at the top of the call stack")] + #[test(should_fail_with = "call stack item does not match item at the top of the call stack")] fn incorrect_msg_sender_fails_for_regular_calls() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); @@ -169,7 +169,7 @@ mod tests { builder.failed_with_call_request_item(item); } - #[test(should_fail_with="call stack storage address does not match expected contract address")] + #[test(should_fail_with = "call stack storage address does not match expected contract address")] fn incorrect_storage_contract_address_fails_for_regular_calls() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); @@ -185,7 +185,7 @@ mod tests { builder.succeeded(); } - #[test(should_fail_with="call stack item does not match item at the top of the call stack")] + #[test(should_fail_with = "call stack item does not match item at the top of the call stack")] fn incorrect_msg_sender_for_delegate_calls_fails() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new().is_delegate_call(); @@ -196,7 +196,7 @@ mod tests { builder.failed_with_call_request_item(item); } - #[test(should_fail_with="call stack item does not match item at the top of the call stack")] + #[test(should_fail_with = "call stack item does not match item at the top of the call stack")] fn public_kernel_circuit_fails_on_incorrect_storage_contract_in_delegate_call() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new().is_delegate_call(); @@ -207,7 +207,7 @@ mod tests { builder.failed_with_call_request_item(item); } - #[test(should_fail_with="curent contract address must not match storage contract address for delegate calls")] + #[test(should_fail_with = "curent contract address must not match storage contract address for delegate calls")] fn previous_private_kernel_fails_if_incorrect_storage_contract_on_delegate_call() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new().is_delegate_call(); @@ -216,7 +216,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="incorrect storage_contract_address for call request")] + #[test(should_fail_with = "incorrect storage_contract_address for call request")] fn incorrect_storage_contract_address_for_call_request_fails() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); @@ -229,7 +229,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="incorrect storage_contract_address for delegate call request")] + #[test(should_fail_with = "incorrect storage_contract_address for delegate call request")] fn incorrect_call_context_for_delegate_call_request_fails() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); @@ -248,7 +248,7 @@ mod tests { builder.succeeded(); } - #[test(should_fail_with="Cannot run unnecessary teardown circuit")] + #[test(should_fail_with = "Cannot run unnecessary teardown circuit")] fn private_previous_kernel_non_empty_private_call_stack_should_fail() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); @@ -261,7 +261,7 @@ mod tests { let _ = kernel.execute(); } - #[test(should_fail_with="No contract storage update requests are allowed for static calls")] + #[test(should_fail_with = "No contract storage update requests are allowed for static calls")] fn previous_private_kernel_fails_if_contract_storage_update_requests_on_static_call() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); builder.public_call.is_static_call = true; @@ -299,7 +299,7 @@ mod tests { ); } - #[test(should_fail_with="Start gas for teardown phase does not match teardown gas allocation")] + #[test(should_fail_with = "Start gas for teardown phase does not match teardown gas allocation")] fn validates_start_gas() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); @@ -309,7 +309,7 @@ mod tests { builder.failed(); } - #[test(should_fail_with="Transaction fee on teardown phase does not match expected value")] + #[test(should_fail_with = "Transaction fee on teardown phase does not match expected value")] fn validates_transaction_fee() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); builder.public_call.transaction_fee = 1234; @@ -328,7 +328,7 @@ mod tests { assert_eq(public_inputs.constants.global_variables.block_number, 11); } - #[test(should_fail_with="Global variables injected into the public call do not match constants")] + #[test(should_fail_with = "Global variables injected into the public call do not match constants")] fn validates_global_variables() { let mut builder = PublicKernelTeardownCircuitPrivateInputsBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/note_hash_read_request_reset.nr b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/note_hash_read_request_reset.nr index 928e4693eea..131470c6431 100644 --- a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/note_hash_read_request_reset.nr +++ b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/note_hash_read_request_reset.nr @@ -202,7 +202,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Value of the note hash does not match read request")] + #[test(should_fail_with = "Value of the note hash does not match read request")] fn verify_reset_note_hash_read_requests_wrong_hinted_value_fails() { let mut builder = TestBuilder::new(); @@ -212,7 +212,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Contract address of the note hash does not match read request")] + #[test(should_fail_with = "Contract address of the note hash does not match read request")] fn verify_reset_note_hash_read_requests_different_contract_addresses_fails() { let mut builder = TestBuilder::new(); @@ -221,7 +221,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Read request counter must be greater than the counter of the note hash")] + #[test(should_fail_with = "Read request counter must be greater than the counter of the note hash")] fn verify_reset_note_hash_read_requests_invalid_counter_fails() { let mut builder = TestBuilder::new(); @@ -233,7 +233,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Value of the note hash leaf does not match read request")] + #[test(should_fail_with = "Value of the note hash leaf does not match read request")] fn verify_reset_note_hash_read_requests_invalid_leaf_fails() { let mut builder = TestBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/nullifier_read_request_reset.nr b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/nullifier_read_request_reset.nr index c9f780d05b5..61648d95a5c 100644 --- a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/nullifier_read_request_reset.nr +++ b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/nullifier_read_request_reset.nr @@ -194,7 +194,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Value of the nullifier does not match read request")] + #[test(should_fail_with = "Value of the nullifier does not match read request")] fn verify_reset_nullifier_read_requests_wrong_hinted_value() { let mut builder = TestBuilder::new(); @@ -204,7 +204,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Contract address of the nullifier does not match read request")] + #[test(should_fail_with = "Contract address of the nullifier does not match read request")] fn verify_reset_nullifier_read_requests_different_contract_addresses_fails() { let mut builder = TestBuilder::new(); @@ -213,7 +213,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Read request counter must be greater than the counter of the nullifier")] + #[test(should_fail_with = "Read request counter must be greater than the counter of the nullifier")] fn verify_reset_nullifier_read_requests_invalid_counter() { let mut builder = TestBuilder::new(); @@ -225,7 +225,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Value of the nullifier leaf does not match read request")] + #[test(should_fail_with = "Value of the nullifier leaf does not match read request")] fn verify_reset_nullifier_read_requests_invalid_leaf() { let mut builder = TestBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/mutable_data_read_request.nr b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/mutable_data_read_request.nr index 6c953eb0d61..a88f33b5de3 100644 --- a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/mutable_data_read_request.nr +++ b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/mutable_data_read_request.nr @@ -285,7 +285,7 @@ mod tests { builder.validate_pending_read_requests(); } - #[test(should_fail_with="Read request counter must be less than the counter of the next data write")] + #[test(should_fail_with = "Read request counter must be less than the counter of the next data write")] fn reset_pending_reads_overriden_value_fails() { let mut builder = TestBuilder::new(); @@ -308,7 +308,7 @@ mod tests { builder.validate_pending_read_requests(); } - #[test(should_fail_with="leaf_slot in OverridablePublicDataWrite does not match read request")] + #[test(should_fail_with = "leaf_slot in OverridablePublicDataWrite does not match read request")] fn reset_pending_reads_wrong_slot_fails() { let mut builder = TestBuilder::new(); @@ -318,7 +318,7 @@ mod tests { builder.validate_pending_read_requests(); } - #[test(should_fail_with="value in OverridablePublicDataWrite does not match read request")] + #[test(should_fail_with = "value in OverridablePublicDataWrite does not match read request")] fn reset_pending_reads_wrong_value_fails() { let mut builder = TestBuilder::new(); @@ -328,7 +328,7 @@ mod tests { builder.validate_pending_read_requests(); } - #[test(should_fail_with="Read request counter must be greater than the counter of the data write")] + #[test(should_fail_with = "Read request counter must be greater than the counter of the data write")] fn reset_pending_reads_value_write_after_fails() { let mut builder = TestBuilder::new(); @@ -360,7 +360,7 @@ mod tests { builder.validate_leaf_data_read_requests(); } - #[test(should_fail_with="Hinted leaf is overridden before the read request")] + #[test(should_fail_with = "Hinted leaf is overridden before the read request")] fn reset_leaf_data_reads_overriden_value_fails() { let mut builder = TestBuilder::new(); @@ -383,7 +383,7 @@ mod tests { builder.validate_leaf_data_read_requests(); } - #[test(should_fail_with=""leaf_index in TestLeafData does not match")] + #[test(should_fail_with = "leaf_index in TestLeafData does not match")] fn reset_leaf_reads_wrong_slot_fails() { let mut builder = TestBuilder::new(); @@ -393,7 +393,7 @@ mod tests { builder.validate_leaf_data_read_requests(); } - #[test(should_fail_with=""value in TestLeafData does not match")] + #[test(should_fail_with = "value in TestLeafData does not match")] fn reset_leaf_reads_wrong_value_fails() { let mut builder = TestBuilder::new(); @@ -415,7 +415,7 @@ mod tests { builder.ensure_all_read_requests_are_verified(); } - #[test(should_fail_with="Hinted pending read request does not match status")] + #[test(should_fail_with = "Hinted pending read request does not match status")] fn ensure_all_read_requests_are_verified_wrong_pending_hint_index_fails() { let mut builder = TestBuilder::new(); @@ -425,7 +425,7 @@ mod tests { builder.ensure_all_read_requests_are_verified(); } - #[test(should_fail_with="Hinted settled read request does not match status")] + #[test(should_fail_with = "Hinted settled read request does not match status")] fn ensure_all_read_requests_are_verified_wrong_leaf_hint_index_fails() { let mut builder = TestBuilder::new(); @@ -435,7 +435,7 @@ mod tests { builder.ensure_all_read_requests_are_verified(); } - #[test(should_fail_with="Hinted settled read request does not match status")] + #[test(should_fail_with = "Hinted settled read request does not match status")] fn ensure_all_read_requests_are_verified_wrong_status_fails() { let mut builder = TestBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/non_existent_read_request.nr b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/non_existent_read_request.nr index 9735a8f517c..c080f8d910a 100644 --- a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/non_existent_read_request.nr +++ b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/non_existent_read_request.nr @@ -256,7 +256,7 @@ mod tests { ); } - #[test(should_fail_with="Low leaf does not exist")] + #[test(should_fail_with = "Low leaf does not exist")] fn test_reset_non_existent_read_requests_invalid_preimage_failed() { let read_requests = [ReadRequest { value: 10, counter: 50 }.scope(AztecAddress::zero())]; let (non_membership_hints, root) = get_non_membership_hints([3]); @@ -272,7 +272,7 @@ mod tests { ); } - #[test(should_fail_with="Key is not greater than the low leaf")] + #[test(should_fail_with = "Key is not greater than the low leaf")] fn test_reset_non_existent_read_requests_read_settled_failed() { let read_requests = [ReadRequest { value: 10, counter: 50 }.scope(AztecAddress::zero())]; let (non_membership_hints, root) = get_non_membership_hints([3]); @@ -286,7 +286,7 @@ mod tests { ); } - #[test(should_fail_with="Key is not less than the next leaf")] + #[test(should_fail_with = "Key is not less than the next leaf")] fn test_reset_non_existent_read_requests_invalid_non_membership_hint_failed() { let read_requests = [ReadRequest { value: 10, counter: 50 }.scope(AztecAddress::zero())]; let (non_membership_hints, root) = get_non_membership_hints([0]); @@ -300,7 +300,7 @@ mod tests { ); } - #[test(should_fail_with="Value exists in pending set")] + #[test(should_fail_with = "Value exists in pending set")] fn test_reset_non_existent_read_requests_read_pending_value_failed() { let read_requests = [ReadRequest { value: 25, counter: 50 }.scope(AztecAddress::zero())]; let (non_membership_hints, root) = get_non_membership_hints([1]); @@ -314,7 +314,7 @@ mod tests { ); } - #[test(should_fail_with="Invalid next pending value index")] + #[test(should_fail_with = "Invalid next pending value index")] fn test_reset_non_existent_read_requests_wrong_next_pending_index_failed() { let read_requests = [ReadRequest { value: 21, counter: 50 }.scope(AztecAddress::zero())]; let (non_membership_hints, root) = get_non_membership_hints([1]); @@ -328,7 +328,7 @@ mod tests { ); } - #[test(should_fail_with="Invalid next pending value index")] + #[test(should_fail_with = "Invalid next pending value index")] fn test_reset_non_existent_read_requests_wrong_max_next_pending_index_failed() { let read_requests = [ReadRequest { value: 21, counter: 50 }.scope(AztecAddress::zero())]; let (non_membership_hints, root) = get_non_membership_hints([1]); @@ -342,7 +342,7 @@ mod tests { ); } - #[test(should_fail_with="Next pending value index out of bounds")] + #[test(should_fail_with = "Next pending value index out of bounds")] fn test_reset_non_existent_read_requests_overflown_index_failed() { let read_requests = [ReadRequest { value: 21, counter: 50 }.scope(AztecAddress::zero())]; let (non_membership_hints, root) = get_non_membership_hints([1]); diff --git a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/read_request.nr b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/read_request.nr index 270fad3dd32..788ff80b66e 100644 --- a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/read_request.nr +++ b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/read_request.nr @@ -423,7 +423,6 @@ mod tests { /** * validate_pending_read_requests */ - #[test] fn validate_pending_read_requests_succeeds() { let builder = TestBuilder::new(); @@ -439,7 +438,7 @@ mod tests { builder.validate_pending_read_requests(); } - #[test(should_fail_with="Hinted test value does not match")] + #[test(should_fail_with = "Hinted test value does not match")] fn validate_pending_read_requests_wrong_hint_fails() { let mut builder = TestBuilder::new(); @@ -448,7 +447,7 @@ mod tests { builder.validate_pending_read_requests(); } - #[test(should_fail_with="Hinted test value does not match")] + #[test(should_fail_with = "Hinted test value does not match")] fn validate_pending_read_requests_wrong_hint_after_nada_fails() { let mut builder = TestBuilder::new(); @@ -461,7 +460,6 @@ mod tests { /** * validate_settled_read_requests */ - #[test] fn validate_settled_read_requests_succeeds() { let builder = TestBuilder::new(); @@ -478,7 +476,7 @@ mod tests { builder.validate_settled_read_requests_with_hints(settled_hints, tree_root); } - #[test(should_fail_with="membership check failed")] + #[test(should_fail_with = "membership check failed")] fn validate_settled_read_requests_wrong_leaf_index_fails() { let mut builder = TestBuilder::new(); @@ -488,7 +486,7 @@ mod tests { builder.validate_settled_read_requests_with_hints(settled_hints, tree_root); } - #[test(should_fail_with="Provided leaf preimage is not for target value")] + #[test(should_fail_with = "Provided leaf preimage is not for target value")] fn validate_settled_read_requests_wrong_preimage_value_fails() { let mut builder = TestBuilder::new(); @@ -498,7 +496,7 @@ mod tests { builder.validate_settled_read_requests_with_hints(settled_hints, tree_root); } - #[test(should_fail_with="membership check failed")] + #[test(should_fail_with = "membership check failed")] fn validate_settled_read_requests_wrong_path_after_nada_fails() { let mut builder = TestBuilder::new(); @@ -512,7 +510,6 @@ mod tests { /** * verify_reset_read_requests */ - #[test] fn verify_read_requests_clears_all_succeeds() { let builder = TestBuilder::new(); @@ -548,7 +545,7 @@ mod tests { builder.verify_with_settled_hints(settled_hints); } - #[test(should_fail_with="Hinted pending read request does not match status")] + #[test(should_fail_with = "Hinted pending read request does not match status")] fn verify_reset_read_requests_wrong_pending_read_status_fails() { let mut builder = TestBuilder::new(); @@ -557,7 +554,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Hinted settled read request does not match status")] + #[test(should_fail_with = "Hinted settled read request does not match status")] fn verify_reset_read_requests_wrong_settled_read_status_fails() { let mut builder = TestBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/transient_data.nr b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/transient_data.nr index 0fe0c0dbdad..c02447fc6f8 100644 --- a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/transient_data.nr +++ b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/reset/transient_data.nr @@ -439,7 +439,7 @@ mod tests { TestDataBuilder::new_identical_note_hashes().verify(); } - #[test(should_fail_with="Invalid transient data index hint")] + #[test(should_fail_with = "Invalid transient data index hint")] fn fails_non_nada_index_hint() { let mut builder = TestDataBuilder::new_clear_all(); @@ -450,7 +450,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Value of the hinted transient note hash does not match")] + #[test(should_fail_with = "Value of the hinted transient note hash does not match")] fn fails_mismatch_note_hash_value() { let mut builder = TestDataBuilder::new_clear_all(); @@ -459,7 +459,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Contract address of the hinted transient note hash does not match")] + #[test(should_fail_with = "Contract address of the hinted transient note hash does not match")] fn fails_mismatch_contract_address() { let mut builder = TestDataBuilder::new_clear_all(); @@ -468,7 +468,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Cannot nullify a note hash created afterwards")] + #[test(should_fail_with = "Cannot nullify a note hash created afterwards")] fn fails_nullify_note_hash_emitted_afterwards() { let mut builder = TestDataBuilder::new(); @@ -480,7 +480,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Cannot squash a non-revertible note hash with a revertible nullifier")] + #[test(should_fail_with = "Cannot squash a non-revertible note hash with a revertible nullifier")] fn fails_nullify_non_revertible_note_hash_with_revertible_nullifier() { let mut builder = TestDataBuilder::new(); @@ -492,7 +492,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Propagated note hash does not match")] + #[test(should_fail_with = "Propagated note hash does not match")] fn fails_wrong_expected_note_hash_value() { let mut builder = TestDataBuilder::new(); @@ -501,7 +501,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Propagated note hash does not match")] + #[test(should_fail_with = "Propagated note hash does not match")] fn fails_wrong_expected_note_hash_counter() { let mut builder = TestDataBuilder::new(); @@ -510,7 +510,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Wrong squashed note hash hint")] + #[test(should_fail_with = "Wrong squashed note hash hint")] fn fails_wrong_note_hash_squashed_hint() { let mut builder = TestDataBuilder::new_clear_all(); @@ -520,7 +520,7 @@ mod tests { builder.verify_with_hint_indexes(squashed_note_hash_hints, squashed_nullifier_hints); } - #[test(should_fail_with="Empty note hash must be padded to the right")] + #[test(should_fail_with = "Empty note hash must be padded to the right")] fn fails_unexpected_note_hash_value() { let mut builder = TestDataBuilder::new_clear_all(); @@ -529,7 +529,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Wrong squashed note hash hint")] + #[test(should_fail_with = "Wrong squashed note hash hint")] fn fails_propagate_note_hash_for_squashed_nullifier() { let mut builder = TestDataBuilder::new_clear_all(); @@ -543,7 +543,7 @@ mod tests { builder.verify_with_hint_indexes(squashed_note_hash_hints, squashed_nullifier_hints); } - #[test(should_fail_with="Empty note hash must be padded to the right")] + #[test(should_fail_with = "Empty note hash must be padded to the right")] fn fails_identical_note_hashes_nullify_same_note_hash() { let mut builder = TestDataBuilder::new_identical_note_hashes(); @@ -561,7 +561,7 @@ mod tests { builder.verify_with_hint_indexes(squashed_note_hash_hints, squashed_nullifier_hints); } - #[test(should_fail_with="Wrong number of note hashes removed")] + #[test(should_fail_with = "Wrong number of note hashes removed")] fn fails_note_hash_not_propagated() { let mut builder = TestDataBuilder::new(); @@ -576,7 +576,7 @@ mod tests { builder.verify_with_hint_indexes(squashed_note_hash_hints, squashed_nullifier_hints); } - #[test(should_fail_with="Propagated nullifier does not match")] + #[test(should_fail_with = "Propagated nullifier does not match")] fn fails_wrong_expected_nullifier_value() { let mut builder = TestDataBuilder::new(); @@ -585,7 +585,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Propagated nullifier does not match")] + #[test(should_fail_with = "Propagated nullifier does not match")] fn fails_wrong_expected_nullifier_counter() { let mut builder = TestDataBuilder::new(); @@ -594,7 +594,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Wrong squashed nullifier hint")] + #[test(should_fail_with = "Wrong squashed nullifier hint")] fn fails_wrong_nullifier_hint_index() { let mut builder = TestDataBuilder::new_clear_all(); @@ -608,7 +608,7 @@ mod tests { builder.verify_with_hint_indexes(squashed_note_hash_hints, squashed_nullifier_hints); } - #[test(should_fail_with="Empty nullifier must be padded to the right")] + #[test(should_fail_with = "Empty nullifier must be padded to the right")] fn fails_unexpected_nullifier_value() { let mut builder = TestDataBuilder::new_clear_all(); @@ -617,7 +617,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Wrong number of nullifiers removed")] + #[test(should_fail_with = "Wrong number of nullifiers removed")] fn fails_propagate_nullifier_for_squashed_note_hash() { let mut builder = TestDataBuilder::new(); @@ -631,7 +631,7 @@ mod tests { builder.verify_with_hint_indexes(squashed_note_hash_hints, squashed_nullifier_hints); } - #[test(should_fail_with="Empty log must be padded to the right")] + #[test(should_fail_with = "Empty log must be padded to the right")] fn fails_unexpected_log_value() { let mut builder = TestDataBuilder::new_clear_all(); @@ -640,7 +640,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Propagated note log does not match")] + #[test(should_fail_with = "Propagated note log does not match")] fn fails_wrong_expected_log_value() { let mut builder = TestDataBuilder::new(); @@ -649,7 +649,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Propagated note log does not match")] + #[test(should_fail_with = "Propagated note log does not match")] fn fails_wrong_expected_log_counter() { let mut builder = TestDataBuilder::new(); @@ -658,7 +658,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Value of the hinted transient note hash does not match log")] + #[test(should_fail_with = "Value of the hinted transient note hash does not match log")] fn fails_log_not_nullified() { let mut builder = TestDataBuilder::new(); @@ -667,7 +667,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Value of the hinted transient note hash does not match log")] + #[test(should_fail_with = "Value of the hinted transient note hash does not match log")] fn fails_wrong_log_note_hash() { let mut builder = TestDataBuilder::new(); @@ -676,7 +676,7 @@ mod tests { builder.verify(); } - #[test(should_fail_with="Empty log must be padded to the right")] + #[test(should_fail_with = "Empty log must be padded to the right")] fn fails_propagate_too_many_logs() { let mut builder = TestDataBuilder::new_clear_all(); diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr index ce963e76bc8..fb79171a0bd 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr @@ -1364,7 +1364,7 @@ mod tests { assert_eq(outputs.end.public_data_tree.root, expected_public_data_tree.get_root()); } - #[test(should_fail_with="Not enough balance for fee payer to pay for transaction")] + #[test(should_fail_with = "Not enough balance for fee payer to pay for transaction")] unconstrained fn fails_to_update_fee_payer_balance_if_not_enough_funds() { let fee_payer = AztecAddress::from_field(0x1234); let balance_slot = compute_fee_payer_fee_juice_balance_leaf_slot(fee_payer); @@ -1395,7 +1395,7 @@ mod tests { builder.fails(); } - #[test(should_fail_with="Wrong leaf slot for Fee Juice balance read hint")] + #[test(should_fail_with = "Wrong leaf slot for Fee Juice balance read hint")] unconstrained fn fails_to_update_fee_payer_balance_if_wrong_read_hint() { let fee_payer = AztecAddress::from_field(0x1234); let balance_slot = compute_fee_payer_fee_juice_balance_leaf_slot(fee_payer); diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/block_merge/block_merge_rollup_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/block_merge/block_merge_rollup_inputs.nr index cd8215c1e09..feeabca76ce 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/block_merge/block_merge_rollup_inputs.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/block_merge/block_merge_rollup_inputs.nr @@ -72,21 +72,21 @@ mod tests { use dep::types::{hash::accumulate_sha256}; use dep::types::constants::{BLOCK_ROOT_ROLLUP_INDEX, BLOCK_MERGE_ROLLUP_INDEX}; - #[test(should_fail_with="input blocks have different chain id")] + #[test(should_fail_with = "input blocks have different chain id")] fn constants_different_chain_id_fails() { let mut inputs = default_block_merge_rollup_inputs(); inputs.previous_rollup_data[0].block_root_or_block_merge_public_inputs.end_global_variables.chain_id = 1; let _output = inputs.block_merge_rollup_circuit(); } - #[test(should_fail_with="input blocks have different chain version")] + #[test(should_fail_with = "input blocks have different chain version")] fn constants_different_ver_fails() { let mut inputs = default_block_merge_rollup_inputs(); inputs.previous_rollup_data[0].block_root_or_block_merge_public_inputs.end_global_variables.version = 1; let _output = inputs.block_merge_rollup_circuit(); } - #[test(should_fail_with="input blocks have different archive tree snapshots")] + #[test(should_fail_with = "input blocks have different archive tree snapshots")] fn previous_rollups_dont_follow_archive() { let mut inputs = default_block_merge_rollup_inputs(); inputs.previous_rollup_data[0].block_root_or_block_merge_public_inputs.new_archive.root = 0; @@ -94,7 +94,7 @@ mod tests { let _output = inputs.block_merge_rollup_circuit(); } - #[test(should_fail_with="input block hashes do not follow on from each other")] + #[test(should_fail_with = "input block hashes do not follow on from each other")] fn previous_rollups_dont_follow_block_hash() { let mut inputs = default_block_merge_rollup_inputs(); inputs.previous_rollup_data[0].block_root_or_block_merge_public_inputs.end_block_hash = 0; @@ -102,7 +102,7 @@ mod tests { let _output = inputs.block_merge_rollup_circuit(); } - #[test(should_fail_with="input block numbers do not follow on from each other")] + #[test(should_fail_with = "input block numbers do not follow on from each other")] fn previous_rollups_dont_follow_block_number() { let mut inputs = default_block_merge_rollup_inputs(); inputs.previous_rollup_data[0].block_root_or_block_merge_public_inputs.end_global_variables.block_number = 2; diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/merge/merge_rollup_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/merge/merge_rollup_inputs.nr index ee10a70d852..22176413ec4 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/merge/merge_rollup_inputs.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/merge/merge_rollup_inputs.nr @@ -68,7 +68,7 @@ mod tests { use dep::types::hash::accumulate_sha256; use dep::types::constants::{MERGE_ROLLUP_INDEX, BASE_ROLLUP_INDEX}; - #[test(should_fail_with="The rollup should be filled greedily from L to R, but received a L base and R merge")] + #[test(should_fail_with = "The rollup should be filled greedily from L to R, but received a L base and R merge")] fn different_rollup_type_fails() { let mut inputs = default_merge_rollup_inputs(); inputs.previous_rollup_data[0].base_or_merge_rollup_public_inputs.rollup_type = 0; @@ -76,7 +76,7 @@ mod tests { let _output = inputs.merge_rollup_circuit(); } - #[test(should_fail_with="input proofs have different constants")] + #[test(should_fail_with = "input proofs have different constants")] fn constants_different_chain_id_fails() { let mut inputs = default_merge_rollup_inputs(); inputs.previous_rollup_data[0].base_or_merge_rollup_public_inputs.constants.global_variables.chain_id = 1; @@ -84,7 +84,7 @@ mod tests { let _output = inputs.merge_rollup_circuit(); } - #[test(should_fail_with="input proofs have different note hash tree snapshots")] + #[test(should_fail_with = "input proofs have different note hash tree snapshots")] fn previous_rollups_dont_follow_note_hash() { let mut inputs = default_merge_rollup_inputs(); inputs.previous_rollup_data[0].base_or_merge_rollup_public_inputs.end.note_hash_tree.root = 0; @@ -92,7 +92,7 @@ mod tests { let _output = inputs.merge_rollup_circuit(); } - #[test(should_fail_with="input proofs have different nullifier tree snapshots")] + #[test(should_fail_with = "input proofs have different nullifier tree snapshots")] fn previous_rollups_dont_follow_nullifier() { let mut inputs = default_merge_rollup_inputs(); inputs.previous_rollup_data[0].base_or_merge_rollup_public_inputs.end.nullifier_tree.root = 0; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/indexed_tree/check_valid_low_leaf.nr b/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/indexed_tree/check_valid_low_leaf.nr index 01b4136bded..2f7b252064f 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/indexed_tree/check_valid_low_leaf.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/indexed_tree/check_valid_low_leaf.nr @@ -55,21 +55,21 @@ mod tests { assert_check_valid_low_leaf(key, leaf); } - #[test(should_fail_with="Key is not greater than the low leaf")] + #[test(should_fail_with = "Key is not greater than the low leaf")] fn test_assert_check_valid_low_leaf_failed_wrong_low_leaf() { let key = 12; let leaf = TestLeafPreimage { value: 13, next_value: 15 }; assert_check_valid_low_leaf(key, leaf); } - #[test(should_fail_with="Key is not greater than the low leaf")] + #[test(should_fail_with = "Key is not greater than the low leaf")] fn test_assert_check_valid_low_leaf_failed_is_low_leaf() { let key = 12; let leaf = TestLeafPreimage { value: 12, next_value: 15 }; assert_check_valid_low_leaf(key, leaf); } - #[test(should_fail_with="Key is not less than the next leaf")] + #[test(should_fail_with = "Key is not less than the next leaf")] fn test_assert_check_valid_low_leaf_failed_wrong_next_key() { let key = 12; let leaf = TestLeafPreimage { value: 9, next_value: 11 }; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/membership.nr b/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/membership.nr index 4dea95699f1..80aa98c04a6 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/membership.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/membership.nr @@ -203,7 +203,7 @@ mod tests { assert_eq(check_membership_at_index(2, leaf_preimages[0].as_leaf()), false); } - #[test(should_fail_with="membership check failed")] + #[test(should_fail_with = "membership check failed")] fn test_assert_check_membership_failed_wrong_leaf() { assert_check_membership_at_index(0, leaf_preimages[1].as_leaf()); } @@ -222,7 +222,7 @@ mod tests { assert_eq(res, false); } - #[test(should_fail_with="membership check failed")] + #[test(should_fail_with = "membership check failed")] fn test_assert_check_membership_false_wrong_root() { let tree = build_tree(); let tree_root = 56; @@ -245,17 +245,17 @@ mod tests { assert_check_non_membership_at_index(1, 45); } - #[test(should_fail_with="Key is not greater than the low leaf")] + #[test(should_fail_with = "Key is not greater than the low leaf")] fn test_assert_check_non_membership_failed_wrong_low_leaf() { assert_check_non_membership_at_index(3, 25); } - #[test(should_fail_with="Key is not less than the next leaf")] + #[test(should_fail_with = "Key is not less than the next leaf")] fn test_assert_check_non_membership_failed_wrong_next_key() { assert_check_non_membership_at_index(2, 25); } - #[test(should_fail_with="Low leaf does not exist")] + #[test(should_fail_with = "Low leaf does not exist")] fn test_assert_check_non_membership_failed_invalid_leaf() { let tree = build_tree(); let tree_root = tree.get_root(); @@ -279,22 +279,22 @@ mod tests { conditionally_assert_check_membership_at_index(false, 1, leaf_preimages[1].get_key() + 1); } - #[test(should_fail_with="Key does not match the key of the leaf preimage")] + #[test(should_fail_with = "Key does not match the key of the leaf preimage")] fn test_conditionally_assert_check_membership_exists_value_mismatch() { conditionally_assert_check_membership_at_index(true, 1, leaf_preimages[1].get_key() + 1); } - #[test(should_fail_with="Key is not greater than the low leaf")] + #[test(should_fail_with = "Key is not greater than the low leaf")] fn test_conditionally_assert_check_membership_failed_not_exists_wrong_low_leaf() { conditionally_assert_check_membership_at_index(false, 3, 25); } - #[test(should_fail_with="Key is not less than the next leaf")] + #[test(should_fail_with = "Key is not less than the next leaf")] fn test_conditionally_assert_check_membership_failed_not_exists_wrong_next_key() { conditionally_assert_check_membership_at_index(false, 2, 25); } - #[test(should_fail_with="membership check failed")] + #[test(should_fail_with = "membership check failed")] fn test_conditionally_assert_check_membership_failed_exists_invalid_leaf() { let tree = build_tree(); let tree_root = tree.get_root(); @@ -309,7 +309,7 @@ mod tests { ); } - #[test(should_fail_with="membership check failed")] + #[test(should_fail_with = "membership check failed")] fn test_conditionally_assert_check_membership_failed_not_exists_invalid_leaf() { let tree = build_tree(); let tree_root = tree.get_root(); diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_array.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_array.nr index 90079131ab6..209a7a749c9 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_array.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_array.nr @@ -107,7 +107,7 @@ mod tests { builder.check_and_execute(); } - #[test(should_fail_with="hinted item in the commbined array does not match")] + #[test(should_fail_with = "hinted item in the commbined array does not match")] fn assert_combined_array_extra_item_fails() { let mut builder = TestBuilder::new(); @@ -117,7 +117,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="hinted item in the commbined array does not match")] + #[test(should_fail_with = "hinted item in the commbined array does not match")] fn assert_combined_array_missing_item_fails() { let mut builder = TestBuilder::new(); @@ -127,7 +127,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="hinted item in the commbined array does not match")] + #[test(should_fail_with = "hinted item in the commbined array does not match")] fn assert_combined_array_unordered_fails() { let mut builder = TestBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_sorted_transformed_value_array.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_sorted_transformed_value_array.nr index 89d8c9c3094..dcfbff7070e 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_sorted_transformed_value_array.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_sorted_transformed_value_array.nr @@ -256,7 +256,7 @@ mod tests { builder.check_and_execute(); } - #[test(should_fail_with="incorrect transformed value")] + #[test(should_fail_with = "incorrect transformed value")] fn assert_combined_sorted_transformed_value_array_asc_mismatch_value_fails() { let mut builder = TestDataBuilder::new(); @@ -266,7 +266,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="incorrect transformed value")] + #[test(should_fail_with = "incorrect transformed value")] fn assert_combined_sorted_transformed_value_array_asc_cross_boundary_fails() { let mut builder = TestDataBuilder::new(); @@ -275,7 +275,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="items with a counter of 0 should be prepended")] + #[test(should_fail_with = "items with a counter of 0 should be prepended")] fn assert_combined_sorted_transformed_value_array_asc_unordered_prepended_fails() { let mut builder = TestDataBuilder::new(); @@ -285,7 +285,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="items with a counter of 0 should be prepended")] + #[test(should_fail_with = "items with a counter of 0 should be prepended")] fn assert_combined_sorted_transformed_value_array_asc_mixed_prepended_fails() { let mut builder = TestDataBuilder::new(); @@ -295,7 +295,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="value array must be sorted by counter in ascending order")] + #[test(should_fail_with = "value array must be sorted by counter in ascending order")] fn assert_combined_sorted_transformed_value_array_asc_unordered_fails() { let mut builder = TestDataBuilder::new(); @@ -305,7 +305,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="mismatch counter")] + #[test(should_fail_with = "mismatch counter")] fn assert_combined_sorted_transformed_value_array_asc_unordered_values_with_ordered_counters_fails() { let mut builder = TestDataBuilder::new(); @@ -319,7 +319,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="array must be padded with empty items")] + #[test(should_fail_with = "array must be padded with empty items")] fn assert_combined_sorted_transformed_value_array_asc_extra_non_empty_fails() { let mut builder = TestDataBuilder::new(); @@ -330,7 +330,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="value array must be sorted by counter in ascending order")] + #[test(should_fail_with = "value array must be sorted by counter in ascending order")] fn assert_combined_sorted_transformed_value_array_asc_extra_empty_fails() { let mut builder = TestDataBuilder::new(); @@ -341,7 +341,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="value array must be sorted by counter in ascending order")] + #[test(should_fail_with = "value array must be sorted by counter in ascending order")] fn assert_combined_sorted_transformed_value_array_asc_duplicate_fails() { let mut builder = TestDataBuilder::new(); @@ -352,7 +352,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="items with a counter of 0 should be prepended")] + #[test(should_fail_with = "items with a counter of 0 should be prepended")] fn assert_combined_sorted_transformed_value_array_asc_duplicate_zero_counter_fails() { let mut builder = TestDataBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_transformed_array.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_transformed_array.nr index bd81809c9b9..85489ae3f18 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_transformed_array.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_combined_transformed_array.nr @@ -130,7 +130,7 @@ mod tests { builder.check_and_execute(); } - #[test(should_fail_with="hinted item in the commbined array does not match")] + #[test(should_fail_with = "hinted item in the commbined array does not match")] fn assert_combined_transformed_array_extra_item_fails() { let mut builder = TestBuilder::new(); @@ -140,7 +140,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="hinted item in the commbined array does not match")] + #[test(should_fail_with = "hinted item in the commbined array does not match")] fn assert_combined_transformed_array_missing_item_fails() { let mut builder = TestBuilder::new(); @@ -150,7 +150,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="hinted item in the commbined array does not match")] + #[test(should_fail_with = "hinted item in the commbined array does not match")] fn assert_combined_transformed_array_unordered_fails() { let mut builder = TestBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_deduped_array.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_deduped_array.nr index 86db1994d58..078d9e9985f 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_deduped_array.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_deduped_array.nr @@ -137,7 +137,7 @@ mod tests { builder.check_and_execute(); } - #[test(should_fail_with="mismatch deduped item")] + #[test(should_fail_with = "mismatch deduped item")] fn assert_deduped_array_extra_item_fails() { let mut builder = TestBuilder::new(); @@ -146,7 +146,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="empty items must be padded to the deduped array")] + #[test(should_fail_with = "empty items must be padded to the deduped array")] fn assert_deduped_array_extra_item_at_end_fails() { let mut builder = TestBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_exposed_sorted_transformed_value_array.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_exposed_sorted_transformed_value_array.nr index 4a4929c6bf4..72b320cedf6 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_exposed_sorted_transformed_value_array.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_exposed_sorted_transformed_value_array.nr @@ -96,7 +96,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="incorrect transformed value")] + #[test(should_fail_with = "incorrect transformed value")] fn assert_exposed_sorted_transformed_value_array_mismatch_value_fails() { let mut builder = TestDataBuilder::new(); @@ -106,7 +106,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="value array must be sorted by counter in ascending order")] + #[test(should_fail_with = "value array must be sorted by counter in ascending order")] fn assert_exposed_sorted_transformed_value_array_unordered_fails() { let mut builder = TestDataBuilder::new(); @@ -131,7 +131,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="incorrect hinted counter")] + #[test(should_fail_with = "incorrect hinted counter")] fn assert_exposed_sorted_transformed_value_array_unordered_values_with_ordered_counters_fails() { let mut builder = TestDataBuilder::new(); @@ -151,7 +151,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="array must be padded with empty items")] + #[test(should_fail_with = "array must be padded with empty items")] fn assert_exposed_sorted_transformed_value_array_extra_non_empty_fails() { let mut builder = TestDataBuilder::new(); @@ -161,7 +161,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="array must be padded with empty items")] + #[test(should_fail_with = "array must be padded with empty items")] fn assert_exposed_sorted_transformed_value_array_hint_to_extra_non_empty_fails() { let mut builder = TestDataBuilder::new(); @@ -173,7 +173,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="incorrect transformed value")] + #[test(should_fail_with = "incorrect transformed value")] fn assert_exposed_sorted_transformed_value_array_missing_item_fails() { let mut builder = TestDataBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_sorted_array.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_sorted_array.nr index 3699e9e113a..61f07521842 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_sorted_array.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_sorted_array.nr @@ -51,7 +51,7 @@ mod tests { assert_sorted_array(original, sorted, indexes, |a: Field, b: Field| a.lt(b)); } - #[test(should_fail_with="Values not sorted")] + #[test(should_fail_with = "Values not sorted")] fn assert_sorted_array_custom_wrong_ordering_fails() { let original = [30, 20, 90, 50, 0, 0]; let sorted = [20, 30, 90, 50, 0, 0]; @@ -59,7 +59,7 @@ mod tests { assert_sorted_array(original, sorted, indexes, |a: Field, b: Field| a.lt(b)); } - #[test(should_fail_with="Values not sorted")] + #[test(should_fail_with = "Values not sorted")] fn assert_sorted_array_custom_misplaced_sorted_fails() { let original = [30, 20, 90, 50, 0, 0]; let sorted = [20, 30, 50, 0, 0, 90]; @@ -67,7 +67,7 @@ mod tests { assert_sorted_array(original, sorted, indexes, |a: Field, b: Field| a.lt(b)); } - #[test(should_fail_with="Invalid index")] + #[test(should_fail_with = "Invalid index")] fn assert_sorted_array_custom_wrong_index_fails() { let original = [30, 20, 90, 50, 0, 0]; let sorted = [20, 30, 50, 90, 0, 0]; @@ -75,7 +75,7 @@ mod tests { assert_sorted_array(original, sorted, indexes, |a: Field, b: Field| a.lt(b)); } - #[test(should_fail_with="Empty values must be padded to the right")] + #[test(should_fail_with = "Empty values must be padded to the right")] fn assert_sorted_array_custom_not_padded_fails() { let original = [30, 20, 90, 0, 50, 0]; let sorted = [20, 30, 90, 0, 0, 0]; @@ -83,7 +83,7 @@ mod tests { assert_sorted_array(original, sorted, indexes, |a: Field, b: Field| a.lt(b)); } - #[test(should_fail_with="Empty values must not be mixed with sorted values")] + #[test(should_fail_with = "Empty values must not be mixed with sorted values")] fn assert_sorted_array_custom_mixed_empty_fails() { let original = [30, 20, 90, 0, 0, 0]; let sorted = [20, 30, 90, 0, 0, 10]; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_sorted_transformed_value_array.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_sorted_transformed_value_array.nr index a8be9895087..39a7ec4576b 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_sorted_transformed_value_array.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_sorted_transformed_value_array.nr @@ -114,7 +114,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="incorrect transformed value")] + #[test(should_fail_with = "incorrect transformed value")] fn assert_sorted_transformed_value_array_mismatch_value_fails() { let mut builder = TestDataBuilder::new(); @@ -124,7 +124,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="value array must be sorted by counter in ascending order")] + #[test(should_fail_with = "value array must be sorted by counter in ascending order")] fn assert_sorted_transformed_value_array_unordered_fails() { let mut builder = TestDataBuilder::new(); @@ -144,7 +144,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="incorrect transformed value")] + #[test(should_fail_with = "incorrect transformed value")] fn assert_sorted_transformed_value_array_extra_non_empty_fails() { let mut builder = TestDataBuilder::new(); @@ -154,7 +154,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="unexpected non-empty item")] + #[test(should_fail_with = "unexpected non-empty item")] fn assert_sorted_transformed_value_array_hint_to_extra_non_empty_fails() { let mut builder = TestDataBuilder::new(); @@ -166,7 +166,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="incorrect transformed value")] + #[test(should_fail_with = "incorrect transformed value")] fn assert_sorted_transformed_value_array_missing_item_fails() { let mut builder = TestDataBuilder::new(); @@ -182,13 +182,13 @@ mod tests { builder.execute_capped(5); } - #[test(should_fail_with="capped_size does not cover all non-empty items")] + #[test(should_fail_with = "capped_size does not cover all non-empty items")] fn assert_sorted_transformed_value_array_capped_size_not_fully_covered_fails() { let builder = TestDataBuilder::new(); builder.execute_capped(3); } - #[test(should_fail_with="array must be padded with empty items")] + #[test(should_fail_with = "array must be padded with empty items")] fn assert_sorted_transformed_value_array_capped_size_extra_non_empty_fails() { let mut builder = TestDataBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_split_sorted_transformed_value_arrays.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_split_sorted_transformed_value_arrays.nr index 1e87d8f539e..038c51cc493 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_split_sorted_transformed_value_arrays.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_split_sorted_transformed_value_arrays.nr @@ -276,7 +276,6 @@ mod tests { /** * asc */ - #[test] fn assert_split_sorted_transformed_value_array_asc_succeeds() { let builder = TestDataBuilder::new(); @@ -292,7 +291,6 @@ mod tests { /** * desc */ - #[test] fn assert_split_sorted_transformed_value_array_desc_succeeds() { let builder = TestDataBuilder::new_desc(); @@ -302,8 +300,7 @@ mod tests { /** * Failed cases. */ - - #[test(should_fail_with="mismatch number of values lt")] + #[test(should_fail_with = "mismatch number of values lt")] fn assert_split_sorted_transformed_value_array_asc_empty_extra_item_fails() { let mut builder = TestDataBuilder::empty(); @@ -312,7 +309,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="mismatch sorted values")] + #[test(should_fail_with = "mismatch sorted values")] fn assert_split_sorted_transformed_value_array_asc_lt_wrong_sorted_value_fails() { let mut builder = TestDataBuilder::new(); @@ -321,7 +318,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="mismatch sorted values")] + #[test(should_fail_with = "mismatch sorted values")] fn assert_split_sorted_transformed_value_array_asc_gte_wrong_sorted_value_fails() { let mut builder = TestDataBuilder::new(); @@ -333,7 +330,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="value array must be sorted by counter")] + #[test(should_fail_with = "value array must be sorted by counter")] fn assert_split_sorted_transformed_value_array_asc_gte_wrong_sorted_order_fails() { let mut builder = TestDataBuilder::new(); @@ -349,7 +346,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="mismatch counters")] + #[test(should_fail_with = "mismatch counters")] fn assert_split_sorted_transformed_value_array_asc_gte_wrong_counter_fails() { let mut builder = TestDataBuilder::new(); @@ -363,7 +360,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="mismatch sorted values")] + #[test(should_fail_with = "mismatch sorted values")] fn assert_split_sorted_transformed_value_array_asc_misplace_lt_to_gte_fails() { let mut builder = TestDataBuilder::new(); @@ -377,7 +374,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="mismatch number of values lt")] + #[test(should_fail_with = "mismatch number of values lt")] fn assert_split_sorted_transformed_value_array_asc_duplicate_lt_to_gte_fails() { let mut builder = TestDataBuilder::new(); @@ -388,7 +385,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="mismatch number of values gte")] + #[test(should_fail_with = "mismatch number of values gte")] fn assert_split_sorted_transformed_value_array_asc_gte_duplicate_items_fails() { let mut builder = TestDataBuilder::new(); @@ -399,7 +396,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="value array must be sorted by counter")] + #[test(should_fail_with = "value array must be sorted by counter")] fn assert_split_sorted_transformed_value_array_asc_multiple_zero_counter_items_fails() { let mut builder = TestDataBuilder::new(); @@ -410,7 +407,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="counters must not be the same")] + #[test(should_fail_with = "counters must not be the same")] fn assert_split_sorted_transformed_value_array_desc_multiple_zero_counter_items_fails() { let mut builder = TestDataBuilder::new_desc(); @@ -421,7 +418,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="value array must be sorted by counter")] + #[test(should_fail_with = "value array must be sorted by counter")] fn assert_split_sorted_transformed_value_array_asc_lt_empty_item_at_index_0_fails() { let mut builder = TestDataBuilder::new(); @@ -442,7 +439,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="invalid array")] + #[test(should_fail_with = "invalid array")] fn assert_split_sorted_transformed_value_array_asc_gte_empty_item_at_index_0_fails() { let mut builder = TestDataBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_split_transformed_value_arrays.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_split_transformed_value_arrays.nr index 28c3b0062ff..eb5418a644f 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_split_transformed_value_arrays.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays/assert_split_transformed_value_arrays.nr @@ -160,19 +160,19 @@ mod tests { builder.execute(); } - #[test(should_fail_with="counter of first revertible item is not greater than or equal to the split counter")] + #[test(should_fail_with = "counter of first revertible item is not greater than or equal to the split counter")] fn assert_split_transformed_value_arrays_num_non_revertible_too_small_fails() { let builder = TestBuilder::new(); builder.execute_with_num_non_revertibles(2); } - #[test(should_fail_with="counter of last non-revertible item is not less than the split counter")] + #[test(should_fail_with = "counter of last non-revertible item is not less than the split counter")] fn assert_split_transformed_value_arrays_num_non_revertible_too_big_fails() { let mut builder = TestBuilder::new(); builder.execute_with_num_non_revertibles(4); } - #[test(should_fail_with="invalid transformed value")] + #[test(should_fail_with = "invalid transformed value")] fn assert_split_transformed_value_arrays_wrong_transformed_value_in_lt_fails() { let mut builder = TestBuilder::new(); @@ -181,7 +181,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="invalid transformed value")] + #[test(should_fail_with = "invalid transformed value")] fn assert_split_transformed_value_arrays_wrong_transformed_value_in_gte_fails() { let mut builder = TestBuilder::new(); @@ -190,7 +190,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="array should be padded with empty items")] + #[test(should_fail_with = "array should be padded with empty items")] fn assert_split_transformed_value_arrays_extra_non_empty_item_in_lt_fails() { let mut builder = TestBuilder::new(); @@ -199,7 +199,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="array should be padded with empty items")] + #[test(should_fail_with = "array should be padded with empty items")] fn assert_split_transformed_value_arrays_extra_non_empty_item_in_gte_fails() { let mut builder = TestBuilder::new(); @@ -208,7 +208,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="array should be padded with empty items")] + #[test(should_fail_with = "array should be padded with empty items")] fn assert_split_transformed_value_arrays_end_with_non_empty_item_in_lt_fails() { let mut builder = TestBuilder::new(); @@ -217,7 +217,7 @@ mod tests { builder.execute(); } - #[test(should_fail_with="array should be padded with empty items")] + #[test(should_fail_with = "array should be padded with empty items")] fn assert_split_transformed_value_arrays_end_with_non_empty_item_in_gte_fails() { let mut builder = TestBuilder::new();