()
| 12 | ) |
| 13 | |
| 14 | func timeout() chan int { |
| 15 | done := make(chan int) |
| 16 | go func() { |
| 17 | select { |
| 18 | case <-time.After(testTimeout): |
| 19 | panic("Timeout") |
| 20 | case <-done: |
| 21 | } |
| 22 | }() |
| 23 | return done |
| 24 | } |
| 25 | |
| 26 | func testReturn(t *testing.T, got interface{}, wasOk bool, expected interface{}, expectedOk bool) { |
| 27 | if wasOk != expectedOk { |
no outgoing calls
no test coverage detected