LGTM On Fri, Feb 10, 2012 at 1:14 PM, <r@golang.org> wrote: > Reviewers: golang-dev_googlegroups.com, > ...
13 years, 4 months ago
(2012-02-10 02:48:35 UTC)
#2
LGTM
On Fri, Feb 10, 2012 at 1:14 PM, <r@golang.org> wrote:
> Reviewers: golang-dev_googlegroups.com,
>
> Message:
> Hello golang-dev@googlegroups.com,
>
> I'd like you to review this change to
> https://go.googlecode.com/hg/
>
>
> Description:
> testing: fix references to "gotest"
>
> Fixes issue 2958.
>
> Please review this at
http://codereview.appspot.com/**5650050/<http://codereview.appspot.com/5650050/>
>
> Affected files:
> M src/pkg/testing/benchmark.go
> M src/pkg/testing/testing.go
>
>
> Index: src/pkg/testing/benchmark.go
> ==============================**==============================**=======
> --- a/src/pkg/testing/benchmark.go
> +++ b/src/pkg/testing/benchmark.go
> @@ -16,7 +16,7 @@
> var benchTime = flag.Float64("test.benchtime", 1, "approximate run time
> for each benchmark, in seconds")
>
> // An internal type but exported because it is cross-package; part of the
> implementation
> -// of gotest.
> +// of the "go test" command.
> type InternalBenchmark struct {
> Name string
> F func(b *B)
> @@ -213,7 +213,7 @@
> }
>
> // An internal function but exported because it is cross-package; part of
> the implementation
> -// of gotest.
> +// of the "go test" command.
> func RunBenchmarks(matchString func(pat, str string) (bool, error),
> benchmarks []InternalBenchmark) {
> // If no flag was specified, don't run benchmarks.
> if len(*matchBenchmarks) == 0 {
> @@ -281,7 +281,7 @@
> }
>
> // Benchmark benchmarks a single function. Useful for creating
> -// custom benchmarks that do not use gotest.
> +// custom benchmarks that do not use the "go test" command.
> func Benchmark(f func(b *B)) BenchmarkResult {
> b := &B{
> common: common{
> Index: src/pkg/testing/testing.go
> ==============================**==============================**=======
> --- a/src/pkg/testing/testing.go
> +++ b/src/pkg/testing/testing.go
> @@ -12,8 +12,8 @@
> //
> // Functions of the form
> // func BenchmarkXxx(*testing.B)
> -// are considered benchmarks, and are executed by gotest when the
> -test.bench
> -// flag is provided.
> +// are considered benchmarks, and are executed by the "go test" command
> when
> +// the -test.bench flag is provided.
> //
> // A sample benchmark function looks like this:
> // func BenchmarkHello(b *testing.B) {
> @@ -81,7 +81,7 @@
> // The short flag requests that tests run more quickly, but its
> functionality
> // is provided by test writers themselves. The testing package is
> just its
> // home. The all.bash installation script sets it to make
> installation more
> - // efficient, but by default the flag is off so a plain "gotest"
> will do a
> + // efficient, but by default the flag is off so a plain "go test"
> will do a
> // full test of the package.
> short = flag.Bool("test.short", false, "run smaller test suite to
> save time")
>
> @@ -162,7 +162,7 @@
> func (c *common) Failed() bool { return c.failed }
>
> // FailNow marks the function as having failed and stops its execution.
> -// Execution will continue at the next Test.
> +// Execution will continue at the next test or benchmark.
> func (c *common) FailNow() {
> c.Fail()
>
> @@ -246,7 +246,7 @@
> }
>
> // An internal type but exported because it is cross-package; part of the
> implementation
> -// of gotest.
> +// of the "go test" command.
> type InternalTest struct {
> Name string
> F func(*T)
> @@ -275,7 +275,7 @@
> }
>
> // An internal function but exported because it is cross-package; part of
> the implementation
> -// of gotest.
> +// of the "go test" command.
> func Main(matchString func(pat, str string) (bool, error), tests
> []InternalTest, benchmarks []InternalBenchmark, examples []InternalExample)
> {
> flag.Parse()
> parseCpuList()
>
>
>
Issue 5650050: code review 5650050: testing: fix references to "gotest"
(Closed)
Created 13 years, 4 months ago by r
Modified 13 years, 4 months ago
Reviewers:
Base URL:
Comments: 0