gnark icon indicating copy to clipboard operation
gnark copied to clipboard

feat: add NoFuzzing() testing option

Open ivokub opened this issue 2 years ago • 4 comments

The new testing option allows to run assertions on test.Assert without fuzzing. My use case for running tests without fuzzing is in gadget where some errors panic to simplify the API.

Additionally, I was not sure if we should omit fuzzing when the tests are run in short mode? Should we?

ivokub avatar Mar 25 '22 14:03 ivokub

maybe it shouldn't be ran actually with "PRoverSucceeded" call. The point of this method is to test constraint system solver against the big.Int test engine -> if a witness fails/succeeds with one, it should with the others.

What about just calling that separately on our integration tests?

gbotrel avatar Mar 25 '22 18:03 gbotrel

Yup, removing fuzz testing in ProverSucceeded and then fuzzing separately in integration tests makes sense. On a similar note -- maybe also remove marshalling tests from ProverSucceeded and move them into a new method? And add assert.AllTests etc. method for doing marshalling, compiling/solving, fuzzing etc.

ivokub avatar Mar 25 '22 23:03 ivokub

(converted to draft until figuring what direction to take)

ivokub avatar Mar 25 '22 23:03 ivokub

@gbotrel, do you have suggestion what to do with this PR? Someone stumbled against a similar problem why this PR was created (#336).

ivokub avatar Jul 15 '22 11:07 ivokub