-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more tests for assert_equal_point
#726
Conversation
Finish up for issue #721: - Move test to the ecc tests - Add entry in changelog
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #726 +/- ##
==========================================
- Coverage 85.10% 85.07% -0.04%
==========================================
Files 47 47
Lines 3860 3879 +19
==========================================
+ Hits 3285 3300 +15
- Misses 575 579 +4
Continue to review full report at Codecov.
|
@@ -304,3 +304,202 @@ fn mul_point_works() { | |||
.expect_err("circuit is not satisfied"); | |||
} | |||
} | |||
|
|||
#[test] | |||
fn assert_equal_point_works() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest having only one circuit that executes the assertation, and the function is called with two points as arguments. Then, compute each variant in each test and call that circuit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm actually just doing these changes! Was a bit too quick setting the PR as done, sorry!
tests/ecc.rs
Outdated
let w_p2 = composer.append_point(self.point); | ||
composer.assert_equal_point(w_p1, w_p2); | ||
|
||
// test: 42 * generator = 42 * generator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally, I'd prefer to hardcode one of the points and compute the other one. But that's a nit.
1e26499
to
8690aa9
Compare
Resolves #725