Skip to content
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 subtests to test.Assert #191

Merged
merged 10 commits into from
Dec 22, 2021
Merged

Add subtests to test.Assert #191

merged 10 commits into from
Dec 22, 2021

Conversation

ivokub
Copy link
Collaborator

@ivokub ivokub commented Dec 7, 2021

Added method Run(fn func(assert *test.Assert), descs ...string) to Assert type. This is similar to the Run method in Go's standard testing package to allow running subtests. Refactored tests in places to use subtests.

Removed explicit Fuzz call in integration tests as Fuzz is already called in Assert.ProverSucceeded.

An potential added benefit of using subtests is better coverage with race detector and enabling running subtests in parallel. I didn't implement it now though as Assert uses unsynchronized cache for compiled circuits.

@ivokub ivokub requested a review from gbotrel December 7, 2021 13:25
@ivokub ivokub self-assigned this Dec 7, 2021
circuitstats_test.go Outdated Show resolved Hide resolved
@ivokub ivokub force-pushed the assert-subtests branch 2 times, most recently from 5b657f9 to 0ade5c1 Compare December 9, 2021 10:12
@ivokub
Copy link
Collaborator Author

ivokub commented Dec 9, 2021

I went over again over the different range loops and initialized the iteration-local variables everywhere they were used locally.

@gbotrel gbotrel merged commit 52bacd3 into develop Dec 22, 2021
@gbotrel gbotrel deleted the assert-subtests branch December 22, 2021 22:09
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