MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / TestLowercaseFirstCharacters

Function TestLowercaseFirstCharacters

pkg/codegen/utils_test.go:738–767  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

736}
737
738func TestLowercaseFirstCharacters(t *testing.T) {
739 tests := []struct {
740 name string
741 in string
742 expected string
743 }{
744 {
745 name: "id",
746 expected: "id",
747 },
748 {
749 name: "CamelCase",
750 expected: "camelCase",
751 },
752 {
753 name: "ID",
754 expected: "id",
755 },
756 {
757 name: "DBTree",
758 expected: "dbTree",
759 },
760 }
761
762 for _, tt := range tests {
763 t.Run(tt.name, func(t *testing.T) {
764 assert.Equal(t, tt.expected, LowercaseFirstCharacters(tt.name))
765 })
766 }
767}
768
769func Test_replaceInitialism(t *testing.T) {
770 type args struct {

Callers

nothing calls this directly

Calls 2

LowercaseFirstCharactersFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected