MCPcopy Create free account
hub / github.com/google/go-querystring / testValue

Function testValue

query/encode_test.go:19–27  ·  view source on GitHub ↗

test that Values(input) matches want. If not, report an error on t.

(t *testing.T, input interface{}, want url.Values)

Source from the content-addressed store, hash-verified

17
18// test that Values(input) matches want. If not, report an error on t.
19func testValue(t *testing.T, input interface{}, want url.Values) {
20 v, err := Values(input)
21 if err != nil {
22 t.Errorf("Values(%q) returned error: %v", input, err)
23 }
24 if diff := cmp.Diff(want, v); diff != "" {
25 t.Errorf("Values(%#v) mismatch:\n%s", input, diff)
26 }
27}
28
29func TestValues_BasicTypes(t *testing.T) {
30 tests := []struct {

Callers 9

TestValues_BasicTypesFunction · 0.85
TestValues_PointersFunction · 0.85
TestValues_SlicesFunction · 0.85
TestValues_NestedTypesFunction · 0.85
TestValues_OmitEmptyFunction · 0.85

Calls 1

ValuesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…