feat: add C++ support with ImGui/ImPlot framework and vendor submodules
Añade soporte C++ al registry: vendor submodules (glfw, imgui, implot, tracy), sistema de build con CMake y toolchains cross-platform, runner C++ en fn CLI, parser de tests Google Test, y funciones bash para build Linux/Windows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,8 @@ func parseTestFile(path, lang string) ([]testCase, error) {
|
||||
return parsePythonTests(content), nil
|
||||
case "bash":
|
||||
return parseBashTests(content), nil
|
||||
case "cpp":
|
||||
return parseCppTests(content), nil
|
||||
default:
|
||||
return nil, nil
|
||||
}
|
||||
@@ -115,6 +117,23 @@ func parseBashTests(content string) []testCase {
|
||||
return extractBlocks(lines, positions)
|
||||
}
|
||||
|
||||
// parseCppTests extracts C++ test functions (Google Test TEST/TEST_F macros).
|
||||
var cppTestRe = regexp.MustCompile(`(?m)^(?:TEST|TEST_F|TEST_P)\s*\(\s*(\w+)\s*,\s*(\w+)\s*\)`)
|
||||
|
||||
func parseCppTests(content string) []testCase {
|
||||
lines := strings.Split(content, "\n")
|
||||
var positions []testPos
|
||||
|
||||
for i, line := range lines {
|
||||
if m := cppTestRe.FindStringSubmatch(line); m != nil {
|
||||
name := m[1] + "." + m[2] // Suite.TestName
|
||||
positions = append(positions, testPos{name: name, startLine: i})
|
||||
}
|
||||
}
|
||||
|
||||
return extractBlocks(lines, positions)
|
||||
}
|
||||
|
||||
// extractBlocks splits lines into code blocks based on test positions.
|
||||
func extractBlocks(lines []string, positions []testPos) []testCase {
|
||||
var tests []testCase
|
||||
|
||||
Reference in New Issue
Block a user