MCPcopy Index your code
hub / github.com/php/frankenphp / testCFileBasicStructure

Function testCFileBasicStructure

internal/extgen/cfile_test.go:322–336  ·  view source on GitHub ↗
(t *testing.T, content, baseName string)

Source from the content-addressed store, hash-verified

320}
321
322func testCFileBasicStructure(t *testing.T, content, baseName string) {
323 requiredElements := []string{
324 "#include <php.h>",
325 "#include <Zend/zend_API.h>",
326 `#include "_cgo_export.h"`,
327 `#include "` + baseName + `.h"`,
328 `#include "` + baseName + `_arginfo.h"`,
329 "PHP_MINIT_FUNCTION(" + baseName + ")",
330 baseName + "_module_entry",
331 }
332
333 for _, element := range requiredElements {
334 assert.Contains(t, content, element, "C file should contain: %s", element)
335 }
336}
337
338func testCFileFunctions(t *testing.T, content string, functions []phpFunction) {
339 for _, fn := range functions {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected