Test how bad options are handled. Method f under test should return an error.
(t *testing.T, methodName string, f func() error)
| 349 | // Test how bad options are handled. Method f under test should |
| 350 | // return an error. |
| 351 | func testBadOptions(t *testing.T, methodName string, f func() error) { |
| 352 | t.Helper() |
| 353 | if methodName == "" { |
| 354 | t.Error("testBadOptions: must supply method methodName") |
| 355 | } |
| 356 | if err := f(); err == nil { |
| 357 | t.Errorf("bad options %v err = nil, want error", methodName) |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | // Test function under NewRequest failure and then s.client.Do failure. |
| 362 | // Method f should be a regular call that would normally succeed, but |
no test coverage detected
searching dependent graphs…