From ff836af2b002108a6b2aad9732767e1655f2734b Mon Sep 17 00:00:00 2001 From: Gregory Petrosyan Date: Wed, 24 Aug 2022 21:05:20 +0300 Subject: [PATCH] Run 1.19 go fmt --- engine.go | 17 ++++++++--------- statemachine.go | 16 ++++++++-------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/engine.go b/engine.go index 07e53fb..0cc0d4d 100644 --- a/engine.go +++ b/engine.go @@ -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() diff --git a/statemachine.go b/statemachine.go index 4bcb726..f8d7c21 100644 --- a/statemachine.go +++ b/statemachine.go @@ -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