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

Function TestInput_SnakeCase

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

Source from the content-addressed store, hash-verified

281}
282
283func TestInput_SnakeCase(t *testing.T) {
284 str := New("SnakeCase this-complicated___string@@")
285 against := "snake_case_this_complicated_string"
286 if val := str.SnakeCase("@", "").ToLower(); val != against {
287 t.Errorf("Expected: to be %s but got: %s", against, val)
288 }
289}
290
291func TestInput_Surround(t *testing.T) {
292 str := New("this")

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
ToLowerMethod · 0.65
SnakeCaseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…