Skip to content

Unit testing framework - #254

Open
karandeol-26 wants to merge 4 commits into
circify:masterfrom
clasp-research:unit-testing-framework
Open

karandeol-26 wants to merge 4 commits into
circify:masterfrom
clasp-research:unit-testing-framework

Conversation

@karandeol-26

Copy link
Copy Markdown

This draft PR adds a unit-testing framework for ZoKratesCurly using @test annotations. It lets users provide test inputs, check assertions, and run proof generation and verification with Groth16 or Mirage.

The branch includes the framework, tests, and examples.

Opening this as a draft for feedback on the approach and implementation.

@alex-ozdemir

Copy link
Copy Markdown
Contributor

Hi @karandeol-26 ,

Kelsey mentioned that you would be creating this PR. I'm excited about it. Let me know when it is ready for review.

Cheers,
Alex

@alex-ozdemir

Copy link
Copy Markdown
Contributor

Hi @karandeol-26 ,

Checking in on this. Is this still something that you're working on?

Cheers,
Alex

@karandeol-26

Copy link
Copy Markdown
Author

Hi @alex-ozdemir,

Yes, still working on it. Sorry for the silence, the semester got busier than I expected.

The implementation is done. What’s left is getting CI passing. I’ll have that done and mark this ready for review in a couple days.

Cheers,
Karan

@karandeol-26
karandeol-26 marked this pull request as ready for review October 29, 2026 23:39
@karandeol-26
karandeol-26 force-pushed the unit-testing-framework branch from 8cc05b0 to bc83e9f Compare October 29, 2026 23:40
@karandeol-26

Copy link
Copy Markdown
Author

Hi again @alex-ozdemir, this PR is ready for your review. I resolved the CI failure, and all checks are now passing. Apologies for the longer-than-expected turnaround, and thank you for your patience. I’d really appreciate your feedback when you have a chance.

@alex-ozdemir

Copy link
Copy Markdown
Contributor

Sounds good! I'll get you a review in the next week or two.

@alex-ozdemir alex-ozdemir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very nice PR. Just a few nits before merging.

Comment thread src/compile.rs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, this module is r1cs-specific, which its name does not suggest. I suggest renaming either the module or the functions within.

Comment thread src/test_runner/mod.rs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as for compile.rs.

Comment thread examples/README.md
proof backend, so a test passes only if the circuit is satisfiable for the given
inputs.

**Step 1: Write tests**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I would use ###. Same below.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants