MCPcopy Index your code
hub / github.com/jetify-com/devbox / TestBuildQueryString

Function TestBuildQueryString

nix/flake/flakeref_test.go:398–412  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

396}
397
398func TestBuildQueryString(t *testing.T) {
399 defer func() {
400 if r := recover(); r == nil {
401 t.Error("wanted panic for odd-number of key-value parameters")
402 }
403 }()
404
405 // staticcheck impressively catches buildQueryString calls that have an
406 // odd number of parameters. Build the slice in a convoluted way to
407 // throw it off and suppress the warning (gopls doesn't have nolint
408 // directives).
409 var elems []string
410 elems = append(elems, "1")
411 appendQueryString(nil, elems...)
412}

Callers

nothing calls this directly

Calls 2

appendQueryStringFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected