MCPcopy Index your code
hub / github.com/codesenberg/bombardier / TestClientTypToStringConversion

Function TestClientTypToStringConversion

config_test.go:383–399  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

381}
382
383func TestClientTypToStringConversion(t *testing.T) {
384 expectations := []struct {
385 in clientTyp
386 out string
387 }{
388 {fhttp, "FastHTTP"},
389 {nhttp1, "net/http v1.x"},
390 {nhttp2, "net/http v2.0"},
391 {42, "unknown client"},
392 }
393 for _, exp := range expectations {
394 act := exp.in.String()
395 if act != exp.out {
396 t.Errorf("Expected %v, but got %v", exp.out, act)
397 }
398 }
399}
400
401func clientTypeFromString(s string) clientTyp {
402 switch s {

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected