MCPcopy Index your code
hub / github.com/google/go-github / testBadOptions

Function testBadOptions

github/github_test.go:351–359  ·  view source on GitHub ↗

Test how bad options are handled. Method f under test should return an error.

(t *testing.T, methodName string, f func() error)

Source from the content-addressed store, hash-verified

349// Test how bad options are handled. Method f under test should
350// return an error.
351func 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

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…