Skip to content

Commit

Permalink
chore: fix should_fail_mismatch test to use correct pedersen return…
Browse files Browse the repository at this point in the history
… type (#3927)

# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

This PR updates the `should_fail_mismatch` test to use the correct
return type from the `pedersen_commitment` function. Previously the test
was failing due to this type error and not from the fact that the
assertion was failing.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: kevaundray <[email protected]>
  • Loading branch information
TomAFrench and kevaundray authored Jan 2, 2024
1 parent 467948f commit 664cbe3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ fn test_with_extra_space() {
// The assert message has a space
#[test(should_fail_with = "Not equal")]
fn test_runtime_mismatch() {
assert_eq(dep::std::hash::pedersen_commitment([27])[0], 0, "Not equal ");
// We use a pedersen commitment here so that the assertion failure is only known at runtime.
assert_eq(dep::std::hash::pedersen_commitment([27]).x, 0, "Not equal ");
}

0 comments on commit 664cbe3

Please sign in to comment.