// health_test.gopackagehealthimport("log""testing")funcTestStregth(t*testing.T){varprevious=10t.Run("it should lift more weight than 'previous'",func(t*testing.T){weight:=previous+20ok,err:=liftKG(weight)iferr!=nil{log.Printf("couldn't lift %d KG",weight)t.FailNow()}ifok{log.Printf("lifted %d KG",weight)}})}funcTestSpeed(t*testing.T){varprevious=6t.Run("it should run faster than 'previous'",func(t*testing.T){speed:=previous+2ok,err:=runKPH(speed)iferr!=nil{log.Printf("couldn't run %d KPH",speed)t.FailNow()}ifok{log.Printf("ran %d KPH",speed)}})}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Treat it like
TDD
.Because uncle Petey always said...