-
Notifications
You must be signed in to change notification settings - Fork 162
Add unit tests for kzg, evals, composer, runtime and errors #858
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
base: stable-tool-chain-msrv
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR adds comprehensive unit test coverage for several core modules in the codebase, including KZG commitment schemes, evaluations, composer components, runtime, and error handling.
Changes:
- Added unit tests for runtime event handling and default initialization
- Added tests for FFT evaluations including serialization, interpolation, and arithmetic operations
- Added comprehensive error display and conversion tests
- Added tests for gate, witness, and ECC data structures
- Added KZG proof aggregation and commitment tests
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/runtime.rs | Tests runtime initialization and event handling without panicking |
| src/fft/evaluations.rs | Tests evaluations serialization, interpolation, arithmetic operations, and domain validation |
| src/error.rs | Tests error variant display formatting and conversions |
| src/composer/gate.rs | Tests gate structure traits (Copy, Clone, Eq, PartialEq, Debug) |
| src/composer/constraint_system/witness.rs | Tests witness constants, indexing, and WireData variants |
| src/composer/constraint_system/ecc.rs | Tests WitnessPoint and WnafRound structure accessors |
| src/commitment_scheme/kzg10/proof.rs | Tests aggregate proof flattening and linear combination logic |
| src/commitment_scheme/kzg10/commitment.rs | Tests commitment default initialization and conversion from projective coordinates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## stable-tool-chain-msrv #858 +/- ##
==========================================================
+ Coverage 85.18% 86.82% +1.64%
==========================================================
Files 57 57
Lines 3713 3849 +136
==========================================================
+ Hits 3163 3342 +179
+ Misses 550 507 -43
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
9b59831 to
07f0ea1
Compare
xevisalle
left a comment
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.
Some tests are OK. However, the ones that simply assert that an instantiation or copy is correct, I think they could be removed... It adds LoC and complexity. What do you think?
07f0ea1 to
7b842f3
Compare
I removed the tests you pointed out. It only dropped coverage by a very tiny amount, as most of the calls are covered by other tests. |
Resolves #862