mirror of
https://github.com/golang/go
synced 2024-11-17 10:34:49 -07:00
Revert "test: add regression test from #41474"
This reverts CL 263097. Reason for revert: broke the noopt builder. Change-Id: Ie36d2c3ed9449b4425732072db624c8e18f965f3 Reviewed-on: https://go-review.googlesource.com/c/go/+/263537 Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Alberto Donizetti <alb.donizetti@gmail.com>
This commit is contained in:
parent
53094ac844
commit
3853272573
@ -9,7 +9,6 @@ import (
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"internal/race"
|
||||
"internal/testenv"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
@ -2580,20 +2579,3 @@ func TestOpenFileKeepsPermissions(t *testing.T) {
|
||||
t.Errorf("Stat after OpenFile is %v, should be writable", fi.Mode())
|
||||
}
|
||||
}
|
||||
|
||||
// Issue 41474.
|
||||
func TestStdoutWriteDoesNotHeapAllocate(t *testing.T) {
|
||||
if runtime.GOOS == "js" || runtime.GOOS == "windows" {
|
||||
t.Skip("Still heap allocates on js/wasm and windows, but it used to too")
|
||||
}
|
||||
if race.Enabled {
|
||||
t.Skip("Heap allocates in race mode")
|
||||
}
|
||||
|
||||
n := testing.AllocsPerRun(10, func() {
|
||||
Stdout.Write([]byte{'h', 'e', 'l', 'l', 'o', '\n'})
|
||||
})
|
||||
if n != 0 {
|
||||
t.Errorf("AllocsPerRun = %v, want 0", n)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user