LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 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 // +build darwin freebsd linux netbsd openbsd | 5 // +build darwin freebsd netbsd openbsd |
6 | 6 |
7 package net | 7 package net |
8 | 8 |
9 import ( | 9 import ( |
10 "testing" | 10 "testing" |
11 ) | 11 ) |
12 | 12 |
13 // Issue 3590. netFd.AddFD should return an error | 13 // Issue 3590. netFd.AddFD should return an error |
14 // from the underlying pollster rather than panicing. | 14 // from the underlying pollster rather than panicing. |
15 func TestAddFDReturnsError(t *testing.T) { | 15 func TestAddFDReturnsError(t *testing.T) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 if err, ok := err.Err.(*OpError); ok { | 52 if err, ok := err.Err.(*OpError); ok { |
53 // the err is sometimes wrapped by another OpError | 53 // the err is sometimes wrapped by another OpError |
54 if err.Op == "addfd" { | 54 if err.Op == "addfd" { |
55 return | 55 return |
56 } | 56 } |
57 } | 57 } |
58 } | 58 } |
59 t.Error(err) | 59 t.Error(err) |
60 } | 60 } |
LEFT | RIGHT |