MCPcopy Create free account
hub / github.com/gobeam/stringy / TestInput_BooleanError

Function TestInput_BooleanError

stringy_test.go:62–76  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

60}
61
62func TestInput_BooleanError(t *testing.T) {
63 strs := []string{"invalid", "-1", ""}
64 for _, s := range strs {
65 t.Run(s, func(t *testing.T) {
66 defer func() {
67 if err := recover(); err == nil {
68 t.Errorf("Error expected")
69 }
70 }()
71 val := New(s).Boolean()
72 t.Errorf("Expected: to panic but got: %v", val)
73 })
74 }
75
76}
77
78func TestInput_CamelCase(t *testing.T) {
79 str := New("Camel case this_complicated__string%%")

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
BooleanMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…