LEFT | RIGHT |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package main | 5 package main |
6 | 6 |
7 import ( | 7 import ( |
8 "bytes" | 8 "bytes" |
9 "fmt" | 9 "fmt" |
10 "go/ast" | 10 "go/ast" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 Verbose output: log all tests as they are run. | 87 Verbose output: log all tests as they are run. |
88 | 88 |
89 -test.run pattern | 89 -test.run pattern |
90 Run only those tests and examples matching the regular | 90 Run only those tests and examples matching the regular |
91 expression. | 91 expression. |
92 | 92 |
93 -test.bench pattern | 93 -test.bench pattern |
94 Run benchmarks matching the regular expression. | 94 Run benchmarks matching the regular expression. |
95 By default, no benchmarks run. | 95 By default, no benchmarks run. |
96 | 96 |
| 97 -test.benchmem |
| 98 Print memory allocation statistics for benchmarks. |
| 99 |
97 -test.cpuprofile cpu.out | 100 -test.cpuprofile cpu.out |
98 Write a CPU profile to the specified file before exiting. | 101 Write a CPU profile to the specified file before exiting. |
99 | 102 |
100 -test.memprofile mem.out | 103 -test.memprofile mem.out |
101 Write a memory profile to the specified file when all tests | 104 Write a memory profile to the specified file when all tests |
102 are complete. | 105 are complete. |
103 | 106 |
104 -test.memprofilerate n | 107 -test.memprofilerate n |
105 Enable more precise (and expensive) memory profiles by setting | 108 Enable more precise (and expensive) memory profiles by setting |
106 runtime.MemProfileRate. See 'godoc runtime MemProfileRate'. | 109 runtime.MemProfileRate. See 'godoc runtime MemProfileRate'. |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 } | 843 } |
841 } | 844 } |
842 return matchRe.MatchString(str), nil | 845 return matchRe.MatchString(str), nil |
843 } | 846 } |
844 | 847 |
845 func main() { | 848 func main() { |
846 testing.Main(matchString, tests, benchmarks, examples) | 849 testing.Main(matchString, tests, benchmarks, examples) |
847 } | 850 } |
848 | 851 |
849 `)) | 852 `)) |
LEFT | RIGHT |