Skip to content

Commit

Permalink
Run 1.19 go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingmutant committed Aug 24, 2022
1 parent d0db0ef commit ff836af
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
17 changes: 8 additions & 9 deletions engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,17 @@ func Check(t *testing.T, prop func(*T)) {
// MakeCheck is a convenience function for defining subtests suitable for
// (*testing.T).Run. It allows you to write this:
//
// t.Run("subtest name", rapid.MakeCheck(func(t *rapid.T) {
// // test code
// }))
// t.Run("subtest name", rapid.MakeCheck(func(t *rapid.T) {
// // test code
// }))
//
// instead of this:
//
// t.Run("subtest name", func(t *testing.T) {
// rapid.Check(t, func(t *rapid.T) {
// // test code
// })
// })
//
// t.Run("subtest name", func(t *testing.T) {
// rapid.Check(t, func(t *rapid.T) {
// // test code
// })
// })
func MakeCheck(prop func(*T)) func(*testing.T) {
return func(t *testing.T) {
t.Helper()
Expand Down
16 changes: 8 additions & 8 deletions statemachine.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ type StateMachine interface {
// State machine test is a pattern for testing stateful systems that looks
// like this:
//
// m := new(StateMachineType)
// m.Init(t) // optional
// defer m.Cleanup() // optional
// m.Check(t)
// for {
// m.RandomAction(t)
// m.Check(t)
// }
// m := new(StateMachineType)
// m.Init(t) // optional
// defer m.Cleanup() // optional
// m.Check(t)
// for {
// m.RandomAction(t)
// m.Check(t)
// }
//
// Run synthesizes such test from the type of m, which must be a pointer.
// Note that for each test case, new state machine instance is created
Expand Down

0 comments on commit ff836af

Please sign in to comment.