flyingmutant / rapid

Rapid is a modern Go property-based testing library
https://pkg.go.dev/pgregory.net/rapid
Mozilla Public License 2.0
588 stars 25 forks source link

statemachine cleanup method argument #34

Closed meridional closed 1 year ago

meridional commented 2 years ago

Right now, statemachine's cleanup method is of type func() instead of func(*testing.T).

It might be too late to change the function signature, but it might be worth to support both?

One use case is that we can use Init to test the "constructors" of a data structure, and use Cleanup to test the "destructors".

flyingmutant commented 2 years ago

Did you mean Cleanup(t *rapid.T)? Can you please tell a bit more about the test you want to construct?

flyingmutant commented 1 year ago

Related: #49.