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

Function TestInput_CamelCaseOddRuleError

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

Source from the content-addressed store, hash-verified

92}
93
94func TestInput_CamelCaseOddRuleError(t *testing.T) {
95 defer func() {
96 if err := recover(); err == nil {
97 t.Errorf("Error expected")
98 }
99 }()
100 str := New("Camel case this_complicated__string%%")
101 against := "camelCaseThisComplicatedString%%"
102 if val := str.CamelCase("%").Get(); val != against {
103 t.Errorf("Expected: to be %s but got: %s", "camelCaseThisComplicatedString", val)
104 }
105}
106
107func TestInput_PascalCaseNoRule(t *testing.T) {
108 str := New("pascal case this_complicated__string%%")

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
GetMethod · 0.65
CamelCaseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…