File tree 1 file changed +5
-4
lines changed 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 18
18
// For more detail, run ``go help test'' and ``go help testflag''.
19
19
//
20
20
// A simple test function looks like this:
21
+ //
21
22
// func TestAbs(t *testing.T) {
22
23
// got := Abs(-1)
23
- // want := 1
24
- // if got != want {
25
- // t.Errorf("Abs(-1) returns %d, want %d", got, want)
24
+ // if got != 1 {
25
+ // t.Errorf("Abs(-1) = %d; want 1", got)
26
26
// }
27
27
// }
28
28
//
36
36
// For a description of the testing flags, see
37
37
// https://golang.org/cmd/go/#hdr-Testing_flags
38
38
//
39
- // A simple benchmark function looks like this:
39
+ // A sample benchmark function looks like this:
40
40
// func BenchmarkHello(b *testing.B) {
41
41
// for i := 0; i < b.N; i++ {
42
42
// fmt.Sprintf("hello")
136
136
//
137
137
// Tests or benchmarks may be skipped at run time with a call to
138
138
// the Skip method of *T or *B:
139
+ //
139
140
// func TestTimeConsuming(t *testing.T) {
140
141
// if testing.Short() {
141
142
// t.Skip("skipping test in short mode.")
You can’t perform that action at this time.
0 commit comments