Commit 26a85211 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder Committed by Brad Fitzpatrick

test: gofmt chan/*.go

These are functional tests, so it is safe to gofmt them.

Change-Id: I3067279c1d49809ac6a62054448ab8a6c3de9bda
Reviewed-on: https://go-review.googlesource.com/43623Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent a9bf3b2e
......@@ -54,4 +54,3 @@ func main() {
AsynchFifo()
SynchFifo()
}
......@@ -57,10 +57,10 @@ func main() {
_ = x
}
for _ = range cs {// ERROR "receive"
for _ = range cs { // ERROR "receive"
}
for range cs {// ERROR "receive"
for range cs { // ERROR "receive"
}
close(c)
......
This diff is collapsed.
This diff is collapsed.
......@@ -14,12 +14,10 @@ import "time"
const always = "function did not"
const never = "function did"
func unreachable() {
panic("control flow shouldn't reach here")
}
// Calls f and verifies that f always/never panics depending on signal.
func testPanic(signal string, f func()) {
defer func() {
......@@ -34,7 +32,6 @@ func testPanic(signal string, f func()) {
f()
}
// Calls f and empirically verifies that f always/never blocks depending on signal.
func testBlock(signal string, f func()) {
c := make(chan string)
......@@ -51,7 +48,6 @@ func testBlock(signal string, f func()) {
}
}
func main() {
const async = 1 // asynchronous channels
var nilch chan int
......@@ -114,8 +110,7 @@ func main() {
// empty selects always block
testBlock(always, func() {
select {
}
select {}
})
// selects with only nil channels always block
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment