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

Function TestNullableStringConversionToString

flags_test.go:68–80  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

66}
67
68func TestNullableStringConversionToString(t *testing.T) {
69 ns := new(nullableString)
70 if act := ns.String(); act != nilStr {
71 t.Error("Unset nullableString should convert to \"nil\"")
72 }
73 someVal := "someval"
74 if err := ns.Set(someVal); err != nil {
75 t.Errorf("Couldn't set nullableString to %q", someVal)
76 }
77 if act := ns.String(); act != someVal {
78 t.Errorf("Expected %q, but got %q", someVal, act)
79 }
80}

Callers

nothing calls this directly

Calls 3

ErrorMethod · 0.80
StringMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected