Closed tsunrise closed 2 years ago
In some cases, lots of StandardComposer
internals will also have to be exposed for crates that write their own custom gates/gadgets. We should discuss how to do this safely.
After discussion with @tsunrise, we should just focus on the testing suite first; safe access to StandardComposer
isn't needed yet.
I propose the following design:
test
for testing suite (NB: This is not the same as cfg(test)
in Rust which is a special profile which is run during cargo test
. The test
feature is for library-exported content).test
which is feature-gated with the test
feature.gadget_tester
(with a better name) and batch_test!
. We should revisit the interfaces of these to make them as usable/general as possible.I agree with @bhgomes.
I see two ways here.
Why don't we start with a small feature-gated library in the main codebase and if we have more demand for complex testing we add a workspace crate with more stuff.
If no one has started implementing it yet, I can do it. Should I start drafting a PR?
If no one has started implementing it yet, I can do it. Should I start drafting a PR?
Of course!! Feel free to go for it!!
@tsunrise are you still planning to do this?
Oops, I thought this issue was closed yesterday. No, because I don't see any immediate need for that. I think check_satisfied
function is enough.
close this issue for now, although I'm happy to work on this if someone wants it 😃
I really like the
gadget_tester
inark-plonk
, which makes writing end-to-end tests much easier, but this gadget ispub(crate)
so user cannot access it...I believe many users will end up writing their own gadgets (for gadgets, I mean any function that includes
StandardComposer
as a parameter). Can we make the following public:gadget_tester
batch_test!
If there is any reason that prevents doing so, shall we have a good testing framework? Writing end-to-end tests for a gadget from scratch is a bit verbose.
Thanks!