Fix some mistakes in the documentation.
* Fix the indentation in the example for I.Fail() (replace spaces with tabs).
* Fix some spelling mistakes (fimilar, around)
* Fix a call to is.OK that should point to is.True instead.
mikolaj holysz
5 years ago
106 | 106 | // |
107 | 107 | // func Test(t *testing.T) { |
108 | 108 | // is := is.New(t) |
109 | // is.Fail() // TODO: write this test | |
109 | // is.Fail() // TODO: write this test | |
110 | 110 | // } |
111 | 111 | // |
112 | 112 | // In relaxed mode, execution will continue after a call to |
167 | 167 | } |
168 | 168 | |
169 | 169 | // New is a method wrapper around the New function. |
170 | // It allows you to write subtests using a fimilar | |
170 | // It allows you to write subtests using a similar | |
171 | 171 | // pattern: |
172 | 172 | // |
173 | 173 | // func Test(t *testing.T) { |
181 | 181 | return New(t) |
182 | 182 | } |
183 | 183 | |
184 | // NewRelaxed is a method wrapper aorund the NewRelaxed | |
185 | // method. It allows you to write subtests using a fimilar | |
184 | // NewRelaxed is a method wrapper around the NewRelaxed | |
185 | // method. It allows you to write subtests using a similar | |
186 | 186 | // pattern: |
187 | 187 | // |
188 | 188 | // func Test(t *testing.T) { |
209 | 209 | // is := is.New(t) |
210 | 210 | // val, err := getVal() |
211 | 211 | // is.NoErr(err) // getVal error |
212 | // is.OK(len(val) > 10) // val cannot be short | |
212 | // is.True(len(val) > 10) // val cannot be short | |
213 | 213 | // } |
214 | 214 | // |
215 | 215 | // Will output: |