mirror of
https://github.com/golang/go
synced 2024-10-05 16:41:21 -06:00
[dev.power64] reflect: fix test not to hang even if TrySend lies
LGTM=minux R=minux CC=golang-codereviews https://golang.org/cl/124360043
This commit is contained in:
parent
25d4d75376
commit
0bee7f3a17
@ -1052,6 +1052,11 @@ func TestChan(t *testing.T) {
|
||||
ok = cv.TrySend(ValueOf(6))
|
||||
if !ok {
|
||||
t.Errorf("TrySend on empty chan failed")
|
||||
select {
|
||||
case x := <-c:
|
||||
t.Errorf("TrySend failed but it did send %d", x)
|
||||
default:
|
||||
}
|
||||
} else {
|
||||
if i = <-c; i != 6 {
|
||||
t.Errorf("TrySend 6, recv %d", i)
|
||||
|
Loading…
Reference in New Issue
Block a user