(t *testing.T)
| 153 | } |
| 154 | |
| 155 | func TestReceiverDestroy(t *testing.T) { |
| 156 | c, _ := e.NewContext() |
| 157 | defer c.Destroy() |
| 158 | |
| 159 | r := e.receivers["TestReceiver"] |
| 160 | if r == nil { |
| 161 | t.Fatalf("Receiver.Destroy(): Could not find defined receiver") |
| 162 | } |
| 163 | |
| 164 | r.Destroy() |
| 165 | if r.create != nil || r.objects != nil { |
| 166 | t.Errorf("Receiver.Destroy(): Did not set internal fields to `nil`") |
| 167 | } |
| 168 | |
| 169 | // Attempting to destroy a receiver twice should be a no-op. |
| 170 | r.Destroy() |
| 171 | } |
| 172 | |
| 173 | func TestReceiverEnd(t *testing.T) { |
| 174 | e.Destroy() |
nothing calls this directly
no test coverage detected