diff --git a/cmd/testgen.go b/cmd/testgen.go index 539dbdb..0311baf 100644 --- a/cmd/testgen.go +++ b/cmd/testgen.go @@ -50,6 +50,15 @@ Examples: continue } lang := langObj.Name + if lang == "C/C++" { + ext := strings.ToLower(filepath.Ext(filePath)) + switch ext { + case ".cpp", ".cc", ".cxx": + lang = "C++" + default: + lang = "C" + } + } if !supportedLangs[lang] { color.Yellow("Unsupported lang '%s' for %s (supported: Go/Python/C/C++)", lang, filePath) allSuccess = false