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

Function TestInput_BooleanTrue

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

Source from the content-addressed store, hash-verified

38}
39
40func TestInput_BooleanTrue(t *testing.T) {
41 strs := []string{"on", "On", "yes", "YES", "1", "true"}
42 for _, s := range strs {
43 t.Run(s, func(t *testing.T) {
44 if val := New(s).Boolean(); !val {
45 t.Errorf("Expected: to be true but got: %v", val)
46 }
47 })
48 }
49}
50
51func TestInput_BooleanFalse(t *testing.T) {
52 strs := []string{"off", "Off", "no", "NO", "0", "false"}

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…