MCPcopy Create free account
hub / github.com/php/frankenphp / TestHeaderGenerator_EmptyBaseName

Function TestHeaderGenerator_EmptyBaseName

internal/extgen/hfile_test.go:182–190  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

180}
181
182func TestHeaderGenerator_EmptyBaseName(t *testing.T) {
183 generator := &Generator{BaseName: ""}
184 headerGen := HeaderGenerator{generator}
185 content, err := headerGen.buildContent()
186 require.NoError(t, err)
187
188 assert.Contains(t, content, "#ifndef __H", "Header with empty basename should have __H guard")
189 assert.Contains(t, content, "#define __H", "Header with empty basename should have __H define")
190}
191
192func TestHeaderGenerator_ContentValidation(t *testing.T) {
193 generator := &Generator{BaseName: "validation_test"}

Callers

nothing calls this directly

Calls 1

buildContentMethod · 0.95

Tested by

no test coverage detected