pi-usereq 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.g.conf +20 -0
- package/.github/workflows/release-npm.yml +131 -0
- package/.gitignore +270 -0
- package/CHANGELOG.md +221 -0
- package/LICENSE +674 -0
- package/README.md +260 -0
- package/TODO.md +20 -0
- package/docs/pi.dev/agent-document-manifest.json +6399 -0
- package/docs/pi.dev/coding-agent-docs/compaction.md +394 -0
- package/docs/pi.dev/coding-agent-docs/custom-provider.md +596 -0
- package/docs/pi.dev/coding-agent-docs/development.md +71 -0
- package/docs/pi.dev/coding-agent-docs/extensions.md +2262 -0
- package/docs/pi.dev/coding-agent-docs/images/doom-extension.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/exy.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/interactive-mode.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/tree-view.png +0 -0
- package/docs/pi.dev/coding-agent-docs/json.md +82 -0
- package/docs/pi.dev/coding-agent-docs/keybindings.md +175 -0
- package/docs/pi.dev/coding-agent-docs/models.md +392 -0
- package/docs/pi.dev/coding-agent-docs/packages.md +218 -0
- package/docs/pi.dev/coding-agent-docs/prompt-templates.md +67 -0
- package/docs/pi.dev/coding-agent-docs/providers.md +195 -0
- package/docs/pi.dev/coding-agent-docs/rpc.md +1377 -0
- package/docs/pi.dev/coding-agent-docs/sdk.md +1124 -0
- package/docs/pi.dev/coding-agent-docs/session.md +412 -0
- package/docs/pi.dev/coding-agent-docs/settings.md +247 -0
- package/docs/pi.dev/coding-agent-docs/shell-aliases.md +13 -0
- package/docs/pi.dev/coding-agent-docs/skills.md +232 -0
- package/docs/pi.dev/coding-agent-docs/terminal-setup.md +106 -0
- package/docs/pi.dev/coding-agent-docs/termux.md +127 -0
- package/docs/pi.dev/coding-agent-docs/themes.md +295 -0
- package/docs/pi.dev/coding-agent-docs/tmux.md +61 -0
- package/docs/pi.dev/coding-agent-docs/tree.md +231 -0
- package/docs/pi.dev/coding-agent-docs/tui.md +887 -0
- package/docs/pi.dev/coding-agent-docs/windows.md +17 -0
- package/docs/pi.dev/mom-docs/artifacts-server.md +475 -0
- package/docs/pi.dev/mom-docs/events.md +307 -0
- package/docs/pi.dev/mom-docs/new.md +970 -0
- package/docs/pi.dev/mom-docs/sandbox.md +153 -0
- package/docs/pi.dev/mom-docs/slack-bot-minimal-guide.md +399 -0
- package/docs/pi.dev/mom-docs/v86.md +319 -0
- package/docs/pi.dev/pods-docs/gml-4.5.md +189 -0
- package/docs/pi.dev/pods-docs/gpt-oss.md +233 -0
- package/docs/pi.dev/pods-docs/implementation-plan.md +183 -0
- package/docs/pi.dev/pods-docs/kimi-k2.md +197 -0
- package/docs/pi.dev/pods-docs/models.md +116 -0
- package/docs/pi.dev/pods-docs/plan.md +166 -0
- package/docs/pi.dev/pods-docs/qwen3-coder.md +132 -0
- package/images/flowchart-bw.png +0 -0
- package/images/flowchart-bw.svg +102 -0
- package/images/flowchart.md +100 -0
- package/images/flowchart.png +0 -0
- package/images/flowchart.svg +3 -0
- package/package.json +46 -0
- package/req/docs/REFERENCES.md +4554 -0
- package/req/docs/REQUIREMENTS.md +475 -0
- package/req/docs/WORKFLOW.md +1059 -0
- package/scripts/debug-extension.ts +497 -0
- package/scripts/lib/extension-debug-harness.ts +450 -0
- package/scripts/lib/recording-extension-api.ts +786 -0
- package/scripts/lib/sdk-smoke.ts +503 -0
- package/scripts/pi-usereq-debug.sh +330 -0
- package/scripts/tool-args-to-params.ts +208 -0
- package/src/cli.ts +349 -0
- package/src/core/agent-tool-json.ts +621 -0
- package/src/core/compress-files.ts +72 -0
- package/src/core/compress-payload.ts +648 -0
- package/src/core/compress.ts +464 -0
- package/src/core/config.ts +272 -0
- package/src/core/doxygen-parser.ts +318 -0
- package/src/core/errors.ts +31 -0
- package/src/core/extension-status.ts +660 -0
- package/src/core/find-constructs.ts +319 -0
- package/src/core/find-payload.ts +915 -0
- package/src/core/generate-markdown.ts +120 -0
- package/src/core/path-context.ts +196 -0
- package/src/core/pi-notify.ts +430 -0
- package/src/core/pi-usereq-tools.ts +140 -0
- package/src/core/prompts.ts +184 -0
- package/src/core/reference-payload.ts +818 -0
- package/src/core/resources.ts +63 -0
- package/src/core/runtime-project-paths.ts +99 -0
- package/src/core/settings-menu.ts +233 -0
- package/src/core/source-analyzer.ts +1721 -0
- package/src/core/static-check.ts +674 -0
- package/src/core/token-counter.ts +729 -0
- package/src/core/tool-runner.ts +717 -0
- package/src/core/utils.ts +185 -0
- package/src/index.ts +2209 -0
- package/src/resources/guidelines/Google_C++_Style_Guide.md +3711 -0
- package/src/resources/guidelines/Google_Python_Style_Guide.md +3709 -0
- package/src/resources/prompts/analyze.md +130 -0
- package/src/resources/prompts/change.md +227 -0
- package/src/resources/prompts/check.md +139 -0
- package/src/resources/prompts/cover.md +219 -0
- package/src/resources/prompts/create.md +104 -0
- package/src/resources/prompts/fix.md +221 -0
- package/src/resources/prompts/flowchart.md +220 -0
- package/src/resources/prompts/implement.md +163 -0
- package/src/resources/prompts/new.md +226 -0
- package/src/resources/prompts/readme.md +182 -0
- package/src/resources/prompts/recreate.md +213 -0
- package/src/resources/prompts/refactor.md +213 -0
- package/src/resources/prompts/references.md +100 -0
- package/src/resources/prompts/renumber.md +119 -0
- package/src/resources/prompts/workflow.md +202 -0
- package/src/resources/prompts/write.md +99 -0
- package/src/resources/sounds/Machine-alert-beep-sound-effect.mp3 +0 -0
- package/src/resources/sounds/Soft-high-tech-notification-sound-effect.mp3 +0 -0
- package/src/resources/templates/Document_Source_Code_in_Doxygen_Style.md +130 -0
- package/src/resources/templates/HDT_Test_Authoring_Guide.md +318 -0
- package/src/resources/templates/Requirements_Template.md +78 -0
- package/tests/attended-results-scenarios.ts +758 -0
- package/tests/attended-results.test.ts +39 -0
- package/tests/cli-command-option-parity.test.ts +815 -0
- package/tests/debug-extension-harness.test.ts +463 -0
- package/tests/extension-registration.test.ts +2006 -0
- package/tests/fixtures/fixture_c.c +361 -0
- package/tests/fixtures/fixture_cpp.cpp +407 -0
- package/tests/fixtures/fixture_csharp.cs +411 -0
- package/tests/fixtures/fixture_elixir.ex +409 -0
- package/tests/fixtures/fixture_go.go +341 -0
- package/tests/fixtures/fixture_haskell.hs +250 -0
- package/tests/fixtures/fixture_java.java +430 -0
- package/tests/fixtures/fixture_javascript.js +383 -0
- package/tests/fixtures/fixture_kotlin.kt +451 -0
- package/tests/fixtures/fixture_lua.lua +276 -0
- package/tests/fixtures/fixture_perl.pl +310 -0
- package/tests/fixtures/fixture_php.php +433 -0
- package/tests/fixtures/fixture_python.py +502 -0
- package/tests/fixtures/fixture_ruby.rb +345 -0
- package/tests/fixtures/fixture_rust.rs +380 -0
- package/tests/fixtures/fixture_scala.scala +398 -0
- package/tests/fixtures/fixture_shell.sh +276 -0
- package/tests/fixtures/fixture_swift.swift +397 -0
- package/tests/fixtures/fixture_typescript.ts +434 -0
- package/tests/fixtures/fixture_zig.zig +295 -0
- package/tests/fixtures_attended_results/project/compress-line-numbers.json +5 -0
- package/tests/fixtures_attended_results/project/compress.json +5 -0
- package/tests/fixtures_attended_results/project/enable-static-check-invalid-command.json +5 -0
- package/tests/fixtures_attended_results/project/enable-static-check-valid.json +5 -0
- package/tests/fixtures_attended_results/project/files-static-check.json +5 -0
- package/tests/fixtures_attended_results/project/find-line-numbers.json +5 -0
- package/tests/fixtures_attended_results/project/find.json +5 -0
- package/tests/fixtures_attended_results/project/get-base-path.json +5 -0
- package/tests/fixtures_attended_results/project/git-check-clean.json +5 -0
- package/tests/fixtures_attended_results/project/git-check-dirty.json +5 -0
- package/tests/fixtures_attended_results/project/git-path.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-create-invalid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-create-valid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-delete-nonexistent.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-delete-valid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-name.json +5 -0
- package/tests/fixtures_attended_results/project/references.json +5 -0
- package/tests/fixtures_attended_results/project/static-check.json +5 -0
- package/tests/fixtures_attended_results/project/tokens.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_zig.zig.json +5 -0
- package/tests/helpers.ts +204 -0
- package/tests/oracle-project.test.ts +63 -0
- package/tests/oracle-standalone.test.ts +48 -0
- package/tests/prompt-rendering.test.ts +66 -0
- package/tests/release-workflow.test.ts +133 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_php.php | php\n- @brief Comprehensive PHP test fixture for parser validation.\n- @details Covers enums with methods, union/intersection types, readonly\nproperties, constructor promotion, arrow functions, match expressions,\nfirst-class callables, attributes, fibers, and named arguments.\n\n### NAMESPACE: `App\\Models`\n> Signature: `namespace App\\Models`\n> Lines: 12-15\n```\nnamespace App\\Models;\nuse App\\Contracts\\Repository;\nuse App\\Events\\{ModelCreated, ModelDeleted};\n```\n\n### IMPORT: `App\\Contracts\\Repository`\n> Lines: 14-14\n```\nuse App\\Contracts\\Repository;\n```\n\n### IMPORT: `App\\Events\\{ModelCreated, ModelDeleted}`\n> Lines: 15-15\n```\nuse App\\Events\\{ModelCreated, ModelDeleted};\n```\n\n### IMPORT: `Psr\\Log\\LoggerInterface`\n> Lines: 16-16\n```\nuse Psr\\Log\\LoggerInterface;\n```\n\n### IMPORT: `'config.php'`\n> Lines: 17-17\n```\nrequire_once 'config.php';\n```\n\n### CONSTANT: `VERSION`\n> Signature: `const VERSION = \"1.0\"`\n> Lines: 22-22\n- @brief Application version string. */\n```\nconst VERSION = \"1.0\";\n```\n\n### CONSTANT: `MAX_PER_PAGE`\n> Signature: `const MAX_PER_PAGE = 50`\n> Lines: 25-25\n- @brief Maximum number of query results per page. */\n```\nconst MAX_PER_PAGE = 50;\n```\n\n### FUNCTION: `isActive`\n> Signature: `public function isActive(): bool`\n> Lines: 45-47\n- @brief Check if the status represents an active state.\n- @return bool True if the entity is publicly visible.\n```\npublic function isActive(): bool {\nreturn $this === self::Published;\n}\n```\n\n### FUNCTION: `label`\n> Signature: `public function label(): string`\n> Lines: 53-59\n- @brief Get a human-readable label for display.\n- @return string Formatted status label.\n```\npublic function label(): string {\nreturn match($this) {\nself::Draft => 'Draft',\nself::Published => 'Published',\nself::Archived => 'Archived',\n};\n}\n```\n\n### CLASS: `BaseModel`\n> Signature: `abstract class BaseModel`\n> Lines: 69-111\n- @brief Abstract base model with common persistence operations.\n- @brief Construct a model with promoted properties.\n- @details Uses constructor promotion for compact field declaration.\n- @param int $id Unique identifier (readonly after construction).\n- @param \\DateTimeImmutable $createdAt Timestamp of creation.\n```\nabstract class BaseModel {\npublic function __construct(\npublic readonly int $id,\npublic readonly \\DateTimeImmutable $createdAt = new \\DateTimeImmutable(),\n) {}\npublic function save(): bool {\nif (!$this->validate()) {\nreturn false;\n}\nreturn true;\n}\nabstract protected function validate(): bool;\nprivate static function validateConstraints(): bool {\nreturn true;\n}\nabstract public function toArray(): array;\n}\n```\n\n### FUNCTION: `__construct`\n> Signature: `public function __construct(`\n> Lines: 75-78\n- @brief Construct a model with promoted properties.\n- @param int $id Unique identifier (readonly after construction).\n- @param \\DateTimeImmutable $createdAt Timestamp of creation.\n```\npublic function __construct(\npublic readonly int $id,\npublic readonly \\DateTimeImmutable $createdAt = new \\DateTimeImmutable(),\n) {}\n```\n\n### FUNCTION: `save`\n> Signature: `public function save(): bool`\n> Lines: 84-90\n- @brief Persist the model to the data store.\n- @return bool True if save succeeded.\n```\npublic function save(): bool {\nif (!$this->validate()) {\nreturn false;\n}\nreturn true;\n}\n```\n\n### FUNCTION: `validateConstraints`\n> Signature: `private static function validateConstraints(): bool`\n> Lines: 102-104\n- @brief Internal validation helper with type narrowing.\n- @return bool True if entity passes all constraint checks.\n```\nprivate static function validateConstraints(): bool {\nreturn true;\n}\n```\n\n### CLASS: `User`\n> Signature: `final class User extends BaseModel`\n> Lines: 120-179\n- @brief Concrete user entity with union and intersection types.\n- @brief User's display name.\n```\nfinal class User extends BaseModel {\nprivate string $name;\nprivate ?string $email;\npublic function __construct(\nint $id,\nstring $name,\n?string $email = null,\n) {\nparent::__construct($id);\n$this->name = $name;\n$this->email = $email;\n}\npublic function getName(): string {\nreturn $this->name;\n}\npublic function getIdentifier(): string|int {\nreturn $this->email ?? $this->id;\n}\nprotected function validate(): bool {\nreturn strlen($this->name) > 0;\n}\npublic function toArray(): array {\nreturn [\n'id' => $this->id,\n'name' => $this->name,\n'email' => $this->email,\n];\n}\n}\n```\n\n### FUNCTION: `__construct`\n> Signature: `public function __construct(`\n> Lines: 133-141\n- @brief Construct a User with promoted and explicit properties.\n- @param int $id Unique user ID.\n- @param string $name Display name.\n- @param string|null $email Optional email address.\n```\npublic function __construct(\nint $id,\nstring $name,\n?string $email = null,\n) {\nparent::__construct($id);\n$this->name = $name;\n$this->email = $email;\n}\n```\n\n### FUNCTION: `getName`\n> Signature: `public function getName(): string`\n> Lines: 147-149\n- @brief Get the user's display name.\n- @return string The user name.\n```\npublic function getName(): string {\nreturn $this->name;\n}\n```\n\n### FUNCTION: `getIdentifier`\n> Signature: `public function getIdentifier(): string|int`\n> Lines: 155-158\n- @brief Get a value that may be string or int.\n- @return string|int The identifier in either format.\n```\npublic function getIdentifier(): string|int {\nreturn $this->email ?? $this->id;\n}\n```\n\n### FUNCTION: `validate`\n> Signature: `protected function validate(): bool`\n> Lines: 164-166\n- @brief Validate user-specific constraints.\n- @return bool True if name is non-empty.\n```\nprotected function validate(): bool {\nreturn strlen($this->name) > 0;\n}\n```\n\n### FUNCTION: `toArray`\n> Signature: `public function toArray(): array`\n> Lines: 172-178\n- @brief Serialize user to array.\n- @return array<string, mixed> User data array.\n```\npublic function toArray(): array {\nreturn [\n'id' => $this->id,\n'name' => $this->name,\n'email' => $this->email,\n];\n}\n```\n\n### INTERFACE: `Repo`\n> Signature: `interface Repo`\n> Lines: 187-207\n- @brief Generic repository interface for data access patterns.\n- @brief Retrieve all entities.\n- @return iterable<BaseModel> Collection of models.\n```\ninterface Repo {\npublic function findAll(): iterable;\npublic function findById(int $id): ?BaseModel;\npublic function count(array $criteria = []): int;\n}\n```\n\n### FUNCTION: `findAll`\n> Signature: `public function findAll(): iterable`\n> Lines: 192-215\n- @brief Retrieve all entities.\n- @brief Find a single entity by ID.\n- @param int $id Entity identifier.\n- @return iterable<BaseModel> Collection of models.\n- @return BaseModel|null The found entity or null.\n```\npublic function findAll(): iterable;\npublic function findById(int $id): ?BaseModel;\npublic function count(array $criteria = []): int;\n}\ntrait Cacheable {\n```\n\n### FUNCTION: `findById`\n> Signature: `public function findById(int $id): ?BaseModel`\n> Lines: 199-215\n- @brief Find a single entity by ID.\n- @brief Count entities matching a filter.\n- @param int $id Entity identifier.\n- @param array<string, mixed> $criteria Filter criteria.\n- @return BaseModel|null The found entity or null.\n- @return int Number of matching entities.\n```\npublic function findById(int $id): ?BaseModel;\npublic function count(array $criteria = []): int;\n}\ntrait Cacheable {\n```\n\n### FUNCTION: `count`\n> Signature: `public function count(array $criteria = []): int`\n> Lines: 206-215\n- @brief Count entities matching a filter.\n- @param array<string, mixed> $criteria Filter criteria.\n- @return int Number of matching entities.\n```\npublic function count(array $criteria = []): int;\n}\ntrait Cacheable {\n```\n\n### TRAIT: `Cacheable`\n> Signature: `trait Cacheable`\n> Lines: 215-241\n- @brief Provides caching capabilities for models.\n- @brief Cache TTL in seconds.\n```\ntrait Cacheable {\nprotected int $cacheTtl = 3600;\npublic function cache(): bool {\nreturn true;\n}\npublic function invalidateCache(): void {\n}\nabstract public function cacheKey(): string;\n}\n```\n\n### FUNCTION: `cache`\n> Signature: `public function cache(): bool`\n> Lines: 223-226\n- @brief Store the current object in cache.\n- @return bool True if caching succeeded.\n```\npublic function cache(): bool {\nreturn true;\n}\n```\n\n### FUNCTION: `invalidateCache`\n> Signature: `public function invalidateCache(): void`\n> Lines: 232-234\n- @brief Invalidate the cached version of this object.\n- @return void\n```\npublic function invalidateCache(): void {\n}\n```\n\n### TRAIT: `SoftDeletable`\n> Signature: `trait SoftDeletable`\n> Lines: 247-266\n- @brief Adds soft delete functionality to models.\n- @brief Timestamp of soft deletion or null if active.\n```\ntrait SoftDeletable {\nprotected ?\\DateTimeImmutable $deletedAt = null;\npublic function softDelete(): void {\n$this->deletedAt = new \\DateTimeImmutable();\n}\npublic function isDeleted(): bool {\nreturn $this->deletedAt !== null;\n}\n}\n```\n\n### FUNCTION: `softDelete`\n> Signature: `public function softDelete(): void`\n> Lines: 255-257\n- @brief Mark the entity as soft-deleted.\n- @return void\n```\npublic function softDelete(): void {\n$this->deletedAt = new \\DateTimeImmutable();\n}\n```\n\n### FUNCTION: `isDeleted`\n> Signature: `public function isDeleted(): bool`\n> Lines: 263-265\n- @brief Check if the entity is currently deleted.\n- @return bool True if soft-deleted.\n```\npublic function isDeleted(): bool {\nreturn $this->deletedAt !== null;\n}\n```\n\n### CLASS: `CachedUser`\n> Signature: `final class CachedUser extends User`\n> Lines: 275-286\n- @brief User entity with caching and soft-delete capabilities.\n```\nfinal class CachedUser extends User {\nuse Cacheable;\nuse SoftDeletable;\npublic function cacheKey(): string {\nreturn \"user:{$this->id}\";\n}\n}\n```\n\n### IMPORT: `Cacheable`\n> Lines: 276-276\n```\nuse Cacheable;\n```\n\n### IMPORT: `SoftDeletable`\n> Lines: 277-277\n```\nuse SoftDeletable;\n```\n\n### FUNCTION: `cacheKey`\n> Signature: `public function cacheKey(): string`\n> Lines: 283-285\n- @brief Generate a unique cache key for this user.\n- @return string Cache key in format \"user:{id}\".\n```\npublic function cacheKey(): string {\nreturn \"user:{$this->id}\";\n}\n```\n\n### CLASS: `Route`\n> Signature: `class Route`\n> Lines: 295-305\n- @brief PHP attribute for annotating controller methods with routes.\n- @brief Define a route attribute.\n- @param string $path URL path pattern.\n- @param string $method HTTP method (GET, POST, etc.).\n```\nclass Route {\npublic function __construct(\npublic readonly string $path,\npublic readonly string $method = 'GET',\n) {}\n}\n```\n\n### FUNCTION: `__construct`\n> Signature: `public function __construct(`\n> Lines: 301-304\n- @brief Define a route attribute.\n- @param string $path URL path pattern.\n- @param string $method HTTP method (GET, POST, etc.).\n```\npublic function __construct(\npublic readonly string $path,\npublic readonly string $method = 'GET',\n) {}\n```\n\n### FUNCTION: `helper`\n> Signature: `function helper(): bool`\n> Lines: 314-316\n- @brief Standalone helper returning a boolean result.\n- @return bool Always returns true.\n```\nfunction helper(): bool {\nreturn true;\n}\n```\n\n### FUNCTION: `processData`\n> Signature: `function processData(mixed $data): string`\n> Lines: 324-333\n- @brief Process data using match expression for type dispatching.\n- @param mixed $data Input data of any type.\n- @return string Description of the processed data.\n```\nfunction processData(mixed $data): string {\nreturn match(true) {\nis_string($data) => \"string: \" . strlen($data),\nis_int($data) => \"int: $data\",\nis_array($data) => \"array: \" . count($data),\n$data instanceof BaseModel => \"model: \" . $data->id,\ndefault => \"unknown\",\n};\n}\n```\n\n### FUNCTION: `applyTransform`\n> Signature: `function applyTransform(array $items, callable $fn): array`\n> Lines: 342-344\n- @brief Higher-order function using arrow function syntax.\n- @param array<int> $items Array of integers.\n- @param callable(int): int $fn Transform function.\n- @return array<int> Transformed array.\n```\nfunction applyTransform(array $items, callable $fn): array {\nreturn array_map(fn(int $x): int => $fn($x), $items);\n}\n```\n\n### FUNCTION: `createMultiplier`\n> Signature: `function createMultiplier(int $factor): \\Closure`\n> Lines: 352-355\n- @brief Create a closure that multiplies its argument.\n- @param int $factor The multiplication factor.\n- @return \\Closure(int): int A multiplier closure.\n```\nfunction createMultiplier(int $factor): \\Closure {\nreturn fn(int $x): int => $x * $factor;\n}\n```\n\n### FUNCTION: `readFileContent`\n> Signature: `function readFileContent(string $path): string|false`\n> Lines: 363-368\n- @brief Read file contents with comprehensive error handling.\n- @param string $path File system path.\n- @return string|false File contents or false on failure.\n```\nfunction readFileContent(string $path): string|false {\nif (!file_exists($path)) {\nreturn false;\n}\nreturn file_get_contents($path);\n}\n```\n\n### NAMESPACE: `App\\Services`\n> Signature: `namespace App\\Services`\n> Lines: 371-375\n```\nnamespace App\\Services;\nnamespace App\\Http;\nnamespace App\\Domain;\nnamespace App\\Support;\ninterface ServiceContract {}\n```\n\n### NAMESPACE: `App\\Http`\n> Signature: `namespace App\\Http`\n> Lines: 372-375\n```\nnamespace App\\Http;\nnamespace App\\Domain;\nnamespace App\\Support;\ninterface ServiceContract {}\n```\n\n### NAMESPACE: `App\\Domain`\n> Signature: `namespace App\\Domain`\n> Lines: 373-375\n```\nnamespace App\\Domain;\nnamespace App\\Support;\ninterface ServiceContract {}\n```\n\n### NAMESPACE: `App\\Support`\n> Signature: `namespace App\\Support`\n> Lines: 374-375\n```\nnamespace App\\Support;\ninterface ServiceContract {}\n```\n\n### INTERFACE: `ServiceContract`\n> Signature: `interface ServiceContract {}`\n> Lines: 375-375\n```\ninterface ServiceContract {}\n```\n\n### INTERFACE: `CacheContract`\n> Signature: `interface CacheContract {}`\n> Lines: 376-376\n```\ninterface CacheContract {}\n```\n\n### INTERFACE: `LoggerContract`\n> Signature: `interface LoggerContract {}`\n> Lines: 377-377\n```\ninterface LoggerContract {}\n```\n\n### INTERFACE: `EventContract`\n> Signature: `interface EventContract {}`\n> Lines: 378-378\n```\ninterface EventContract {}\n```\n\n### TRAIT: `HandlesEvents`\n> Signature: `trait HandlesEvents {}`\n> Lines: 379-379\n```\ntrait HandlesEvents {}\n```\n\n### TRAIT: `TracksChanges`\n> Signature: `trait TracksChanges {}`\n> Lines: 380-380\n```\ntrait TracksChanges {}\n```\n\n### TRAIT: `AuthorizesRequests`\n> Signature: `trait AuthorizesRequests {}`\n> Lines: 381-381\n```\ntrait AuthorizesRequests {}\n```\n\n### CONSTANT: `API_LIMIT`\n> Signature: `const API_LIMIT = 50`\n> Lines: 382-382\n```\nconst API_LIMIT = 50;\n```\n\n### CONSTANT: `DEFAULT_PAGE`\n> Signature: `const DEFAULT_PAGE = 1`\n> Lines: 383-383\n```\nconst DEFAULT_PAGE = 1;\n```\n\n### CONSTANT: `TIMEOUT`\n> Signature: `const TIMEOUT = 30`\n> Lines: 384-384\n```\nconst TIMEOUT = 30;\n```\n\n### CLASS: `ApiClient`\n> Signature: `final class ApiClient {}`\n> Lines: 385-385\n```\nfinal class ApiClient {}\n```\n\n### FUNCTION: `req_cover_php_1`\n> Signature: `function req_cover_php_1(int $value): int { return $value + 1; }`\n> Lines: 395-395\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\nfunction req_cover_php_1(int $value): int { return $value + 1; }\n```\n\n### FUNCTION: `req_cover_php_2`\n> Signature: `function req_cover_php_2(int $value): int { return $value + 2; }`\n> Lines: 404-404\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\nfunction req_cover_php_2(int $value): int { return $value + 2; }\n```\n\n### FUNCTION: `req_cover_php_3`\n> Signature: `function req_cover_php_3(int $value): int { return $value + 3; }`\n> Lines: 413-413\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\nfunction req_cover_php_3(int $value): int { return $value + 3; }\n```\n\n### FUNCTION: `req_cover_php_4`\n> Signature: `function req_cover_php_4(int $value): int { return $value + 4; }`\n> Lines: 422-422\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\nfunction req_cover_php_4(int $value): int { return $value + 4; }\n```\n\n### FUNCTION: `req_cover_php_5`\n> Signature: `function req_cover_php_5(int $value): int { return $value + 5; }`\n> Lines: 431-431\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\nfunction req_cover_php_5(int $value): int { return $value + 5; }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_python.py | python\n- @brief Comprehensive Python test fixture for parser validation.\n- @details Covers classes, protocols, decorators, generators, async functions, and rich Doxygen-tagged constructs used to validate extraction workflows and deterministic parser behavior.\n\n### IMPORT: `asyncio #!< @brief Async IO support. @details Used for async test fixtures. # noqa: F401`\n> Lines: 7-7\n- @brief Async IO support.\n- @details Used for async test fixtures. # noqa: F401\n```\nimport asyncio\n```\n\n### IMPORT: `os #!< @brief OS interface module. @details Provides OS-dependent functionality. # noqa: F401`\n> Lines: 8-8\n- @brief OS interface module.\n- @details Provides OS-dependent functionality. # noqa: F401\n```\nimport os\n```\n\n### IMPORT: `sys #!< @brief System-specific parameters. @see sys.exit() for exit handling.`\n> Lines: 9-9\n- @brief System-specific parameters.\n- @see sys.exit() for exit handling.\n```\nimport sys\n```\n\n### IMPORT: `Path #!< @brief Object-oriented filesystem paths. @note Preferred over os.path. # noqa: F401`\n> Lines: 10-10\n- @brief Object-oriented filesystem paths.\n- @note Preferred over os.path. # noqa: F401\n```\nfrom pathlib import Path\n```\n\n### IMPORT: `(`\n> Lines: 11-11\n```\nfrom typing import (\n```\n\n### IMPORT: `dataclass, field`\n> Lines: 15-15\n```\nfrom dataclasses import dataclass, field\n```\n\n### IMPORT: `ABC, abstractmethod`\n> Lines: 16-16\n```\nfrom abc import ABC, abstractmethod\n```\n\n### IMPORT: `contextmanager`\n> Lines: 17-17\n```\nfrom contextlib import contextmanager\n```\n\n### VARIABLE: `MAX_RETRIES`\n> Signature: `MAX_RETRIES = 3 #!< @brief Maximum retry attempts. @details Applied to network operations. @warning Tune per use case. @satisfies retry-policy`\n> Lines: 19-19\n- @brief Maximum retry attempts.\n- @details Applied to network operations.\n- @warning Tune per use case.\n- @satisfies retry-policy\n```\nMAX_RETRIES = 3\n```\n\n### VARIABLE: `DEFAULT_TIMEOUT`\n> Signature: `DEFAULT_TIMEOUT = 30.0 #!< @brief Default timeout in seconds. @note For I/O operations.`\n> Lines: 20-20\n- @brief Default timeout in seconds.\n- @note For I/O operations.\n```\nDEFAULT_TIMEOUT = 30.0\n```\n\n### DECORATOR: `dataclass`\n> Lines: 26-26\n```\n@dataclass(slots=True)\n```\n\n### CLASS: `Config`\n> Signature: `class Config`\n> Lines: 27-61\n- @brief Stores key-value pairs with optional default fallback.\n- @details Dataclass-based configuration with validation.\n- @note Immutable after creation when frozen=True is used.\n- @see __post_init__() for validation logic.\n```\nclass Config:\n name: str\n values: Dict[str, str] = field(default_factory=dict)\n debug: bool = False\n def get(self, key: str, default: str = \"\") -> str:\n if key in self.values:\n return self.values[key]\n return default\n def __post_init__(self) -> None:\n if not self.name.strip():\n raise ValueError(\"Config name cannot be empty\")\n```\n\n### FUNCTION: `get`\n> Signature: `def get(self, key: str, default: str = \"\") -> str`\n> Lines: 39-51\n- @brief Stores key-value pairs with optional default fallback.\n- @details Dataclass-based configuration with validation.\n- @param key The configuration key to look up.\n- @param default Fallback value if key is missing.\n- @return The configuration value or default.\n- @note Immutable after creation when frozen=True is used.\n- @see __post_init__() for validation logic.\n```\n def get(self, key: str, default: str = \"\") -> str:\n if key in self.values:\n return self.values[key]\n return default\n```\n\n### FUNCTION: `__post_init__`\n> Signature: `def __post_init__(self) -> None`\n> Lines: 52-61\n- @brief Ensures name is non-empty and normalizes values. @raises ValueError If name is empty or whitespace.\n```\n def __post_init__(self) -> None:\n if not self.name.strip():\n raise ValueError(\"Config name cannot be empty\")\n```\n\n### CLASS: `MyClass`\n> Signature: `class MyClass`\n> Lines: 62-167\n- @brief Base class demonstrating various Python constructs.\n- @details Includes nested classes, properties, and static methods.\n```\nclass MyClass:\n class InnerHelper:\n def __init__(self, tag: str):\n self.tag = tag\n def describe(self) -> str:\n return f\"Helper({self.tag})\"\n def __init__(self, name: str, retries: int = MAX_RETRIES):\n self._name = name\n self._retries = retries\n self._call_count = 0\n @property\n def name(self) -> str:\n return self._name\n @name.setter\n def name(self, value: str) -> None:\n if not value:\n raise ValueError(\"Name cannot be empty\")\n self._name = value\n @staticmethod\n def create_default() -> \"MyClass\":\n return MyClass(\"default\")\n @classmethod\n def from_dict(cls, data: dict) -> \"MyClass\":\n return cls(\n name=data[\"name\"],\n retries=data.get(\"retries\", MAX_RETRIES),\n )\n def process(self, items: List[str], *, verbose: bool = False) -> Optional[str]:\n self._call_count += 1\n for item in items:\n if not item.strip():\n continue\n if verbose:\n print(f\"Processing: {item}\")\n return item if len(item) > 1 else item.upper()\n return None\n def compute(self, x: int, y: int) -> int:\n return (x + y) if (x > 0 and y > 0) else abs(x - y)\n```\n\n### CLASS: `InnerHelper`\n> Signature: `class InnerHelper`\n> Lines: 69-87\n- @brief Base class demonstrating various Python constructs.\n- @brief Handles auxiliary computations within MyClass scope.\n- @details Includes nested classes, properties, and static methods.\n```\n class InnerHelper:\n def __init__(self, tag: str):\n self.tag = tag\n def describe(self) -> str:\n return f\"Helper({self.tag})\"\n```\n\n### FUNCTION: `__init__`\n> Signature: `def __init__(self, tag: str)`\n> Lines: 74-80\n- @brief Handles auxiliary computations within MyClass scope.\n- @param tag Short label for categorization.\n```\n def __init__(self, tag: str):\n self.tag = tag\n```\n\n### FUNCTION: `describe`\n> Signature: `def describe(self) -> str`\n> Lines: 81-87\n- @return String combining class name and tag.\n```\n def describe(self) -> str:\n return f\"Helper({self.tag})\"\n```\n\n### FUNCTION: `__init__`\n> Signature: `def __init__(self, name: str, retries: int = MAX_RETRIES)`\n> Lines: 88-98\n- @param name Identifier for this instance.\n- @param retries Maximum retry attempts; defaults to MAX_RETRIES.\n```\n def __init__(self, name: str, retries: int = MAX_RETRIES):\n self._name = name\n self._retries = retries\n self._call_count = 0\n```\n\n### DECORATOR: `property`\n> Lines: 99-99\n```\n @property\n```\n\n### FUNCTION: `name`\n> Signature: `def name(self) -> str`\n> Lines: 100-106\n- @return The name string set during initialization.\n```\n def name(self) -> str:\n return self._name\n```\n\n### DECORATOR: `name.setter`\n> Lines: 107-107\n```\n @name.setter\n```\n\n### FUNCTION: `name`\n> Signature: `def name(self, value: str) -> None`\n> Lines: 108-117\n- @param value New name; must be non-empty. @raises ValueError If value is empty.\n```\n def name(self, value: str) -> None:\n if not value:\n raise ValueError(\"Name cannot be empty\")\n self._name = value\n```\n\n### DECORATOR: `staticmethod`\n> Lines: 118-118\n```\n @staticmethod\n```\n\n### FUNCTION: `create_default`\n> Signature: `def create_default() -> \"MyClass\"`\n> Lines: 119-125\n- @return A new MyClass instance with name='default'.\n```\n def create_default() -> \"MyClass\":\n return MyClass(\"default\")\n```\n\n### DECORATOR: `classmethod`\n> Lines: 126-126\n```\n @classmethod\n```\n\n### FUNCTION: `from_dict`\n> Signature: `def from_dict(cls, data: dict) -> \"MyClass\"`\n> Lines: 127-138\n- @param data Dictionary with 'name' and optional 'retries' keys.\n- @return A new instance populated from data. @raises KeyError If 'name' key is missing.\n```\n def from_dict(cls, data: dict) -> \"MyClass\":\n return cls(\n name=data[\"name\"],\n retries=data.get(\"retries\", MAX_RETRIES),\n )\n```\n\n### FUNCTION: `process`\n> Signature: `def process(self, items: List[str], *, verbose: bool = False) -> Optional[str]`\n> Lines: 139-156\n- @param items List of strings to process sequentially.\n- @param verbose Enable detailed logging when True.\n- @return The first valid item found or None if all are empty.\n```\n def process(self, items: List[str], *, verbose: bool = False) -> Optional[str]:\n self._call_count += 1\n for item in items:\n if not item.strip():\n continue\n if verbose:\n print(f\"Processing: {item}\")\n return item if len(item) > 1 else item.upper()\n return None\n```\n\n### FUNCTION: `compute`\n> Signature: `def compute(self, x: int, y: int) -> int`\n> Lines: 157-167\n- @param x First operand.\n- @param y Second operand.\n- @return Sum if both positive, difference otherwise.\n```\n def compute(self, x: int, y: int) -> int:\n return (x + y) if (x > 0 and y > 0) else abs(x - y)\n```\n\n### CLASS: `AbstractProcessor`\n> Signature: `class AbstractProcessor(ABC)`\n> Lines: 168-196\n- @brief Defines the interface that concrete processors must implement.\n- @details ABC-based interface with abstract methods.\n- @note Subclasses must implement execute() and execute_async().\n- @see ConcreteProcessor for a working implementation.\n- @sa ABC documentation for abstract base class patterns.\n```\nclass AbstractProcessor(ABC):\n @abstractmethod\n def execute(self, data: bytes) -> bool:\n ...\n @abstractmethod\n async def execute_async(self, data: bytes) -> bool:\n ...\n```\n\n### DECORATOR: `abstractmethod`\n> Lines: 178-178\n- @brief Defines the interface that concrete processors must implement.\n- @details ABC-based interface with abstract methods.\n- @note Subclasses must implement execute() and execute_async().\n- @see ConcreteProcessor for a working implementation.\n- @sa ABC documentation for abstract base class patterns.\n```\n @abstractmethod\n```\n\n### FUNCTION: `execute`\n> Signature: `def execute(self, data: bytes) -> bool`\n> Lines: 179-186\n- @param data The raw input bytes to process.\n- @return True if processing succeeded, False otherwise.\n```\n def execute(self, data: bytes) -> bool:\n ...\n```\n\n### DECORATOR: `abstractmethod`\n> Lines: 187-187\n```\n @abstractmethod\n```\n\n### FUNCTION: `execute_async`\n> Signature: `async def execute_async(self, data: bytes) -> bool`\n> Lines: 188-196\n- @param data The raw input bytes to process.\n- @return True if processing succeeded.\n```\n async def execute_async(self, data: bytes) -> bool:\n ...\n```\n\n### CLASS: `ConcreteProcessor`\n> Signature: `class ConcreteProcessor(AbstractProcessor)`\n> Lines: 197-231\n- @brief Processes byte data by decoding and validating content.\n- @details Implements synchronous and async execute methods.\n- @note Thread-safe for read operations.\n- @see AbstractProcessor for interface definition.\n```\nclass ConcreteProcessor(AbstractProcessor):\n def execute(self, data: bytes) -> bool:\n try:\n text = data.decode(\"utf-8\")\n return bool(text.strip())\n except UnicodeDecodeError:\n return False\n finally:\n pass\n async def execute_async(self, data: bytes) -> bool:\n return self.execute(data)\n```\n\n### FUNCTION: `execute`\n> Signature: `def execute(self, data: bytes) -> bool`\n> Lines: 206-222\n- @brief Processes byte data by decoding and validating content.\n- @details Implements synchronous and async execute methods.\n- @param data Raw bytes, expected UTF-8 encoded text.\n- @return True if decoding and validation succeed. @raises UnicodeDecodeError Propagated if data is not valid UTF-8.\n- @note Thread-safe for read operations.\n- @see AbstractProcessor for interface definition.\n```\n def execute(self, data: bytes) -> bool:\n try:\n text = data.decode(\"utf-8\")\n return bool(text.strip())\n except UnicodeDecodeError:\n return False\n finally:\n pass\n```\n\n### FUNCTION: `execute_async`\n> Signature: `async def execute_async(self, data: bytes) -> bool`\n> Lines: 223-231\n- @param data Raw bytes to process asynchronously.\n- @return True if valid content found.\n```\n async def execute_async(self, data: bytes) -> bool:\n return self.execute(data)\n```\n\n### CLASS: `GenericContainer`\n> Signature: `class GenericContainer(Generic[T])`\n> Lines: 232-271\n- @brief Type-safe collection with iteration and lookup support.\n- @details Generic collection with find and iteration. @tparam T The element type stored in this container.\n- @note Implements __iter__ for iteration protocol.\n- @see typing.Generic for generics documentation.\n```\nclass GenericContainer(Generic[T]):\n def __init__(self) -> None:\n self._items: List[T] = []\n def add(self, item: T) -> None:\n self._items.append(item)\n def __iter__(self) -> Iterator[T]:\n yield from self._items\n def find(self, predicate) -> Optional[T]:\n for item in self._items:\n if predicate(item):\n return item\n return None\n```\n\n### FUNCTION: `__init__`\n> Signature: `def __init__(self) -> None`\n> Lines: 242-245\n- @brief Type-safe collection with iteration and lookup support.\n- @details Generic collection with find and iteration.\n@tparam T The element type stored in this container.\n- @note Implements __iter__ for iteration protocol.\n- @see typing.Generic for generics documentation.\n```\n def __init__(self) -> None:\n self._items: List[T] = []\n```\n\n### FUNCTION: `add`\n> Signature: `def add(self, item: T) -> None`\n> Lines: 246-252\n- @param item Element of type T to add.\n```\n def add(self, item: T) -> None:\n self._items.append(item)\n```\n\n### FUNCTION: `__iter__`\n> Signature: `def __iter__(self) -> Iterator[T]`\n> Lines: 253-259\n- @return Iterator yielding items of type T.\n```\n def __iter__(self) -> Iterator[T]:\n yield from self._items\n```\n\n### FUNCTION: `find`\n> Signature: `def find(self, predicate) -> Optional[T]`\n> Lines: 260-271\n- @param predicate Callable accepting T and returning bool.\n- @return The first matching item or None.\n```\n def find(self, predicate) -> Optional[T]:\n for item in self._items:\n if predicate(item):\n return item\n return None\n```\n\n### CLASS: `Renderable`\n> Signature: `class Renderable(Protocol)`\n> Lines: 272-285\n- @brief Structural typing interface for render-capable objects.\n```\nclass Renderable(Protocol):\n def render(self) -> str:\n ...\n```\n\n### FUNCTION: `render`\n> Signature: `def render(self) -> str`\n> Lines: 278-285\n- @brief Structural typing interface for render-capable objects.\n- @return Rendered string output.\n```\n def render(self) -> str:\n ...\n```\n\n### DECORATOR: `property`\n> Lines: 286-286\n```\n@property\n```\n\n### FUNCTION: `regular_function`\n> Signature: `def regular_function(x: int) -> int`\n> Lines: 287-295\n- @param x Input integer value.\n- @return The input value unchanged.\n```\ndef regular_function(x: int) -> int:\n return x\n```\n\n### FUNCTION: `function_with_walrus`\n> Signature: `def function_with_walrus(data: List[int]) -> Optional[int]`\n> Lines: 296-307\n- @param data List of integers to scan.\n- @return The first value greater than 10, or None.\n```\ndef function_with_walrus(data: List[int]) -> Optional[int]:\n if (n := next((x for x in data if x > 10), None)) is not None:\n return n\n return None\n```\n\n### FUNCTION: `multi_return_paths`\n> Signature: `def multi_return_paths(value: int) -> Union[str, int, None]`\n> Lines: 308-325\n- @param value Integer selector for branching logic.\n- @return A string, integer, or None depending on value.\n```\ndef multi_return_paths(value: int) -> Union[str, int, None]:\n match value:\n case 0:\n return \"zero\"\n case n if n < 0:\n return abs(n)\n case n if n > 100:\n return None\n case _:\n return str(value)\n```\n\n### FUNCTION: `generator_function`\n> Signature: `def generator_function(limit: int) -> Iterator[int]`\n> Lines: 326-336\n- @param limit Upper bound (exclusive) for generation. @yield Squared integers from 0 to limit-1.\n```\ndef generator_function(limit: int) -> Iterator[int]:\n for i in range(limit):\n yield i * i\n```\n\n### FUNCTION: `async_generator`\n> Signature: `async def async_generator(items: List[str]) -> AsyncIterator[str]`\n> Lines: 337-347\n- @param items Source strings to process. @yield Upper-cased non-empty strings.\n```\nasync def async_generator(items: List[str]) -> AsyncIterator[str]:\n for item in items:\n if item.strip():\n yield item.upper()\n```\n\n### DECORATOR: `contextmanager`\n> Lines: 348-348\n- @brief Context manager decorator.\n- @see contextlib.contextmanager\n```\n@contextmanager\n```\n\n### FUNCTION: `managed_resource`\n> Signature: `def managed_resource(path: str)`\n> Lines: 349-362\n- @param path File system path to the resource. @yield The opened file handle. @raises IOError If the resource cannot be opened.\n```\ndef managed_resource(path: str):\n f = open(path, \"r\")\n try:\n yield f\n finally:\n f.close()\n```\n\n### FUNCTION: `closure_factory`\n> Signature: `def closure_factory(multiplier: int)`\n> Lines: 363-379\n- @param multiplier The fixed multiplier for the returned function.\n- @return A callable that multiplies input by multiplier.\n```\ndef closure_factory(multiplier: int):\n def inner(x: int) -> int:\n return x * multiplier\n return inner\n```\n\n### FUNCTION: `inner`\n> Signature: `def inner(x: int) -> int`\n> Lines: 369-376\n- @param multiplier The fixed multiplier for the returned function.\n- @param x Value to multiply.\n- @return A callable that multiplies input by multiplier.\n- @return Product of x and the captured multiplier.\n```\n def inner(x: int) -> int:\n return x * multiplier\n```\n\n### FUNCTION: `uses_unpacking`\n> Signature: `def uses_unpacking(*args: int, **kwargs: str) -> Dict[str, Union[int, str]]`\n> Lines: 380-393\n- @param args Positional integer arguments.\n- @param kwargs Named string arguments.\n- @return Combined dictionary of all arguments.\n```\ndef uses_unpacking(*args: int, **kwargs: str) -> Dict[str, Union[int, str]]:\n result: Dict[str, Union[int, str]] = {}\n for i, val in enumerate(args):\n result[f\"arg_{i}\"] = val\n result.update(kwargs)\n return result\n```\n\n### VARIABLE: `EVEN_SQUARES`\n> Signature: `EVEN_SQUARES = [x ** 2 for x in range(20) if x % 2 == 0]`\n> Lines: 398-398\n```\nEVEN_SQUARES = [x ** 2 for x in range(20) if x % 2 == 0]\n```\n\n### FUNCTION: `async_function`\n> Signature: `async def async_function()`\n> Lines: 401-408\n- @brief Minimal async function for testing async detection.\n```\nasync def async_function():\n await asyncio.sleep(0)\n```\n\n### FUNCTION: `deeply_nested_logic`\n> Signature: `def deeply_nested_logic(matrix: List[List[int]]) -> int`\n> Lines: 409-429\n- @param matrix 2D list of integers.\n- @return Cumulative sum of positive even values.\n```\ndef deeply_nested_logic(matrix: List[List[int]]) -> int:\n total = 0\n for row in matrix:\n for val in row:\n if val > 0:\n if val % 2 == 0:\n total += val\n else:\n continue\n else:\n pass\n return total\n```\n\n### FUNCTION: `exception_handling_example`\n> Signature: `def exception_handling_example(path: str) -> Optional[str]`\n> Lines: 430-453\n- @param path File path to attempt reading.\n- @return File contents or None on failure.\n```\ndef exception_handling_example(path: str) -> Optional[str]:\n try:\n with open(path, \"r\") as f:\n content = f.read()\n if not content:\n raise ValueError(\"Empty file\")\n return content\n except FileNotFoundError:\n return None\n except (PermissionError, OSError) as e:\n sys.exit(1)\n except Exception:\n raise\n finally:\n pass\n```\n\n### VARIABLE: `MAX_BATCH`\n> Signature: `MAX_BATCH = 64 # inline extension comment`\n> Lines: 455-455\n```\nMAX_BATCH = 64\n```\n\n### VARIABLE: `CACHE_LIMIT`\n> Signature: `CACHE_LIMIT = 128`\n> Lines: 457-457\n```\nCACHE_LIMIT = 128\n```\n\n### VARIABLE: `MAX_USERS`\n> Signature: `MAX_USERS = 500`\n> Lines: 459-459\n```\nMAX_USERS = 500\n```\n\n### FUNCTION: `req_cover_py_1`\n> Signature: `def req_cover_py_1(value: int) -> int`\n> Lines: 467-469\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\ndef req_cover_py_1(value: int) -> int:\n return value + 1\n```\n\n### FUNCTION: `req_cover_py_2`\n> Signature: `def req_cover_py_2(value: int) -> int`\n> Lines: 475-477\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\ndef req_cover_py_2(value: int) -> int:\n return value + 2\n```\n\n### FUNCTION: `req_cover_py_3`\n> Signature: `def req_cover_py_3(value: int) -> int`\n> Lines: 483-485\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\ndef req_cover_py_3(value: int) -> int:\n return value + 3\n```\n\n### FUNCTION: `req_cover_py_4`\n> Signature: `def req_cover_py_4(value: int) -> int`\n> Lines: 491-493\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\ndef req_cover_py_4(value: int) -> int:\n return value + 4\n```\n\n### FUNCTION: `req_cover_py_5`\n> Signature: `def req_cover_py_5(value: int) -> int`\n> Lines: 499-501\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\ndef req_cover_py_5(value: int) -> int:\n return value + 5\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_ruby.rb | ruby\n\n### IMPORT: `'json'`\n> Lines: 10-10\n```\nrequire 'json'\n```\n\n### IMPORT: `'set'`\n> Lines: 11-11\n```\nrequire 'set'\n```\n\n### IMPORT: `'helper'`\n> Lines: 12-12\n```\nrequire_relative 'helper'\n```\n\n### CONSTANT: `MAX_RETRIES`\n> Signature: `MAX_RETRIES = 42`\n> Lines: 15-15\n- @brief Maximum retry attempts for transient failures.\n```\nMAX_RETRIES = 42\n```\n\n### CONSTANT: `DEFAULT_ENCODING`\n> Signature: `DEFAULT_ENCODING = 'utf-8'.freeze`\n> Lines: 18-18\n- @brief Frozen string constant for default encoding.\n```\nDEFAULT_ENCODING = 'utf-8'.freeze\n```\n\n### DECORATOR: `:name, :age`\n> Lines: 20-20\n```\nattr_accessor :name, :age\n```\n\n### MODULE: `Loggable`\n> Signature: `module Loggable`\n> Lines: 26-39\n- @brief Mixin providing logging capabilities to including classes.\n- @brief Log a message to stdout with the class name prefix.\n- @param message [String] The message to log.\n```\nmodule Loggable\ndef log(message)\nputs \"[#{self.class.name}] #{message}\"\nend\ndef log_error(error)\nputs \"[ERROR] #{error.message}\"\nputs error.backtrace.first(5).join(\"\\n\") if error.backtrace\nend\nend\n```\n\n### FUNCTION: `log`\n> Signature: `def log(message)`\n> Lines: 29-31\n- @brief Log a message to stdout with the class name prefix.\n- @param message [String] The message to log.\n```\ndef log(message)\nputs \"[#{self.class.name}] #{message}\"\nend\n```\n\n### FUNCTION: `log_error`\n> Signature: `def log_error(error)`\n> Lines: 35-38\n- @brief Log an error with backtrace information.\n- @param error [Exception] The exception to log.\n```\ndef log_error(error)\nputs \"[ERROR] #{error.message}\"\nputs error.backtrace.first(5).join(\"\\n\") if error.backtrace\nend\n```\n\n### CLASS: `MyClass`\n> Signature: `class MyClass`\n> Lines: 47-153\n```\nclass MyClass\ninclude Loggable\ninclude Comparable\nattr_accessor :name\nattr_reader :created_at\ndef initialize(name, **options)\n@name = name\n@options = options\n@created_at = Time.now\n@options[:retries] ||= MAX_RETRIES\nend\ndef self.create(attrs)\nnew(attrs[:name], **attrs.except(:name))\nend\ndef self.bulk_create(names)\nnames.map { |n| new(n) }\nend\ndef valid?\n!@name.nil? && !@name.empty?\nend\ndef matches?(pattern)\nreturn false if @name.nil?\npattern.match?(@name)\nend\ndef <=>(other)\n@name <=> other.name\nend\ndef +(other)\nself.class.new(\"#{@name}+#{other.name}\")\nend\ndef to_s\n\"MyClass(#{@name})\"\nend\ndef method_missing(method, *args, &block)\nif method.to_s.start_with?('find_by_')\nfield = method.to_s.sub('find_by_', '')\n\"Finding by #{field}: #{args.first}\"\nelse\nsuper\nend\nend\ndef respond_to_missing?(method, include_private = false)\nmethod.to_s.start_with?('find_by_') || super\nend\nprotected\ndef internal_config\n@options.dup\nend\nprivate\ndef validate!\nraise \"Invalid name\" unless valid?\nend\nend\n```\n\n### DECORATOR: `:name`\n> Lines: 52-52\n- @brief Read/write accessor for the instance name.\n```\nattr_accessor :name\n```\n\n### DECORATOR: `:created_at`\n> Lines: 55-55\n- @brief Read-only accessor for the creation timestamp.\n```\nattr_reader :created_at\n```\n\n### FUNCTION: `initialize`\n> Signature: `def initialize(name, **options)`\n> Lines: 60-66\n- @brief Initialize a new MyClass instance.\n- @param name [String] The instance identifier.\n- @param options [Hash] Optional configuration hash.\n```\ndef initialize(name, **options)\n@name = name\n@options = options\n@created_at = Time.now\n@options[:retries] ||= MAX_RETRIES\nend\n```\n\n### FUNCTION: `create`\n> Signature: `def self.create(attrs)`\n> Lines: 71-73\n- @brief Factory method creating an instance from a hash.\n- @param attrs [Hash] Attribute hash with :name key required.\n- @return [MyClass] A new instance populated from attrs.\n```\ndef self.create(attrs)\nnew(attrs[:name], **attrs.except(:name))\nend\n```\n\n### FUNCTION: `bulk_create`\n> Signature: `def self.bulk_create(names)`\n> Lines: 78-80\n- @brief Build multiple instances from an array of names.\n- @param names [Array<String>] Names to create instances for.\n- @return [Array<MyClass>] Array of new instances.\n```\ndef self.bulk_create(names)\nnames.map { |n| new(n) }\nend\n```\n\n### FUNCTION: `valid?`\n> Signature: `def valid?`\n> Lines: 84-86\n- @brief Predicate checking if the instance is valid.\n- @return [Boolean] True if name is non-empty.\n```\ndef valid?\n!@name.nil? && !@name.empty?\nend\n```\n\n### FUNCTION: `matches?`\n> Signature: `def matches?(pattern)`\n> Lines: 91-94\n- @brief Check if name matches a pattern.\n- @param pattern [Regexp] Regular expression to test against.\n- @return [Boolean] True if name matches the pattern.\n```\ndef matches?(pattern)\nreturn false if @name.nil?\npattern.match?(@name)\nend\n```\n\n### FUNCTION: `to_s`\n> Signature: `def to_s`\n> Lines: 112-114\n- @brief Convert to string representation.\n- @return [String] Human-readable description.\n```\ndef to_s\n\"MyClass(#{@name})\"\nend\n```\n\n### FUNCTION: `method_missing`\n> Signature: `def method_missing(method, *args, &block)`\n> Lines: 121-128\n```\ndef method_missing(method, *args, &block)\nif method.to_s.start_with?('find_by_')\nfield = method.to_s.sub('find_by_', '')\n\"Finding by #{field}: #{args.first}\"\nelse\nsuper\nend\nend\n```\n\n### FUNCTION: `respond_to_missing?`\n> Signature: `def respond_to_missing?(method, include_private = false)`\n> Lines: 134-136\n- @brief Declare which dynamic methods respond_to? should recognize.\n- @param method [Symbol] The method name to check.\n- @param include_private [Boolean] Whether to include private methods.\n- @return [Boolean] True if the method is handled dynamically.\n```\ndef respond_to_missing?(method, include_private = false)\nmethod.to_s.start_with?('find_by_') || super\nend\n```\n\n### FUNCTION: `internal_config`\n> Signature: `def internal_config`\n> Lines: 142-144\n- @brief Protected helper for internal computations.\n- @return [Hash] Current options hash.\n```\ndef internal_config\n@options.dup\nend\n```\n\n### FUNCTION: `validate!`\n> Signature: `def validate!`\n> Lines: 150-152\n```\ndef validate!\nraise \"Invalid name\" unless valid?\nend\n```\n\n### CLASS: `SpecialClass`\n> Signature: `class SpecialClass < MyClass`\n> Lines: 160-174\n- @brief Specialized subclass with additional behavior.\n- @brief Initialize with a priority level.\n- @param name [String] Instance name.\n- @param priority [Integer] Processing priority (lower = first).\n```\nclass SpecialClass < MyClass\ndef initialize(name, priority: 0, **options)\nsuper(name, **options)\n@priority = priority\nend\ndef to_s\n\"SpecialClass(#{@name}, pri=#{@priority})\"\nend\nend\n```\n\n### FUNCTION: `initialize`\n> Signature: `def initialize(name, priority: 0, **options)`\n> Lines: 164-167\n- @brief Initialize with a priority level.\n- @param name [String] Instance name.\n- @param priority [Integer] Processing priority (lower = first).\n```\ndef initialize(name, priority: 0, **options)\nsuper(name, **options)\n@priority = priority\nend\n```\n\n### FUNCTION: `to_s`\n> Signature: `def to_s`\n> Lines: 171-173\n- @brief Override to_s with priority information.\n- @return [String] Description including priority.\n```\ndef to_s\n\"SpecialClass(#{@name}, pri=#{@priority})\"\nend\n```\n\n### MODULE: `MyModule`\n> Signature: `module MyModule`\n> Lines: 180-207\n- @brief Utility module providing helper methods.\n- @brief Module-level helper returning a boolean.\n- @return [Boolean] Always returns true.\n```\nmodule MyModule\ndef helper\ntrue\nend\ndef process_with_block(data)\nif block_given?\nyield(data)\nelse\ndata\nend\nend\ndef self.format_list(items)\nitems.map(&:to_s).join(', ')\nend\nend\n```\n\n### FUNCTION: `helper`\n> Signature: `def helper`\n> Lines: 183-185\n- @brief Module-level helper returning a boolean.\n- @return [Boolean] Always returns true.\n```\ndef helper\ntrue\nend\n```\n\n### FUNCTION: `process_with_block`\n> Signature: `def process_with_block(data)`\n> Lines: 191-197\n- @brief Process data with block yield pattern.\n- @param data [Object] Data to process.\n@yield [Object] Yields data for caller-defined processing.\n- @return [Object] The block's return value or data itself.\n```\ndef process_with_block(data)\nif block_given?\nyield(data)\nelse\ndata\nend\nend\n```\n\n### FUNCTION: `format_list`\n> Signature: `def self.format_list(items)`\n> Lines: 204-206\n- @brief Utility function accessible without mixing in.\n- @param items [Array] Items to format.\n- @return [String] Comma-separated formatted string.\n```\ndef self.format_list(items)\nitems.map(&:to_s).join(', ')\nend\n```\n\n### FUNCTION: `distance_from_origin`\n> Signature: `def distance_from_origin`\n> Lines: 216-218\n- @brief Compute the Euclidean distance from origin.\n- @return [Float] Distance from (0, 0).\n```\ndef distance_from_origin\nMath.sqrt(x**2 + y**2)\nend\n```\n\n### CLASS: `DynamicModel`\n> Signature: `class DynamicModel`\n> Lines: 225-238\n- @brief Demonstrates metaprogramming with define_method.\n- @brief Dynamically defined getter for #{field}.\n```\nclass DynamicModel\n%w[title body author].each do |field|\ndefine_method(field) do\ninstance_variable_get(\"@#{field}\")\nend\ndefine_method(\"#{field}=\") do |value|\ninstance_variable_set(\"@#{field}\", value)\nend\nend\nend\n```\n\n### FUNCTION: `with_retry`\n> Signature: `def with_retry(attempts: MAX_RETRIES)`\n> Lines: 255-268\n```\ndef with_retry(attempts: MAX_RETRIES)\ntries = 0\nbegin\ntries += 1\nyield\nrescue StandardError => e\nretry if tries < attempts\nraise \"Failed after #{attempts} attempts: #{e.message}\"\nensure\nputs \"Completed after #{tries} attempt(s)\"\nend\nend\n```\n\n### MODULE: `StringExtensions`\n> Signature: `module StringExtensions`\n> Lines: 274-282\n- @brief Refinement adding utility methods to String.\n- @brief Check if the string is a valid email address.\n- @return [Boolean] True if string matches email pattern.\n```\nmodule StringExtensions\nrefine String do\ndef email?\nmatch?(/\\A[\\w+\\-.]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)*\\.[a-z]+\\z/i)\nend\nend\nend\n```\n\n### FUNCTION: `email?`\n> Signature: `def email?`\n> Lines: 278-280\n- @brief Check if the string is a valid email address.\n- @return [Boolean] True if string matches email pattern.\n```\ndef email?\nmatch?(/\\A[\\w+\\-.]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)*\\.[a-z]+\\z/i)\nend\n```\n\n### CLASS: `ServiceObject`\n> Signature: `class ServiceObject; end # inline class comment`\n> Lines: 287-307\n```\nclass ServiceObject; end\nclass ReportBuilder; end\nmodule Metrics; end\nmodule Extras; end\nMAX_LIMIT = 100\nAPI_VERSION = \"v2\"\nCACHE_SIZE = 1024\nattr_writer :token\nattr_reader :state\nrequire 'yaml'\nrequire 'logger'\ndef req_cover_ruby_1(value)\nvalue + 1\nend\n```\n\n### CLASS: `ReportBuilder`\n> Signature: `class ReportBuilder; end`\n> Lines: 288-307\n```\nclass ReportBuilder; end\nmodule Metrics; end\nmodule Extras; end\nMAX_LIMIT = 100\nAPI_VERSION = \"v2\"\nCACHE_SIZE = 1024\nattr_writer :token\nattr_reader :state\nrequire 'yaml'\nrequire 'logger'\ndef req_cover_ruby_1(value)\nvalue + 1\nend\n```\n\n### MODULE: `Metrics`\n> Signature: `module Metrics; end`\n> Lines: 289-307\n```\nmodule Metrics; end\nmodule Extras; end\nMAX_LIMIT = 100\nAPI_VERSION = \"v2\"\nCACHE_SIZE = 1024\nattr_writer :token\nattr_reader :state\nrequire 'yaml'\nrequire 'logger'\ndef req_cover_ruby_1(value)\nvalue + 1\nend\n```\n\n### MODULE: `Extras`\n> Signature: `module Extras; end`\n> Lines: 290-307\n```\nmodule Extras; end\nMAX_LIMIT = 100\nAPI_VERSION = \"v2\"\nCACHE_SIZE = 1024\nattr_writer :token\nattr_reader :state\nrequire 'yaml'\nrequire 'logger'\ndef req_cover_ruby_1(value)\nvalue + 1\nend\n```\n\n### CONSTANT: `MAX_LIMIT`\n> Signature: `MAX_LIMIT = 100`\n> Lines: 291-291\n```\nMAX_LIMIT = 100\n```\n\n### CONSTANT: `API_VERSION`\n> Signature: `API_VERSION = \"v2\"`\n> Lines: 292-292\n```\nAPI_VERSION = \"v2\"\n```\n\n### CONSTANT: `CACHE_SIZE`\n> Signature: `CACHE_SIZE = 1024`\n> Lines: 293-293\n```\nCACHE_SIZE = 1024\n```\n\n### DECORATOR: `:token`\n> Lines: 294-294\n```\nattr_writer :token\n```\n\n### DECORATOR: `:state`\n> Lines: 295-295\n```\nattr_reader :state\n```\n\n### IMPORT: `'yaml'`\n> Lines: 296-296\n```\nrequire 'yaml'\n```\n\n### IMPORT: `'logger'`\n> Lines: 297-297\n```\nrequire 'logger'\n```\n\n### FUNCTION: `req_cover_ruby_1`\n> Signature: `def req_cover_ruby_1(value)`\n> Lines: 305-307\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\ndef req_cover_ruby_1(value)\nvalue + 1\nend\n```\n\n### FUNCTION: `req_cover_ruby_2`\n> Signature: `def req_cover_ruby_2(value)`\n> Lines: 314-316\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\ndef req_cover_ruby_2(value)\nvalue + 2\nend\n```\n\n### FUNCTION: `req_cover_ruby_3`\n> Signature: `def req_cover_ruby_3(value)`\n> Lines: 323-325\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\ndef req_cover_ruby_3(value)\nvalue + 3\nend\n```\n\n### FUNCTION: `req_cover_ruby_4`\n> Signature: `def req_cover_ruby_4(value)`\n> Lines: 332-334\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\ndef req_cover_ruby_4(value)\nvalue + 4\nend\n```\n\n### FUNCTION: `req_cover_ruby_5`\n> Signature: `def req_cover_ruby_5(value)`\n> Lines: 341-343\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\ndef req_cover_ruby_5(value)\nvalue + 5\nend\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_rust.rs | rust\n\n### IMPORT: `std::io`\n> Lines: 9-9\n```\nuse std::io;\n```\n\n### IMPORT: `std::collections::HashMap`\n> Lines: 10-10\n```\nuse std::collections::HashMap;\n```\n\n### IMPORT: `std::fmt::{self, Display, Formatter}`\n> Lines: 11-11\n```\nuse std::fmt::{self, Display, Formatter};\n```\n\n### IMPORT: `std::sync::{Arc, Mutex}`\n> Lines: 12-12\n```\nuse std::sync::{Arc, Mutex};\n```\n\n### DECORATOR: `derive(Debug, Clone, PartialEq)`\n> Lines: 19-19\n- @brief Holds a single i32 field with Debug/Clone derives.\n```\n#[derive(Debug, Clone, PartialEq)]\n```\n\n### STRUCT: `MyStruct`\n> Signature: `pub struct MyStruct`\n> Lines: 20-23\n- @brief Primary integer field.\n```\npub struct MyStruct {\nfield: i32,\n}\n```\n\n### DECORATOR: `derive(Debug)`\n> Lines: 29-29\n```\n#[derive(Debug)]\n```\n\n### STRUCT: `BorrowedData`\n> Signature: `pub struct BorrowedData<'a>`\n> Lines: 30-35\n- @brief Reference to externally-owned string data.\n- @brief Numeric tag for identification.\n```\npub struct BorrowedData<'a> {\ncontent: &'a str,\ntag: u64,\n}\n```\n\n### STRUCT: `TypedMap`\n> Signature: `pub struct TypedMap<K: std::hash::Hash + Eq, V: Clone>`\n> Lines: 41-44\n- @brief Internal hash map storage.\n```\npub struct TypedMap<K: std::hash::Hash + Eq, V: Clone> {\ninner: HashMap<K, V>,\n}\n```\n\n### ENUM: `MyEnum`\n> Signature: `pub enum MyEnum`\n> Lines: 51-58\n- @brief Represents either structured data, a simple flag, or a pair.\n- @brief Unit variant carrying no data.\n- @brief Tuple variant holding a string payload.\n```\npub enum MyEnum {\nA,\nB(String),\nC { x: i32, y: i32 },\n}\n```\n\n### TRAIT: `MyTrait`\n> Signature: `pub trait MyTrait`\n> Lines: 65-79\n- @brief Implementors must provide both sync and optional async execution.\n```\npub trait MyTrait {\nfn do_work(&self);\nfn do_work_with_ctx(&self, ctx: &str) -> bool {\nprintln!(\"ctx: {}\", ctx);\nself.do_work();\ntrue\n}\n}\n```\n\n### FUNCTION: `do_work`\n> Signature: `fn do_work(&self)`\n> Lines: 67-78\n```\nfn do_work(&self);\nfn do_work_with_ctx(&self, ctx: &str) -> bool {\nprintln!(\"ctx: {}\", ctx);\nself.do_work();\ntrue\n}\n```\n\n### FUNCTION: `do_work_with_ctx`\n> Signature: `fn do_work_with_ctx(&self, ctx: &str) -> bool`\n> Lines: 73-78\n- @param ctx Contextual string passed to the implementation.\n- @return True if work completed successfully.\n```\nfn do_work_with_ctx(&self, ctx: &str) -> bool {\nprintln!(\"ctx: {}\", ctx);\nself.do_work();\ntrue\n}\n```\n\n### TRAIT: `Parser`\n> Signature: `pub trait Parser<'a>`\n> Lines: 85-94\n- @brief The output type produced by parsing.\n```\npub trait Parser<'a> {\ntype Output;\nfn parse(&self, input: &'a [u8]) -> Result<Self::Output, io::Error>;\n}\n```\n\n### TYPE_ALIAS: `Output`\n> Signature: `type Output`\n> Lines: 87-87\n- @brief The output type produced by parsing.\n```\ntype Output;\n```\n\n### FUNCTION: `parse`\n> Signature: `fn parse(&self, input: &'a [u8]) -> Result<Self::Output, io::Error>`\n> Lines: 93-96\n- @param input Byte slice to parse.\n- @return Parsed output or an IO error.\n```\nfn parse(&self, input: &'a [u8]) -> Result<Self::Output, io::Error>;\n}\nimpl MyStruct {\n```\n\n### IMPL: `MyStruct`\n> Signature: `impl MyStruct`\n> Lines: 96-132\n- @return A MyStruct with field initialized to 0.\n```\nimpl MyStruct {\nfn new() -> Self {\nSelf { field: 0 }\n}\npub fn with_value(val: i32) -> Self {\nSelf { field: val }\n}\npub fn value(&self) -> i32 {\nself.field\n}\npub fn try_update(&mut self, new_val: i32) -> Option<i32> {\nif new_val == self.field {\nreturn None;\n}\nlet old = self.field;\nself.field = new_val;\nSome(old)\n}\n}\n```\n\n### FUNCTION: `new`\n> Signature: `fn new() -> Self`\n> Lines: 100-102\n- @return A MyStruct with field initialized to 0.\n```\nfn new() -> Self {\nSelf { field: 0 }\n}\n```\n\n### FUNCTION: `with_value`\n> Signature: `pub fn with_value(val: i32) -> Self`\n> Lines: 108-110\n- @param val The initial field value.\n- @return A new MyStruct.\n```\npub fn with_value(val: i32) -> Self {\nSelf { field: val }\n}\n```\n\n### FUNCTION: `value`\n> Signature: `pub fn value(&self) -> i32`\n> Lines: 115-117\n- @return The stored integer.\n```\npub fn value(&self) -> i32 {\nself.field\n}\n```\n\n### FUNCTION: `try_update`\n> Signature: `pub fn try_update(&mut self, new_val: i32) -> Option<i32>`\n> Lines: 123-131\n- @param new_val New value to set.\n- @return Old value if updated, None if new_val equals current.\n```\npub fn try_update(&mut self, new_val: i32) -> Option<i32> {\nif new_val == self.field {\nreturn None;\n}\nlet old = self.field;\nself.field = new_val;\nSome(old)\n}\n```\n\n### IMPL: `MyStruct`\n> Signature: `impl MyTrait for MyStruct`\n> Lines: 134-139\n```\nimpl MyTrait for MyStruct {\nfn do_work(&self) {\nprintln!(\"{:?}\", self);\n}\n}\n```\n\n### FUNCTION: `do_work`\n> Signature: `fn do_work(&self)`\n> Lines: 136-138\n```\nfn do_work(&self) {\nprintln!(\"{:?}\", self);\n}\n```\n\n### IMPL: `MyStruct`\n> Signature: `impl Display for MyStruct`\n> Lines: 141-149\n- @param f Formatter to write into.\n```\nimpl Display for MyStruct {\nfn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\nwrite!(f, \"MyStruct({})\", self.field)\n}\n}\n```\n\n### FUNCTION: `fmt`\n> Signature: `fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result`\n> Lines: 146-148\n- @param f Formatter to write into.\n- @return fmt::Result indicating success or failure.\n```\nfn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\nwrite!(f, \"MyStruct({})\", self.field)\n}\n```\n\n### IMPL: `TypedMap`\n> Signature: `impl<K, V> TypedMap<K, V>`\n> Lines: 153-177\n```\nimpl<K, V> TypedMap<K, V>\nwhere\nK: std::hash::Hash + Eq + Display,\nV: Clone + Default,\n{\npub fn insert(&mut self, key: K, value: V) -> Option<V> {\nself.inner.insert(key, value)\n}\npub fn get_or_default(&self, key: &K) -> V {\nmatch self.inner.get(key) {\nSome(v) => v.clone(),\nNone => V::default(),\n}\n}\n}\n```\n\n### FUNCTION: `insert`\n> Signature: `pub fn insert(&mut self, key: K, value: V) -> Option<V>`\n> Lines: 163-165\n- @param key The lookup key.\n- @param value The value to associate with the key.\n- @return Previous value for this key, or None.\n```\npub fn insert(&mut self, key: K, value: V) -> Option<V> {\nself.inner.insert(key, value)\n}\n```\n\n### FUNCTION: `get_or_default`\n> Signature: `pub fn get_or_default(&self, key: &K) -> V`\n> Lines: 171-176\n- @param key The key to look up.\n- @return Cloned value if found, or the default for V.\n```\npub fn get_or_default(&self, key: &K) -> V {\nmatch self.inner.get(key) {\nSome(v) => v.clone(),\nNone => V::default(),\n}\n}\n```\n\n### MODULE: `my_module`\n> Signature: `pub mod my_module`\n> Lines: 182-189\n- @brief Sub-module containing utility helpers.\n- @brief Inline module with pub(crate) scoped items.\n```\npub mod my_module;\npub(crate) mod internal {\npub(crate) static COUNTER: std::sync::atomic::AtomicUsize =\nstd::sync::atomic::AtomicUsize::new(0);\n}\n```\n\n### MODULE: `internal`\n> Signature: `pub(crate) mod internal`\n> Lines: 185-189\n- @brief Inline module with pub(crate) scoped items.\n```\npub(crate) mod internal {\npub(crate) static COUNTER: std::sync::atomic::AtomicUsize =\nstd::sync::atomic::AtomicUsize::new(0);\n}\n```\n\n### CONSTANT: `COUNTER`\n> Signature: `pub(crate) static COUNTER: std::sync::atomic::AtomicUsize =`\n> Lines: 187-187\n```\npub(crate) static COUNTER: std::sync::atomic::AtomicUsize =\n```\n\n### MACRO: `hashmap`\n> Signature: `macro_rules! hashmap`\n> Lines: 196-196\n- @brief Usage: `hashmap!{ \"a\" => 1, \"b\" => 2 }`.\n```\nmacro_rules! hashmap {\n```\n\n### MACRO: `my_macro`\n> Signature: `macro_rules! my_macro`\n> Lines: 205-205\n```\nmacro_rules! my_macro {\n```\n\n### CONSTANT: `MY_CONST`\n> Signature: `const MY_CONST: i32 = 42`\n> Lines: 217-217\n- @brief Compile-time constant for maximum retry attempts.\n```\nconst MY_CONST: i32 = 42;\n```\n\n### CONSTANT: `MY_STATIC`\n> Signature: `static MY_STATIC: i32 = 0`\n> Lines: 220-220\n- @brief Mutable static requiring unsafe access.\n```\nstatic MY_STATIC: i32 = 0;\n```\n\n### CONSTANT: `CONFIG`\n> Signature: `static CONFIG: std::sync::LazyLock<HashMap<String, String>> =`\n> Lines: 223-223\n- @brief Thread-safe lazy-initialized global configuration.\n```\nstatic CONFIG: std::sync::LazyLock<HashMap<String, String>> =\n```\n\n### TYPE_ALIAS: `IoResult`\n> Signature: `pub type IoResult<T> = Result<T, io::Error>`\n> Lines: 229-229\n- @brief Alias for a common Result type with IO errors.\n```\npub type IoResult<T> = Result<T, io::Error>;\n```\n\n### TYPE_ALIAS: `MyAlias`\n> Signature: `pub type MyAlias = i32`\n> Lines: 232-232\n- @brief Simple integer alias.\n```\npub type MyAlias = i32;\n```\n\n### FUNCTION: `my_function`\n> Signature: `pub fn my_function(input: Option<&str>) -> String`\n> Lines: 240-249\n- @param input Optional string to evaluate.\n- @return Processed string or a fallback default.\n```\npub fn my_function(input: Option<&str>) -> String {\nlet text = match input {\nSome(s) if !s.is_empty() => s,\nSome(_) => return String::from(\"empty\"),\nNone => return String::from(\"none\"),\n};\ntext.to_uppercase()\n}\n```\n\n### FUNCTION: `async_function`\n> Signature: `pub async fn async_function() -> String`\n> Lines: 254-257\n- @return A greeting string after async computation.\n```\npub async fn async_function() -> String {\nString::from(\"hello async\")\n}\n```\n\n### FUNCTION: `filter_with`\n> Signature: `pub fn filter_with<F>(items: &[i32], predicate: F) -> Vec<i32>`\n> Lines: 264-269\n- @param items Slice of integers to filter.\n- @param predicate Closure returning true for items to keep.\n- @return Vector of items passing the predicate.\n```\npub fn filter_with<F>(items: &[i32], predicate: F) -> Vec<i32>\nwhere\nF: Fn(&i32) -> bool,\n{\nitems.iter().copied().filter(|x| predicate(x)).collect()\n}\n```\n\n### FUNCTION: `create_worker`\n> Signature: `pub fn create_worker(use_struct: bool) -> Box<dyn MyTrait>`\n> Lines: 275-281\n- @param use_struct If true, returns MyStruct; otherwise panics.\n- @return A heap-allocated trait object implementing MyTrait.\n```\npub fn create_worker(use_struct: bool) -> Box<dyn MyTrait> {\nif use_struct {\nBox::new(MyStruct::new())\n} else {\npanic!(\"No alternative implementation available\");\n}\n}\n```\n\n### FUNCTION: `read_raw`\n> Signature: `pub unsafe fn read_raw(ptr: *const i32) -> i32`\n> Lines: 288-291\n- @param ptr Raw pointer to an i32 value.\n- @return The value pointed to by ptr.\n- @sa fety Caller must ensure ptr is valid and aligned.\n```\npub unsafe fn read_raw(ptr: *const i32) -> i32 {\n*ptr\n}\n```\n\n### FUNCTION: `ffi_double`\n> Signature: `pub extern \"C\" fn ffi_double(x: i32) -> i32`\n> Lines: 297-299\n- @param x Integer to double.\n- @return The input multiplied by 2.\n```\npub extern \"C\" fn ffi_double(x: i32) -> i32 {\nx * 2\n}\n```\n\n### FUNCTION: `describe_enum`\n> Signature: `pub fn describe_enum(val: &MyEnum) -> String`\n> Lines: 305-315\n- @param val An enum variant to match against.\n- @return A description string for the matched variant.\n```\npub fn describe_enum(val: &MyEnum) -> String {\nmatch val {\nMyEnum::A => String::from(\"unit\"),\nMyEnum::B(s) => format!(\"string: {}\", s),\nMyEnum::C { x, y } => {\nlet mag = ((x * x + y * y) as f64).sqrt();\nformat!(\"point({}, {}) mag={:.2}\", x, y, mag)\n}\n}\n}\n```\n\n### IMPORT: `std::time::Duration`\n> Lines: 318-318\n```\nuse std::time::Duration;\n```\n\n### MODULE: `ext_tools`\n> Signature: `pub mod ext_tools { pub fn id() -> i32 { 1 } }`\n> Lines: 319-319\n```\npub mod ext_tools { pub fn id() -> i32 { 1 } }\n```\n\n### MODULE: `ext_local`\n> Signature: `mod ext_local { pub fn ping() -> i32 { 2 } }`\n> Lines: 320-320\n```\nmod ext_local { pub fn ping() -> i32 { 2 } }\n```\n\n### MODULE: `ext_api`\n> Signature: `pub mod ext_api { pub fn pong() -> i32 { 3 } }`\n> Lines: 321-321\n```\npub mod ext_api { pub fn pong() -> i32 { 3 } }\n```\n\n### DECORATOR: `inline`\n> Lines: 322-322\n```\n#[inline]\n```\n\n### DECORATOR: `allow(dead_code)`\n> Lines: 323-323\n```\n#[allow(dead_code)]\n```\n\n### DECORATOR: `cfg(test)`\n> Lines: 324-324\n```\n#[cfg(test)]\n```\n\n### ENUM: `Status`\n> Signature: `pub enum Status { Ready, Busy }`\n> Lines: 325-325\n```\npub enum Status { Ready, Busy }\n```\n\n### ENUM: `Mode`\n> Signature: `pub enum Mode { Alpha, Beta }`\n> Lines: 326-326\n```\npub enum Mode { Alpha, Beta }\n```\n\n### ENUM: `Signal`\n> Signature: `pub enum Signal { On, Off }`\n> Lines: 327-327\n```\npub enum Signal { On, Off }\n```\n\n### ENUM: `ErrorKind`\n> Signature: `pub enum ErrorKind { Io, Parse }`\n> Lines: 328-328\n```\npub enum ErrorKind { Io, Parse }\n```\n\n### STRUCT: `ExtraNode`\n> Signature: `pub struct ExtraNode { pub id: i32 }`\n> Lines: 329-329\n```\npub struct ExtraNode { pub id: i32 }\n```\n\n### STRUCT: `InnerNode`\n> Signature: `struct InnerNode { id: i32 }`\n> Lines: 330-330\n```\nstruct InnerNode { id: i32 }\n```\n\n### TRAIT: `Inspectable`\n> Signature: `pub trait Inspectable { fn inspect(&self) -> i32; }`\n> Lines: 331-331\n```\npub trait Inspectable { fn inspect(&self) -> i32; }\n```\n\n### TRAIT: `Named`\n> Signature: `trait Named { fn name(&self) -> &'static str; }`\n> Lines: 332-332\n```\ntrait Named { fn name(&self) -> &'static str; }\n```\n\n### TRAIT: `Executable`\n> Signature: `pub trait Executable { fn exec(&self) -> i32; }`\n> Lines: 333-333\n```\npub trait Executable { fn exec(&self) -> i32; }\n```\n\n### IMPL: `ExtraNode`\n> Signature: `impl Inspectable for ExtraNode { fn inspect(&self) -> i32 { self.id } }`\n> Lines: 334-334\n```\nimpl Inspectable for ExtraNode { fn inspect(&self) -> i32 { self.id } }\n```\n\n### IMPL: `InnerNode`\n> Signature: `impl Named for InnerNode { fn name(&self) -> &'static str { \"inner\" } }`\n> Lines: 335-335\n```\nimpl Named for InnerNode { fn name(&self) -> &'static str { \"inner\" } }\n```\n\n### IMPL: `MyEnum`\n> Signature: `impl Executable for MyEnum { fn exec(&self) -> i32 { 1 } }`\n> Lines: 336-336\n```\nimpl Executable for MyEnum { fn exec(&self) -> i32 { 1 } }\n```\n\n### MACRO: `ext_macro`\n> Signature: `macro_rules! ext_macro { () => { 42 } }`\n> Lines: 337-337\n```\nmacro_rules! ext_macro { () => { 42 } }\n```\n\n### MACRO: `trace_macro`\n> Signature: `macro_rules! trace_macro { ($v:expr) => { $v }; }`\n> Lines: 338-338\n```\nmacro_rules! trace_macro { ($v:expr) => { $v }; }\n```\n\n### MACRO: `build_pair`\n> Signature: `macro_rules! build_pair { ($a:expr,$b:expr) => { ($a,$b) }; }`\n> Lines: 339-339\n```\nmacro_rules! build_pair { ($a:expr,$b:expr) => { ($a,$b) }; }\n```\n\n### CONSTANT: `LIMIT`\n> Signature: `pub const LIMIT: usize = 8`\n> Lines: 340-340\n```\npub const LIMIT: usize = 8;\n```\n\n### TYPE_ALIAS: `ItemId`\n> Signature: `pub type ItemId = u64`\n> Lines: 341-341\n```\npub type ItemId = u64;\n```\n\n### TYPE_ALIAS: `AliasValue`\n> Signature: `type AliasValue = i32`\n> Lines: 342-342\n```\ntype AliasValue = i32;\n```\n\n### FUNCTION: `req_cover_rust_1`\n> Signature: `fn req_cover_rust_1(value: i32) -> i32 { value + 1 }`\n> Lines: 350-350\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\nfn req_cover_rust_1(value: i32) -> i32 { value + 1 }\n```\n\n### FUNCTION: `req_cover_rust_2`\n> Signature: `fn req_cover_rust_2(value: i32) -> i32 { value + 2 }`\n> Lines: 357-357\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\nfn req_cover_rust_2(value: i32) -> i32 { value + 2 }\n```\n\n### FUNCTION: `req_cover_rust_3`\n> Signature: `fn req_cover_rust_3(value: i32) -> i32 { value + 3 }`\n> Lines: 364-364\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\nfn req_cover_rust_3(value: i32) -> i32 { value + 3 }\n```\n\n### FUNCTION: `req_cover_rust_4`\n> Signature: `fn req_cover_rust_4(value: i32) -> i32 { value + 4 }`\n> Lines: 371-371\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\nfn req_cover_rust_4(value: i32) -> i32 { value + 4 }\n```\n\n### FUNCTION: `req_cover_rust_5`\n> Signature: `fn req_cover_rust_5(value: i32) -> i32 { value + 5 }`\n> Lines: 378-378\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\nfn req_cover_rust_5(value: i32) -> i32 { value + 5 }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_scala.scala | scala\n- @brief Comprehensive Scala test fixture for parser validation.\n- @details Covers implicits/givens, pattern matching, higher-kinded types,\nself-types, variance, opaque types, extension methods, enums,\nfor comprehensions, and cake pattern.\n\n### IMPORT: `scala.collection.mutable`\n> Lines: 11-11\n```\nimport scala.collection.mutable\n```\n\n### IMPORT: `scala.concurrent.{Future, ExecutionContext}`\n> Lines: 12-12\n```\nimport scala.concurrent.{Future, ExecutionContext}\n```\n\n### IMPORT: `scala.util.{Try, Success, Failure}`\n> Lines: 13-13\n```\nimport scala.util.{Try, Success, Failure}\n```\n\n### CLASS: `Person`\n> Signature: `case class Person(name: String, age: Int)`\n> Lines: 23-35\n- @brief Immutable data class for person entities.\n- @brief Check if the person is an adult.\n- @param name Display name.\n- @param age Age in years; must be non-negative.\n- @return True if age >= 18.\n```\ncase class Person(name: String, age: Int) {\ndef isAdult: Boolean = age >= 18\ndef greet: String = s\"Hi, I'm $name, age $age\"\n}\n```\n\n### FUNCTION: `isAdult`\n> Signature: `def isAdult: Boolean = age >= 18`\n> Lines: 28-43\n- @brief Check if the person is an adult.\n- @brief Create a greeting string.\n- @return True if age >= 18.\n- @return Formatted greeting including name and age.\n```\ndef isAdult: Boolean = age >= 18\ndef greet: String = s\"Hi, I'm $name, age $age\"\n}\nsealed trait Shape {\n```\n\n### FUNCTION: `greet`\n> Signature: `def greet: String = s\"Hi, I'm $name, age $age\"`\n> Lines: 34-43\n- @brief Create a greeting string.\n- @return Formatted greeting including name and age.\n```\ndef greet: String = s\"Hi, I'm $name, age $age\"\n}\nsealed trait Shape {\n```\n\n### FUNCTION: `area`\n> Signature: `def area: Double`\n> Lines: 48-56\n- @brief Compute the area of this shape.\n- @brief Circle shape with radius.\n- @param radius The circle's radius.\n- @return Area as a Double.\n```\ndef area: Double\n}\ncase class Circle(radius: Double) extends Shape {\n```\n\n### CLASS: `Circle`\n> Signature: `case class Circle(radius: Double) extends Shape`\n> Lines: 56-58\n- @brief Circle shape with radius.\n- @param radius The circle's radius.\n```\ncase class Circle(radius: Double) extends Shape {\noverride def area: Double = math.Pi * radius * radius\n}\n```\n\n### FUNCTION: `area`\n> Signature: `override def area: Double = math.Pi * radius * radius`\n> Lines: 57-66\n- @brief Rectangle shape with width and height.\n- @param width The rectangle's width.\n- @param height The rectangle's height.\n```\noverride def area: Double = math.Pi * radius * radius\n}\ncase class Rectangle(width: Double, height: Double) extends Shape {\n```\n\n### CLASS: `Rectangle`\n> Signature: `case class Rectangle(width: Double, height: Double) extends Shape`\n> Lines: 66-68\n- @brief Rectangle shape with width and height.\n- @param width The rectangle's width.\n- @param height The rectangle's height.\n```\ncase class Rectangle(width: Double, height: Double) extends Shape {\noverride def area: Double = width * height\n}\n```\n\n### FUNCTION: `area`\n> Signature: `override def area: Double = width * height`\n> Lines: 67-76\n```\noverride def area: Double = width * height\n}\nabstract class Animal {\n```\n\n### CLASS: `Animal`\n> Signature: `abstract class Animal`\n> Lines: 76-88\n- @brief Abstract base class for animals with sound production.\n- @brief The sound this animal makes.\n- @return Sound description string.\n```\nabstract class Animal {\ndef sound: String\ndef describe: String = s\"I am a ${getClass.getSimpleName} and I say $sound\"\n}\n```\n\n### FUNCTION: `sound`\n> Signature: `def sound: String`\n> Lines: 81-87\n- @brief The sound this animal makes.\n- @brief Describe the animal including its sound.\n- @return Sound description string.\n- @return Formatted description string.\n```\ndef sound: String\ndef describe: String = s\"I am a ${getClass.getSimpleName} and I say $sound\"\n```\n\n### FUNCTION: `describe`\n> Signature: `def describe: String = s\"I am a ${getClass.getSimpleName} and I say $sound\"`\n> Lines: 87-87\n- @brief Describe the animal including its sound.\n- @return Formatted description string.\n```\ndef describe: String = s\"I am a ${getClass.getSimpleName} and I say $sound\"\n```\n\n### TRAIT: `Drawable`\n> Signature: `trait Drawable`\n> Lines: 96-102\n- @brief Trait for rendering objects to string representation.\n- @brief Draw the object as a string.\n- @return Rendered string representation.\n```\ntrait Drawable {\ndef draw(): Unit\n}\n```\n\n### FUNCTION: `draw`\n> Signature: `def draw(): Unit`\n> Lines: 101-109\n- @brief Draw the object as a string.\n- @brief Self-type trait requiring Drawable to be mixed in.\n- @details Demonstrates the cake pattern for dependency injection.\n- @return Rendered string representation.\n```\ndef draw(): Unit\n}\ntrait Logging { self: Drawable =>\n```\n\n### TRAIT: `Logging`\n> Signature: `trait Logging { self: Drawable =>`\n> Lines: 109-117\n- @brief Self-type trait requiring Drawable to be mixed in.\n- @brief Log the drawing operation and then draw.\n- @details Demonstrates the cake pattern for dependency injection.\n```\ntrait Logging { self: Drawable =>\ndef logAndDraw(): Unit = {\nprintln(\"About to draw\")\ndraw()\n}\n}\n```\n\n### FUNCTION: `logAndDraw`\n> Signature: `def logAndDraw(): Unit =`\n> Lines: 113-116\n- @brief Log the drawing operation and then draw.\n```\ndef logAndDraw(): Unit = {\nprintln(\"About to draw\")\ndraw()\n}\n```\n\n### TRAIT: `Serializable`\n> Signature: `trait Serializable`\n> Lines: 123-129\n- @brief Trait for objects convertible to byte arrays.\n- @brief Serialize this object to bytes.\n- @return Byte array representation.\n```\ntrait Serializable {\ndef serialize: Array[Byte]\n}\n```\n\n### FUNCTION: `serialize`\n> Signature: `def serialize: Array[Byte]`\n> Lines: 128-137\n- @brief Serialize this object to bytes.\n- @return Byte array representation.\n```\ndef serialize: Array[Byte]\n}\nobject Main {\n```\n\n### MODULE: `Main`\n> Signature: `object Main`\n> Lines: 137-192\n- @brief Application entry point and utility function container.\n- @brief Application entry point.\n- @param args Command-line arguments.\n```\nobject Main {\ndef main(args: Array[String]): Unit = {\nval people = List(Person(\"Alice\", 30), Person(\"Bob\", 17))\nval adults = people.filter(_.isAdult)\nadults.foreach(p => println(p.greet))\n}\noverride def toString: String = \"Main\"\nval pi = 3.14159265\nvar counter = 0\ntype StringList = List[String]\ntype Transformer[A] = A => A\ndef describeShape(shape: Shape): String = shape match {\ncase Circle(r) => s\"Circle with radius $r, area=${shape.area}\"\ncase Rectangle(w, h) => s\"Rectangle ${w}x${h}, area=${shape.area}\"\n}\ndef classify(x: Int): String = x match {\ncase 0 => \"zero\"\ncase n if n < 0 => \"negative\"\ncase n if n > 100 => \"large\"\ncase _ => \"positive\"\n}\n}\n```\n\n### FUNCTION: `main`\n> Signature: `def main(args: Array[String]): Unit =`\n> Lines: 142-147\n- @brief Application entry point.\n- @param args Command-line arguments.\n```\ndef main(args: Array[String]): Unit = {\nval people = List(Person(\"Alice\", 30), Person(\"Bob\", 17))\nval adults = people.filter(_.isAdult)\nadults.foreach(p => println(p.greet))\n}\n```\n\n### CONSTANT: `people`\n> Signature: `val people = List(Person(\"Alice\", 30), Person(\"Bob\", 17))`\n> Lines: 143-143\n```\nval people = List(Person(\"Alice\", 30), Person(\"Bob\", 17))\n```\n\n### CONSTANT: `adults`\n> Signature: `val adults = people.filter(_.isAdult)`\n> Lines: 145-145\n```\nval adults = people.filter(_.isAdult)\n```\n\n### FUNCTION: `toString`\n> Signature: `override def toString: String = \"Main\"`\n> Lines: 153-179\n- @brief Override toString for Main object display.\n- @brief Mathematical constant pi.\n- @return String representation.\n```\noverride def toString: String = \"Main\"\nval pi = 3.14159265\nvar counter = 0\ntype StringList = List[String]\ntype Transformer[A] = A => A\ndef describeShape(shape: Shape): String = shape match {\ncase Circle(r) => s\"Circle with radius $r, area=${shape.area}\"\ncase Rectangle(w, h) => s\"Rectangle ${w}x${h}, area=${shape.area}\"\n}\n```\n\n### CONSTANT: `pi`\n> Signature: `val pi = 3.14159265`\n> Lines: 156-156\n- @brief Mathematical constant pi. */\n```\nval pi = 3.14159265\n```\n\n### VARIABLE: `counter`\n> Signature: `var counter = 0`\n> Lines: 159-159\n- @brief Mutable counter for tracking operations. */\n```\nvar counter = 0\n```\n\n### TYPE_ALIAS: `StringList`\n> Signature: `type StringList = List[String]`\n> Lines: 164-164\n- @brief Type alias for lists of strings.\n```\ntype StringList = List[String]\n```\n\n### TYPE_ALIAS: `Transformer`\n> Signature: `type Transformer[A] = A => A`\n> Lines: 169-169\n- @brief Type alias for function transformers.\n```\ntype Transformer[A] = A => A\n```\n\n### FUNCTION: `describeShape`\n> Signature: `def describeShape(shape: Shape): String = shape match`\n> Lines: 176-179\n- @brief Describe a shape using exhaustive pattern matching.\n- @param shape The shape to describe.\n- @return Human-readable description with area.\n```\ndef describeShape(shape: Shape): String = shape match {\ncase Circle(r) => s\"Circle with radius $r, area=${shape.area}\"\ncase Rectangle(w, h) => s\"Rectangle ${w}x${h}, area=${shape.area}\"\n}\n```\n\n### FUNCTION: `classify`\n> Signature: `def classify(x: Int): String = x match`\n> Lines: 186-191\n- @brief Process a value with multiple match guards.\n- @param x Integer input to classify.\n- @return Classification string.\n```\ndef classify(x: Int): String = x match {\ncase 0 => \"zero\"\ncase n if n < 0 => \"negative\"\ncase n if n > 100 => \"large\"\ncase _ => \"positive\"\n}\n```\n\n### CLASS: `Config`\n> Signature: `class Config private (val entries: Map[String, String])`\n> Lines: 201-208\n- @brief Configuration holder with companion factory.\n- @brief Retrieve a value by key.\n- @param entries Key-value pairs.\n- @param key The configuration key.\n- @return Optional value.\n```\nclass Config private (val entries: Map[String, String]) {\ndef get(key: String): Option[String] = entries.get(key)\n}\n```\n\n### FUNCTION: `get`\n> Signature: `def get(key: String): Option[String] = entries.get(key)`\n> Lines: 207-214\n- @brief Retrieve a value by key.\n- @brief Companion object with factory methods for Config.\n- @param key The configuration key.\n- @return Optional value.\n```\ndef get(key: String): Option[String] = entries.get(key)\n}\nobject Config {\n```\n\n### MODULE: `Config`\n> Signature: `object Config`\n> Lines: 214-227\n- @brief Companion object with factory methods for Config.\n- @brief Create a Config from key-value pairs.\n- @param entries Variable number of key-value tuples.\n- @return A new Config instance.\n```\nobject Config {\ndef apply(entries: (String, String)*): Config = new Config(entries.toMap)\ndef empty: Config = new Config(Map.empty)\n}\n```\n\n### FUNCTION: `apply`\n> Signature: `def apply(entries: (String, String)*): Config = new Config(entries.toMap)`\n> Lines: 220-236\n- @brief Create a Config from key-value pairs.\n- @brief Create an empty Config.\n- @param entries Variable number of key-value tuples.\n- @return A new Config instance.\n- @return Config with no entries.\n```\ndef apply(entries: (String, String)*): Config = new Config(entries.toMap)\ndef empty: Config = new Config(Map.empty)\n}\nclass Container[+A](val value: A) {\n```\n\n### FUNCTION: `empty`\n> Signature: `def empty: Config = new Config(Map.empty)`\n> Lines: 226-236\n- @brief Create an empty Config.\n- @return Config with no entries.\n```\ndef empty: Config = new Config(Map.empty)\n}\nclass Container[+A](val value: A) {\n```\n\n### CLASS: `Container`\n> Signature: `class Container[+A](val value: A)`\n> Lines: 236-252\n- @brief Covariant generic container.\n@tparam +A Element type (covariant).\n- @brief Map the contained value. @tparam B Target type.\n- @param f Transform function.\n- @return New Container with transformed value.\n```\nclass Container[+A](val value: A) {\ndef map[B](f: A => B): Container[B] = new Container(f(value))\ndef flatMap[B](f: A => Container[B]): Container[B] = f(value)\n}\n```\n\n### FUNCTION: `map`\n> Signature: `def map[B](f: A => B): Container[B] = new Container(f(value))`\n> Lines: 243-261\n- @brief Map the contained value.\n@tparam B Target type.\n- @brief Flat-map the contained value. @tparam B Target type.\n- @param f Transform function.\n- @param f Transform function returning a Container.\n- @return New Container with transformed value.\n- @return Flattened Container.\n```\ndef map[B](f: A => B): Container[B] = new Container(f(value))\ndef flatMap[B](f: A => Container[B]): Container[B] = f(value)\n}\nimplicit class RichInt(val n: Int) extends AnyVal {\n```\n\n### FUNCTION: `flatMap`\n> Signature: `def flatMap[B](f: A => Container[B]): Container[B] = f(value)`\n> Lines: 251-261\n- @brief Flat-map the contained value.\n@tparam B Target type.\n- @param f Transform function returning a Container.\n- @return Flattened Container.\n```\ndef flatMap[B](f: A => Container[B]): Container[B] = f(value)\n}\nimplicit class RichInt(val n: Int) extends AnyVal {\n```\n\n### FUNCTION: `isEven`\n> Signature: `def isEven: Boolean = n % 2 == 0`\n> Lines: 266-282\n- @brief Check if the number is even.\n- @brief Repeat a string n times.\n- @param s The string to repeat.\n- @return True if n is divisible by 2.\n- @return Concatenated result.\n```\ndef isEven: Boolean = n % 2 == 0\ndef times(s: String): String = s * n\n}\nobject ForCompExample {\n```\n\n### FUNCTION: `times`\n> Signature: `def times(s: String): String = s * n`\n> Lines: 273-282\n- @brief Repeat a string n times.\n- @param s The string to repeat.\n- @return Concatenated result.\n```\ndef times(s: String): String = s * n\n}\nobject ForCompExample {\n```\n\n### MODULE: `ForCompExample`\n> Signature: `object ForCompExample`\n> Lines: 282-296\n- @brief Demonstrates for-comprehension with multiple generators.\n- @brief Compute all pairs of integers whose sum equals target.\n- @param range Upper bound of the search space.\n- @param target Desired sum.\n- @return List of pairs summing to target.\n```\nobject ForCompExample {\ndef findPairs(range: Int, target: Int): List[(Int, Int)] = {\nfor {\nx <- (1 to range).toList\ny <- (x to range).toList\nif x + y == target\n} yield (x, y)\n}\n}\n```\n\n### FUNCTION: `findPairs`\n> Signature: `def findPairs(range: Int, target: Int): List[(Int, Int)] =`\n> Lines: 289-295\n- @brief Compute all pairs of integers whose sum equals target.\n- @param range Upper bound of the search space.\n- @param target Desired sum.\n- @return List of pairs summing to target.\n```\ndef findPairs(range: Int, target: Int): List[(Int, Int)] = {\nfor {\nx <- (1 to range).toList\ny <- (x to range).toList\nif x + y == target\n} yield (x, y)\n}\n```\n\n### MODULE: `FuncUtils`\n> Signature: `object FuncUtils`\n> Lines: 304-332\n- @brief Utility functions demonstrating functional patterns.\n- @brief Curried addition function.\n- @param a First operand.\n- @param b Second operand.\n- @return Sum of a and b.\n```\nobject FuncUtils {\ndef add(a: Int)(b: Int): Int = a + b\ndef twice[A](f: A => A)(x: A): A = f(f(x))\ndef compose[A, B, C](f: A => B, g: B => C): A => C = a => g(f(a))\n}\n```\n\n### FUNCTION: `add`\n> Signature: `def add(a: Int)(b: Int): Int = a + b`\n> Lines: 311-351\n- @brief Curried addition function.\n- @brief Apply a function twice to an initial value. @tparam A Value type.\n- @param a First operand.\n- @param b Second operand.\n- @param f Function to apply.\n- @param x Initial value.\n- @return Sum of a and b.\n- @return Result of f(f(x)).\n```\ndef add(a: Int)(b: Int): Int = a + b\ndef twice[A](f: A => A)(x: A): A = f(f(x))\ndef compose[A, B, C](f: A => B, g: B => C): A => C = a => g(f(a))\n}\nimport scala.util.Random\nimport scala.concurrent.duration._\ntrait Runner\ntrait Parser\nobject Metrics\nval MaxUsers = 100\nval RetryLimit = 3\ntype UserKey = String\ntype ErrorCode = Int\ntype Mapper = String => String\nvar attempts = 0\nvar cursor = 1\nvar stage = \"init\"\nvar status = \"ready\"\nobject ReqCoverScala {\n```\n\n### FUNCTION: `twice`\n> Signature: `def twice[A](f: A => A)(x: A): A = f(f(x))`\n> Lines: 320-351\n- @brief Apply a function twice to an initial value.\n@tparam A Value type.\n- @brief Compose two functions left to right. @tparam A Input type. @tparam B Intermediate type. @tparam C Output type.\n- @param f Function to apply.\n- @param x Initial value.\n- @param f First function.\n- @param g Second function.\n- @return Result of f(f(x)).\n- @return Composed function.\n```\ndef twice[A](f: A => A)(x: A): A = f(f(x))\ndef compose[A, B, C](f: A => B, g: B => C): A => C = a => g(f(a))\n}\nimport scala.util.Random\nimport scala.concurrent.duration._\ntrait Runner\ntrait Parser\nobject Metrics\nval MaxUsers = 100\nval RetryLimit = 3\ntype UserKey = String\ntype ErrorCode = Int\ntype Mapper = String => String\nvar attempts = 0\nvar cursor = 1\nvar stage = \"init\"\nvar status = \"ready\"\nobject ReqCoverScala {\n```\n\n### FUNCTION: `compose`\n> Signature: `def compose[A, B, C](f: A => B, g: B => C): A => C = a => g(f(a))`\n> Lines: 331-351\n- @brief Compose two functions left to right.\n@tparam A Input type.\n@tparam B Intermediate type.\n@tparam C Output type.\n- @param f First function.\n- @param g Second function.\n- @return Composed function.\n```\ndef compose[A, B, C](f: A => B, g: B => C): A => C = a => g(f(a))\n}\nimport scala.util.Random\nimport scala.concurrent.duration._\ntrait Runner\ntrait Parser\nobject Metrics\nval MaxUsers = 100\nval RetryLimit = 3\ntype UserKey = String\ntype ErrorCode = Int\ntype Mapper = String => String\nvar attempts = 0\nvar cursor = 1\nvar stage = \"init\"\nvar status = \"ready\"\nobject ReqCoverScala {\n```\n\n### IMPORT: `scala.util.Random`\n> Lines: 335-335\n```\nimport scala.util.Random\n```\n\n### IMPORT: `scala.concurrent.duration._`\n> Lines: 336-336\n```\nimport scala.concurrent.duration._\n```\n\n### TRAIT: `Runner`\n> Signature: `trait Runner`\n> Lines: 337-397\n```\ntrait Runner\ntrait Parser\nobject Metrics\nval MaxUsers = 100\nval RetryLimit = 3\ntype UserKey = String\ntype ErrorCode = Int\ntype Mapper = String => String\nvar attempts = 0\nvar cursor = 1\nvar stage = \"init\"\nvar status = \"ready\"\nobject ReqCoverScala {\ndef reqCoverScala1(value: Int): Int = value + 1\ndef reqCoverScala2(value: Int): Int = value + 2\ndef reqCoverScala3(value: Int): Int = value + 3\ndef reqCoverScala4(value: Int): Int = value + 4\ndef reqCoverScala5(value: Int): Int = value + 5\n}\n```\n\n### TRAIT: `Parser`\n> Signature: `trait Parser`\n> Lines: 338-397\n```\ntrait Parser\nobject Metrics\nval MaxUsers = 100\nval RetryLimit = 3\ntype UserKey = String\ntype ErrorCode = Int\ntype Mapper = String => String\nvar attempts = 0\nvar cursor = 1\nvar stage = \"init\"\nvar status = \"ready\"\nobject ReqCoverScala {\ndef reqCoverScala1(value: Int): Int = value + 1\ndef reqCoverScala2(value: Int): Int = value + 2\ndef reqCoverScala3(value: Int): Int = value + 3\ndef reqCoverScala4(value: Int): Int = value + 4\ndef reqCoverScala5(value: Int): Int = value + 5\n}\n```\n\n### MODULE: `Metrics`\n> Signature: `object Metrics`\n> Lines: 339-397\n```\nobject Metrics\nval MaxUsers = 100\nval RetryLimit = 3\ntype UserKey = String\ntype ErrorCode = Int\ntype Mapper = String => String\nvar attempts = 0\nvar cursor = 1\nvar stage = \"init\"\nvar status = \"ready\"\nobject ReqCoverScala {\ndef reqCoverScala1(value: Int): Int = value + 1\ndef reqCoverScala2(value: Int): Int = value + 2\ndef reqCoverScala3(value: Int): Int = value + 3\ndef reqCoverScala4(value: Int): Int = value + 4\ndef reqCoverScala5(value: Int): Int = value + 5\n}\n```\n\n### CONSTANT: `MaxUsers`\n> Signature: `val MaxUsers = 100`\n> Lines: 340-340\n```\nval MaxUsers = 100\n```\n\n### CONSTANT: `RetryLimit`\n> Signature: `val RetryLimit = 3`\n> Lines: 341-341\n```\nval RetryLimit = 3\n```\n\n### TYPE_ALIAS: `UserKey`\n> Signature: `type UserKey = String`\n> Lines: 342-342\n```\ntype UserKey = String\n```\n\n### TYPE_ALIAS: `ErrorCode`\n> Signature: `type ErrorCode = Int`\n> Lines: 343-343\n```\ntype ErrorCode = Int\n```\n\n### TYPE_ALIAS: `Mapper`\n> Signature: `type Mapper = String => String`\n> Lines: 344-344\n```\ntype Mapper = String => String\n```\n\n### VARIABLE: `attempts`\n> Signature: `var attempts = 0`\n> Lines: 345-345\n```\nvar attempts = 0\n```\n\n### VARIABLE: `cursor`\n> Signature: `var cursor = 1`\n> Lines: 346-346\n```\nvar cursor = 1\n```\n\n### VARIABLE: `stage`\n> Signature: `var stage = \"init\"`\n> Lines: 347-347\n```\nvar stage = \"init\"\n```\n\n### VARIABLE: `status`\n> Signature: `var status = \"ready\"`\n> Lines: 348-348\n```\nvar status = \"ready\"\n```\n\n### MODULE: `ReqCoverScala`\n> Signature: `object ReqCoverScala`\n> Lines: 351-397\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\nobject ReqCoverScala {\ndef reqCoverScala1(value: Int): Int = value + 1\ndef reqCoverScala2(value: Int): Int = value + 2\ndef reqCoverScala3(value: Int): Int = value + 3\ndef reqCoverScala4(value: Int): Int = value + 4\ndef reqCoverScala5(value: Int): Int = value + 5\n}\n```\n\n### FUNCTION: `reqCoverScala1`\n> Signature: `def reqCoverScala1(value: Int): Int = value + 1`\n> Lines: 359-359\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\ndef reqCoverScala1(value: Int): Int = value + 1\n```\n\n### FUNCTION: `reqCoverScala2`\n> Signature: `def reqCoverScala2(value: Int): Int = value + 2`\n> Lines: 368-368\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\ndef reqCoverScala2(value: Int): Int = value + 2\n```\n\n### FUNCTION: `reqCoverScala3`\n> Signature: `def reqCoverScala3(value: Int): Int = value + 3`\n> Lines: 377-377\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\ndef reqCoverScala3(value: Int): Int = value + 3\n```\n\n### FUNCTION: `reqCoverScala4`\n> Signature: `def reqCoverScala4(value: Int): Int = value + 4`\n> Lines: 386-386\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\ndef reqCoverScala4(value: Int): Int = value + 4\n```\n\n### FUNCTION: `reqCoverScala5`\n> Signature: `def reqCoverScala5(value: Int): Int = value + 5`\n> Lines: 395-395\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\ndef reqCoverScala5(value: Int): Int = value + 5\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_shell.sh | shell\n\n### VARIABLE: `MY_VAR`\n> Signature: `MY_VAR=\"hello\"`\n> Lines: 12-12\n- @brief Greeting message template.\n```\nMY_VAR=\"hello\"\n```\n\n### VARIABLE: `PATH_EXT`\n> Signature: `export PATH_EXT=\"/usr/local/bin\"`\n> Lines: 15-15\n- @brief Extended PATH including local binary directory.\n```\nexport PATH_EXT=\"/usr/local/bin\"\n```\n\n### VARIABLE: `MAX_COUNT`\n> Signature: `readonly MAX_COUNT=10`\n> Lines: 18-18\n- @brief Immutable maximum iteration counter.\n```\nreadonly MAX_COUNT=10\n```\n\n### VARIABLE: `BUILD_VERSION`\n> Signature: `declare -r BUILD_VERSION=\"1.0.0\"`\n> Lines: 21-21\n- @brief Build version set via declare.\n```\ndeclare -r BUILD_VERSION=\"1.0.0\"\n```\n\n### VARIABLE: `DEBUG_MODE`\n> Signature: `DEBUG_MODE=0`\n> Lines: 24-24\n- @brief Debug mode flag (0=off, 1=on).\n```\nDEBUG_MODE=0\n```\n\n### VARIABLE: `LANGUAGES`\n> Signature: `declare -a LANGUAGES=(\"python\" \"rust\" \"go\" \"java\" \"typescript\")`\n> Lines: 29-29\n- @brief Indexed array of supported languages.\n```\ndeclare -a LANGUAGES=(\"python\" \"rust\" \"go\" \"java\" \"typescript\")\n```\n\n### VARIABLE: `EXT_MAP`\n> Signature: `declare -A EXT_MAP=(`\n> Lines: 32-32\n- @brief Associative array mapping extensions to languages.\n```\ndeclare -A EXT_MAP=(\n```\n\n### FUNCTION: `greet`\n> Signature: `function greet()`\n> Lines: 44-44\n- @brief Greet a user by name on stdout.\n- @param $1 The user's name.\n```\nfunction greet() {\n```\n\n### FUNCTION: `cleanup`\n> Signature: `cleanup()`\n> Lines: 56-56\n- @brief Remove temporary files and directories.\n- @details Called by trap on EXIT for cleanup.\n```\ncleanup() {\n```\n\n### FUNCTION: `parse_args`\n> Signature: `parse_args()`\n> Lines: 68-68\n- @brief Parse command-line options using getopts.\n- @param $@ Command-line arguments.\n- @return Sets global variables based on parsed options.\n```\nparse_args() {\n```\n\n### VARIABLE: `VERBOSE`\n> Signature: `VERBOSE=1`\n> Lines: 74-74\n```\nVERBOSE=1\n```\n\n### VARIABLE: `DEBUG_MODE`\n> Signature: `DEBUG_MODE=1`\n> Lines: 78-78\n```\nDEBUG_MODE=1\n```\n\n### VARIABLE: `INPUT_FILE`\n> Signature: `INPUT_FILE=\"$OPTARG\"`\n> Lines: 82-82\n```\nINPUT_FILE=\"$OPTARG\"\n```\n\n### VARIABLE: `OUTPUT_FILE`\n> Signature: `OUTPUT_FILE=\"$OPTARG\"`\n> Lines: 86-86\n```\nOUTPUT_FILE=\"$OPTARG\"\n```\n\n### FUNCTION: `process_file`\n> Signature: `process_file()`\n> Lines: 105-105\n- @brief Process a file with error handling and logging.\n- @param $1 Path to the input file.\n- @param $2 Optional output path (defaults to stdout).\n- @return 0 on success, 1 on failure.\n```\nprocess_file() {\n```\n\n### FUNCTION: `retry_command`\n> Signature: `retry_command()`\n> Lines: 139-139\n- @brief Execute a command with retry logic.\n- @param $1 Maximum number of retry attempts.\n- @param $@ The command and arguments to execute.\n- @return Exit code of the final attempt.\n```\nretry_command() {\n```\n\n### FUNCTION: `log_message`\n> Signature: `log_message()`\n> Lines: 162-162\n- @brief Log a message with timestamp prefix.\n- @param $1 Log level (INFO, WARN, ERROR).\n- @param $@ Message text.\n```\nlog_message() {\n```\n\n### FUNCTION: `make_temp`\n> Signature: `make_temp()`\n> Lines: 172-172\n- @brief Generate a temporary file and return its path.\n- @return Path to the created temporary file.\n```\nmake_temp() {\n```\n\n### FUNCTION: `generate_config`\n> Signature: `generate_config()`\n> Lines: 189-189\n- @brief Generate a configuration file using heredoc.\n```\ngenerate_config() {\n```\n\n### FUNCTION: `factorial`\n> Signature: `factorial()`\n> Lines: 203-203\n- @brief Compute factorial iteratively.\n- @param $1 Non-negative integer.\n- @return Factorial result.\n```\nfactorial() {\n```\n\n### IMPORT: `./config.sh`\n> Lines: 218-218\n- @brief Load external configuration script if present.\n```\nsource ./config.sh\n```\n\n### IMPORT: `./env.sh`\n> Lines: 222-222\n```\nsource ./env.sh\n```\n\n### IMPORT: `./shared.sh`\n> Lines: 224-224\n```\nsource ./shared.sh\n```\n\n### IMPORT: `./runtime.sh`\n> Lines: 226-226\n```\nsource ./runtime.sh\n```\n\n### IMPORT: `./network.sh`\n> Lines: 228-228\n```\nsource ./network.sh\n```\n\n### FUNCTION: `req_cover_shell_1`\n> Signature: `req_cover_shell_1()`\n> Lines: 236-236\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\nreq_cover_shell_1() {\n```\n\n### FUNCTION: `req_cover_shell_2`\n> Signature: `req_cover_shell_2()`\n> Lines: 245-245\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\nreq_cover_shell_2() {\n```\n\n### FUNCTION: `req_cover_shell_3`\n> Signature: `req_cover_shell_3()`\n> Lines: 254-254\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\nreq_cover_shell_3() {\n```\n\n### FUNCTION: `req_cover_shell_4`\n> Signature: `req_cover_shell_4()`\n> Lines: 263-263\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\nreq_cover_shell_4() {\n```\n\n### FUNCTION: `req_cover_shell_5`\n> Signature: `req_cover_shell_5()`\n> Lines: 272-272\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\nreq_cover_shell_5() {\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_swift.swift | swift\n\n### IMPORT: `Foundation`\n> Lines: 8-8\n```\nimport Foundation\n```\n\n### IMPORT: `Combine`\n> Lines: 9-9\n```\nimport Combine\n```\n\n### CLASS: `Animal`\n> Signature: `class Animal`\n> Lines: 16-58\n- @brief Base class with stored, computed, and observed properties.\n- @brief Species name identifier.\n```\nclass Animal {\nvar species: String\nvar legs: Int = 4 {\nwillSet {\nprint(\"Legs changing from \\(legs) to \\(newValue)\")\n}\ndidSet {\nif legs < 0 { legs = 0 }\n}\n}\nvar description: String {\nreturn \"\\(species) with \\(legs) legs\"\n}\ninit(species: String) {\nself.species = species\n}\nfunc speak() {\nprint(\"...\")\n}\nclass func createDefault() -> Animal {\nreturn Animal(species: \"Unknown\")\n}\ndeinit {\nprint(\"\\(species) deallocated\")\n}\n}\n```\n\n### VARIABLE: `species`\n> Signature: `var species: String`\n> Lines: 18-18\n- @brief Species name identifier.\n```\nvar species: String\n```\n\n### VARIABLE: `legs`\n> Signature: `var legs: Int = 4`\n> Lines: 21-21\n- @brief Number of legs; triggers a didSet observer on change.\n```\nvar legs: Int = 4 {\n```\n\n### VARIABLE: `description`\n> Signature: `var description: String`\n> Lines: 33-33\n- @brief Computed property returning a descriptive string.\n```\nvar description: String {\n```\n\n### FUNCTION: `speak`\n> Signature: `func speak()`\n> Lines: 44-46\n- @brief Produce a sound; subclasses should override.\n```\nfunc speak() {\nprint(\"...\")\n}\n```\n\n### CLASS: `func`\n> Signature: `class func createDefault() -> Animal`\n> Lines: 50-52\n- @brief Class method creating a generic instance.\n- @return An Animal with species \"Unknown\".\n```\nclass func createDefault() -> Animal {\nreturn Animal(species: \"Unknown\")\n}\n```\n\n### CLASS: `Dog`\n> Signature: `class Dog: Animal`\n> Lines: 63-78\n- @brief Concrete animal with dog-specific behavior.\n- @brief Dog's name.\n```\nclass Dog: Animal {\nlet name: String\ninit(name: String) {\nself.name = name\nsuper.init(species: \"Dog\")\n}\noverride func speak() {\nprint(\"\\(name) says: Woof!\")\n}\n}\n```\n\n### CONSTANT: `name`\n> Signature: `let name: String`\n> Lines: 65-65\n- @brief Dog's name.\n```\nlet name: String\n```\n\n### FUNCTION: `speak`\n> Signature: `override func speak()`\n> Lines: 75-77\n- @brief Override speak to produce dog-specific sound.\n```\noverride func speak() {\nprint(\"\\(name) says: Woof!\")\n}\n```\n\n### STRUCT: `Point`\n> Signature: `struct Point: Equatable`\n> Lines: 85-102\n- @brief Value type representing a coordinate pair.\n```\nstruct Point: Equatable {\nvar x: Double = 0.0\nvar y: Double = 0.0\nstatic func + (lhs: Point, rhs: Point) -> Point {\nreturn Point(x: lhs.x + rhs.x, y: lhs.y + rhs.y)\n}\nvar magnitude: Double {\nreturn (x * x + y * y).squareRoot()\n}\n}\n```\n\n### VARIABLE: `x`\n> Signature: `var x: Double = 0.0`\n> Lines: 86-86\n```\nvar x: Double = 0.0\n```\n\n### VARIABLE: `y`\n> Signature: `var y: Double = 0.0`\n> Lines: 87-87\n```\nvar y: Double = 0.0\n```\n\n### VARIABLE: `magnitude`\n> Signature: `var magnitude: Double`\n> Lines: 99-99\n- @brief Compute Euclidean distance from origin.\n- @return Distance as a Double.\n```\nvar magnitude: Double {\n```\n\n### STRUCT: `Matrix`\n> Signature: `struct Matrix`\n> Lines: 107-133\n- @brief 2D matrix supporting element access via subscript.\n- @brief Flat storage for matrix values.\n```\nstruct Matrix {\nprivate var data: [[Double]]\nlet rows: Int\nlet cols: Int\ninit(rows: Int, cols: Int) {\nself.rows = rows\nself.cols = cols\ndata = Array(repeating: Array(repeating: 0.0, count: cols), count: rows)\n}\nsubscript(row: Int, col: Int) -> Double {\nget { return data[row][col] }\nset { data[row][col] = newValue }\n}\n}\n```\n\n### VARIABLE: `data`\n> Signature: `private var data: [[Double]]`\n> Lines: 109-109\n- @brief Flat storage for matrix values.\n```\nprivate var data: [[Double]]\n```\n\n### CONSTANT: `rows`\n> Signature: `let rows: Int`\n> Lines: 112-112\n- @brief Number of rows.\n```\nlet rows: Int\n```\n\n### CONSTANT: `cols`\n> Signature: `let cols: Int`\n> Lines: 114-114\n- @brief Number of columns.\n```\nlet cols: Int\n```\n\n### ENUM: `Direction`\n> Signature: `enum Direction: String, CaseIterable`\n> Lines: 140-156\n- @brief Cardinal directions supporting CaseIterable iteration.\n```\nenum Direction: String, CaseIterable {\ncase up = \"UP\"\ncase down = \"DOWN\"\ncase left = \"LEFT\"\ncase right = \"RIGHT\"\nvar opposite: Direction {\nswitch self {\ncase .up: return .down\ncase .down: return .up\ncase .left: return .right\ncase .right: return .left\n}\n}\n}\n```\n\n### VARIABLE: `opposite`\n> Signature: `var opposite: Direction`\n> Lines: 148-148\n- @brief Compute the opposite direction.\n- @return The direction 180 degrees from self.\n```\nvar opposite: Direction {\n```\n\n### ENUM: `AppResult`\n> Signature: `enum AppResult<T>`\n> Lines: 162-179\n- @brief Successful result carrying a value.\n- @brief Failure carrying an error description.\n```\nenum AppResult<T> {\ncase success(T)\ncase failure(Error)\nfunc map<U>(_ transform: (T) -> U) -> AppResult<U> {\nswitch self {\ncase .success(let value):\nreturn .success(transform(value))\ncase .failure(let error):\nreturn .failure(error)\n}\n}\n}\n```\n\n### FUNCTION: `map`\n> Signature: `func map<U>(_ transform: (T) -> U) -> AppResult<U>`\n> Lines: 171-178\n- @brief Map the success value using a transform closure.\n- @param transform Closure converting T to U.\n- @return A new AppResult with the transformed value.\n```\nfunc map<U>(_ transform: (T) -> U) -> AppResult<U> {\nswitch self {\ncase .success(let value):\nreturn .success(transform(value))\ncase .failure(let error):\nreturn .failure(error)\n}\n}\n```\n\n### PROTOCOL: `Drawable`\n> Signature: `protocol Drawable`\n> Lines: 186-193\n- @brief Defines the render contract with a default extension implementation.\n- @brief Render the object to a string representation.\n- @return Rendered string output.\n```\nprotocol Drawable {\nfunc draw() -> String\nvar renderPriority: Int { get }\n}\n```\n\n### FUNCTION: `draw`\n> Signature: `func draw() -> String`\n> Lines: 189-192\n- @brief Render the object to a string representation.\n- @brief Optional priority for render ordering.\n- @return Rendered string output.\n```\nfunc draw() -> String\nvar renderPriority: Int { get }\n```\n\n### VARIABLE: `renderPriority`\n> Signature: `var renderPriority: Int { get }`\n> Lines: 192-192\n- @brief Optional priority for render ordering.\n```\nvar renderPriority: Int { get }\n```\n\n### PROTOCOL: `Container`\n> Signature: `protocol Container`\n> Lines: 198-208\n- @brief Defines a type-erased container interface.\n- @brief The type of element stored in the container.\n```\nprotocol Container {\nassociatedtype Item\nmutating func add(_ item: Item)\nvar count: Int { get }\n}\n```\n\n### VARIABLE: `count`\n> Signature: `var count: Int { get }`\n> Lines: 207-207\n- @brief Number of elements in the container.\n```\nvar count: Int { get }\n```\n\n### EXTENSION: `Drawable`\n> Signature: `extension Drawable`\n> Lines: 212-221\n- @brief Default render priority for all Drawable conformants.\n```\nextension Drawable {\nvar renderPriority: Int { return 0 }\nfunc debugDraw() -> String {\nreturn \"[\\(renderPriority)] \\(draw())\"\n}\n}\n```\n\n### VARIABLE: `renderPriority`\n> Signature: `var renderPriority: Int { return 0 }`\n> Lines: 214-214\n- @brief Default render priority for all Drawable conformants.\n```\nvar renderPriority: Int { return 0 }\n```\n\n### FUNCTION: `debugDraw`\n> Signature: `func debugDraw() -> String`\n> Lines: 218-220\n- @brief Debug draw with priority prefix.\n- @return String with priority and rendered content.\n```\nfunc debugDraw() -> String {\nreturn \"[\\(renderPriority)] \\(draw())\"\n}\n```\n\n### EXTENSION: `Animal`\n> Signature: `extension Animal: Drawable`\n> Lines: 226-238\n- @brief Render animal as a descriptive string.\n- @return Description of the animal.\n```\nextension Animal: Drawable {\nfunc draw() -> String {\nreturn description\n}\nfunc describe() -> String {\nreturn \"Animal: \\(species)\"\n}\n}\n```\n\n### FUNCTION: `draw`\n> Signature: `func draw() -> String`\n> Lines: 229-231\n- @brief Render animal as a descriptive string.\n- @return Description of the animal.\n```\nfunc draw() -> String {\nreturn description\n}\n```\n\n### FUNCTION: `describe`\n> Signature: `func describe() -> String`\n> Lines: 235-237\n- @brief Describe the animal for UI display.\n- @return A formatted string suitable for labels.\n```\nfunc describe() -> String {\nreturn \"Animal: \\(species)\"\n}\n```\n\n### STRUCT: `Clamped`\n> Signature: `struct Clamped<Value: Comparable>`\n> Lines: 247-268\n- @brief Minimum allowed value.\n- @brief Maximum allowed value.\n```\nstruct Clamped<Value: Comparable> {\nlet min: Value\nlet max: Value\nprivate var value: Value\nvar wrappedValue: Value {\nget { return value }\nset { value = Swift.min(Swift.max(newValue, min), max) }\n}\ninit(wrappedValue: Value, min: Value, max: Value) {\nself.min = min\nself.max = max\nself.value = Swift.min(Swift.max(wrappedValue, min), max)\n}\n}\n```\n\n### CONSTANT: `min`\n> Signature: `let min: Value`\n> Lines: 249-249\n- @brief Minimum allowed value.\n```\nlet min: Value\n```\n\n### CONSTANT: `max`\n> Signature: `let max: Value`\n> Lines: 251-251\n- @brief Maximum allowed value.\n```\nlet max: Value\n```\n\n### VARIABLE: `value`\n> Signature: `private var value: Value`\n> Lines: 253-253\n- @brief Current stored value.\n```\nprivate var value: Value\n```\n\n### VARIABLE: `wrappedValue`\n> Signature: `var wrappedValue: Value`\n> Lines: 256-256\n- @brief The wrapped value, clamped on set.\n```\nvar wrappedValue: Value {\n```\n\n### VARIABLE: `value`\n> Signature: `private var value: Int = 0`\n> Lines: 277-277\n- @brief Current count value.\n```\nprivate var value: Int = 0\n```\n\n### FUNCTION: `increment`\n> Signature: `func increment() -> Int`\n> Lines: 281-284\n- @brief Increment the counter and return the new value.\n- @return The incremented count.\n```\nfunc increment() -> Int {\nvalue += 1\nreturn value\n}\n```\n\n### FUNCTION: `reset`\n> Signature: `func reset()`\n> Lines: 287-289\n- @brief Reset the counter to zero.\n```\nfunc reset() {\nvalue = 0\n}\n```\n\n### FUNCTION: `greet`\n> Signature: `public func greet(name: String)`\n> Lines: 296-298\n- @brief Greet a person by name.\n- @param name The person's name.\n```\npublic func greet(name: String) {\nprint(\"Hello \\(name)\")\n}\n```\n\n### FUNCTION: `makeDrawable`\n> Signature: `func makeDrawable() -> some Drawable`\n> Lines: 302-304\n- @brief Build an opaque some-typed Drawable.\n- @return An opaque Drawable hiding the concrete type.\n```\nfunc makeDrawable() -> some Drawable {\nreturn Animal(species: \"Cat\")\n}\n```\n\n### FUNCTION: `contains`\n> Signature: `func contains<T: Collection>(items: T, target: T.Element) -> Bool where T.Element: Equatable`\n> Lines: 311-313\n- @brief Generic function with where clause constraint.\n@tparam T Must be Equatable.\n- @param items Collection of items to search.\n- @param target The item to find.\n- @return True if target exists in items.\n```\nfunc contains<T: Collection>(items: T, target: T.Element) -> Bool where T.Element: Equatable {\nreturn items.contains(target)\n}\n```\n\n### FUNCTION: `deferred`\n> Signature: `func deferred(_ action: @escaping () -> Void) -> () -> Void`\n> Lines: 318-323\n- @brief Higher-order function accepting an escaping closure.\n- @param action The closure to store for later execution.\n- @return A wrapper closure that invokes action.\n```\nfunc deferred(_ action: @escaping () -> Void) -> () -> Void {\nreturn {\naction()\n}\n}\n```\n\n### CONSTANT: `MAX_SIZE`\n> Signature: `let MAX_SIZE = 1024`\n> Lines: 328-328\n- @brief Application-wide maximum buffer size constant.\n```\nlet MAX_SIZE = 1024\n```\n\n### VARIABLE: `counter`\n> Signature: `private var counter = 0`\n> Lines: 331-331\n- @brief Module-scoped mutable counter with restricted access.\n```\nprivate var counter = 0\n```\n\n### CONSTANT: `defaultConfig`\n> Signature: `let defaultConfig: [String: Any] =`\n> Lines: 334-334\n- @brief Lazy computed constant using a closure.\n```\nlet defaultConfig: [String: Any] = {\n```\n\n### VARIABLE: `config`\n> Signature: `var config: [String: Any] = [:]`\n> Lines: 335-335\n```\nvar config: [String: Any] = [:]\n```\n\n### IMPORT: `SwiftUI`\n> Lines: 342-342\n```\nimport SwiftUI\n```\n\n### IMPORT: `Combine`\n> Lines: 343-343\n```\nimport Combine\n```\n\n### IMPORT: `Foundation`\n> Lines: 344-344\n```\nimport Foundation\n```\n\n### IMPORT: `Dispatch`\n> Lines: 345-345\n```\nimport Dispatch\n```\n\n### IMPORT: `UIKit`\n> Lines: 346-346\n```\nimport UIKit\n```\n\n### CLASS: `ServiceController`\n> Signature: `class ServiceController {}`\n> Lines: 347-347\n```\nclass ServiceController {}\n```\n\n### CLASS: `CacheStore`\n> Signature: `final class CacheStore {}`\n> Lines: 348-348\n```\nfinal class CacheStore {}\n```\n\n### STRUCT: `Vector2`\n> Signature: `struct Vector2 { let x: Int; let y: Int }`\n> Lines: 349-349\n```\nstruct Vector2 { let x: Int; let y: Int }\n```\n\n### STRUCT: `Limits`\n> Signature: `struct Limits { let max: Int }`\n> Lines: 350-350\n```\nstruct Limits { let max: Int }\n```\n\n### ENUM: `ModeSwift`\n> Signature: `enum ModeSwift { case fast, safe }`\n> Lines: 351-351\n```\nenum ModeSwift { case fast, safe }\n```\n\n### ENUM: `PhaseSwift`\n> Signature: `enum PhaseSwift { case initState, done }`\n> Lines: 352-352\n```\nenum PhaseSwift { case initState, done }\n```\n\n### ENUM: `SignalSwift`\n> Signature: `enum SignalSwift { case on, off }`\n> Lines: 353-353\n```\nenum SignalSwift { case on, off }\n```\n\n### PROTOCOL: `RunnerSwift`\n> Signature: `protocol RunnerSwift { func run() }`\n> Lines: 354-354\n```\nprotocol RunnerSwift { func run() }\n```\n\n### PROTOCOL: `LoggerSwift`\n> Signature: `protocol LoggerSwift { func log(_ msg: String) }`\n> Lines: 355-355\n```\nprotocol LoggerSwift { func log(_ msg: String) }\n```\n\n### PROTOCOL: `ParserSwift`\n> Signature: `protocol ParserSwift { func parse(_ input: String) -> String }`\n> Lines: 356-356\n```\nprotocol ParserSwift { func parse(_ input: String) -> String }\n```\n\n### EXTENSION: `String`\n> Signature: `extension String { func trimmed2() -> String { self.trimmingCharacters(in: .whitespaces) } }`\n> Lines: 357-357\n```\nextension String { func trimmed2() -> String { self.trimmingCharacters(in: .whitespaces) } }\n```\n\n### EXTENSION: `Int`\n> Signature: `extension Int { func doubled2() -> Int { self * 2 } }`\n> Lines: 358-358\n```\nextension Int { func doubled2() -> Int { self * 2 } }\n```\n\n### EXTENSION: `Array`\n> Signature: `extension Array { var isNotEmpty: Bool { !self.isEmpty } }`\n> Lines: 359-359\n```\nextension Array { var isNotEmpty: Bool { !self.isEmpty } }\n```\n\n### FUNCTION: `reqCoverSwift1`\n> Signature: `func reqCoverSwift1(_ value: Int) -> Int { value + 1 }`\n> Lines: 367-367\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\nfunc reqCoverSwift1(_ value: Int) -> Int { value + 1 }\n```\n\n### FUNCTION: `reqCoverSwift2`\n> Signature: `func reqCoverSwift2(_ value: Int) -> Int { value + 2 }`\n> Lines: 374-374\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\nfunc reqCoverSwift2(_ value: Int) -> Int { value + 2 }\n```\n\n### FUNCTION: `reqCoverSwift3`\n> Signature: `func reqCoverSwift3(_ value: Int) -> Int { value + 3 }`\n> Lines: 381-381\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\nfunc reqCoverSwift3(_ value: Int) -> Int { value + 3 }\n```\n\n### FUNCTION: `reqCoverSwift4`\n> Signature: `func reqCoverSwift4(_ value: Int) -> Int { value + 4 }`\n> Lines: 388-388\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\nfunc reqCoverSwift4(_ value: Int) -> Int { value + 4 }\n```\n\n### FUNCTION: `reqCoverSwift5`\n> Signature: `func reqCoverSwift5(_ value: Int) -> Int { value + 5 }`\n> Lines: 395-395\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\nfunc reqCoverSwift5(_ value: Int) -> Int { value + 5 }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_typescript.ts | typescript\n- @brief Comprehensive TypeScript test fixture for parser validation.\n- @details Covers conditional types, mapped types, template literal types,\nsatisfies operator, overload signatures, discriminated unions,\nmodule augmentation, decorators, generic constraints, and utility types.\n\n### IMPORT: `{ Component } from 'react';`\n> Lines: 10-10\n```\nimport { Component } from 'react';\n```\n\n### IMPORT: `type { ReactNode } from 'react';`\n> Lines: 11-11\n```\nimport type { ReactNode } from 'react';\n```\n\n### INTERFACE: `User`\n> Signature: `interface User`\n> Lines: 19-28\n- @brief Core user entity with identity fields.\n- @brief Display name of the user.\n- @brief Age in years; must be non-negative.\n```\ninterface User {\nname: string;\nage: number;\nemail?: string;\nreadonly id: string;\n}\n```\n\n### INTERFACE: `Repository`\n> Signature: `interface Repository<T>`\n> Lines: 35-42\n- @brief Generic CRUD repository with type parameter.\n@tparam T Entity type managed by this repository.\n- @brief Find an entity by its ID.\n- @brief Persist an entity, returning the saved version.\n```\ninterface Repository<T> {\nfindById(id: string): Promise<T | null>;\nsave(entity: T): Promise<T>;\ndelete(id: string): Promise<boolean>;\n}\n```\n\n### INTERFACE: `Serializable`\n> Signature: `interface Serializable`\n> Lines: 48-51\n- @brief Marks objects that can be serialized to JSON.\n- @brief Convert to a JSON-compatible string.\n```\ninterface Serializable {\ntoJSON(): string;\n}\n```\n\n### TYPE_ALIAS: `StringOrNumber`\n> Signature: `type StringOrNumber = string | number`\n> Lines: 56-56\n- @brief Union type for values that can be string or number. */\n```\ntype StringOrNumber = string | number;\n```\n\n### TYPE_ALIAS: `DeepReadonly`\n> Signature: `type DeepReadonly<T> =`\n> Lines: 59-59\n- @brief Mapped type making all properties of T optional and readonly. */\n```\ntype DeepReadonly<T> = {\n```\n\n### TYPE_ALIAS: `Unwrap`\n> Signature: `type Unwrap<T> = T extends Array<infer U> ? U : T`\n> Lines: 64-64\n- @brief Conditional type extracting array element type. */\n```\ntype Unwrap<T> = T extends Array<infer U> ? U : T;\n```\n\n### TYPE_ALIAS: `PixelValue`\n> Signature: `type PixelValue = `${number}px``\n> Lines: 67-67\n- @brief Template literal type for CSS pixel values. */\n```\ntype PixelValue = `${number}px`;\n```\n\n### TYPE_ALIAS: `ApiResponse`\n> Signature: `type ApiResponse<T> =`\n> Lines: 70-70\n- @brief Discriminated union tag for API responses. */\n```\ntype ApiResponse<T> =\n```\n\n### TYPE_ALIAS: `KeysOfType`\n> Signature: `type KeysOfType<T, V> =`\n> Lines: 76-76\n- @brief Extract keys of T whose values extend a given type. */\n```\ntype KeysOfType<T, V> = {\n```\n\n### ENUM: `Direction`\n> Signature: `const enum Direction`\n> Lines: 86-91\n- @brief Const enum for cardinal directions (inlined at compile time).\n```\nconst enum Direction {\nUp = 'UP',\nDown = 'DOWN',\nLeft = 'LEFT',\nRight = 'RIGHT',\n}\n```\n\n### ENUM: `Color`\n> Signature: `enum Color`\n> Lines: 97-104\n- @brief Regular enum with numeric values for color channels.\n- @brief Red channel identifier.\n- @brief Blue channel identifier.\n```\nenum Color {\nRed,\nBlue,\nGreen = 10,\n}\n```\n\n### ENUM: `HttpStatus`\n> Signature: `enum HttpStatus`\n> Lines: 110-114\n- @brief String enum mapping HTTP status codes.\n```\nenum HttpStatus {\nOK = '200',\nNotFound = '404',\nServerError = '500',\n}\n```\n\n### CLASS: `Base`\n> Signature: `export abstract class Base`\n> Lines: 122-139\n- @brief Abstract base class with template method pattern.\n- @brief Abstract render method to be implemented by subclasses.\n- @return void\n```\nexport abstract class Base {\nabstract render(): void;\nexecute(): void {\nconsole.log('before render');\nthis.render();\nconsole.log('after render');\n}\n}\n```\n\n### CLASS: `Derived`\n> Signature: `class Derived extends Base`\n> Lines: 148-161\n- @brief Concrete implementation with typed value storage.\n- @brief Stored numeric value.\n```\nclass Derived extends Base {\nvalue: number = 0;\nlabel?: string;\nrender(): void {\nconsole.log(this.value);\n}\n}\n```\n\n### CLASS: `TypedContainer`\n> Signature: `class TypedContainer<T extends Serializable>`\n> Lines: 168-201\n- @brief Generic container with constraint on Serializable.\n@tparam T Must implement Serializable interface.\n- @brief Internal array storage for items.\n```\nclass TypedContainer<T extends Serializable> {\nprivate items: T[] = [];\nadd(item: T): void {\nthis.items.push(item);\n}\ntoJSON(): string {\nreturn `[${this.items.map(i => i.toJSON()).join(',')}]`;\n}\nfind(predicate: (item: T) => boolean): T | undefined {\nfor (const item of this.items) {\nif (predicate(item)) {\nreturn item;\n}\n}\nreturn undefined;\n}\n}\n```\n\n### CLASS: `UserEntity`\n> Signature: `class UserEntity implements User, Serializable`\n> Lines: 210-228\n- @brief Full user entity implementing both User and Serializable.\n```\nclass UserEntity implements User, Serializable {\nreadonly id: string;\nname: string;\nage: number;\nconstructor(id: string, name: string, age: number) {\nthis.id = id;\nthis.name = name;\nthis.age = age;\n}\ntoJSON(): string {\nreturn JSON.stringify({ id: this.id, name: this.name, age: this.age });\n}\n}\n```\n\n### FUNCTION: `greet`\n> Signature: `export function greet(name: string): void`\n> Lines: 237-239\n- @brief Greet a person by name with type-safe parameter.\n- @param name The person's name to display.\n```\nexport function greet(name: string): void {\nconsole.log(`Hello, ${name}`);\n}\n```\n\n### FUNCTION: `parse`\n> Signature: `function parse(input: string): number`\n> Lines: 249-256\n- @brief Parse input with overloaded signatures for type safety.\n@overload Parse a string input into a number.\n@overload Parse a number input into a string.\n```\nfunction parse(input: string): number;\nfunction parse(input: number): string;\nfunction parse(input: string | number): string | number {\nif (typeof input === 'string') {\nreturn parseInt(input, 10);\n}\nreturn input.toString();\n}\n```\n\n### FUNCTION: `parse`\n> Signature: `function parse(input: number): string`\n> Lines: 250-256\n```\nfunction parse(input: number): string;\nfunction parse(input: string | number): string | number {\nif (typeof input === 'string') {\nreturn parseInt(input, 10);\n}\nreturn input.toString();\n}\n```\n\n### FUNCTION: `parse`\n> Signature: `function parse(input: string | number): string | number`\n> Lines: 251-256\n```\nfunction parse(input: string | number): string | number {\nif (typeof input === 'string') {\nreturn parseInt(input, 10);\n}\nreturn input.toString();\n}\n```\n\n### FUNCTION: `add`\n> Signature: `const add = (a: number): number => a + 1`\n> Lines: 266-277\n- @brief Add one to a number (arrow function syntax).\n- @brief Generic transform function with constraint. @tparam T Must have a toString method.\n- @param a The input number.\n- @param value Input value to transform.\n- @return The incremented value.\n- @return String representation of the value.\n```\nconst add = (a: number): number => a + 1;\nconst transform = <T extends { toString(): string }>(value: T): string => {\nreturn value.toString();\n};\n```\n\n### FUNCTION: `fetchEntity`\n> Signature: `async function fetchEntity<T>(url: string): Promise<T>`\n> Lines: 288-292\n- @brief Fetch and deserialize a typed entity from an API.\n@tparam T The expected response entity type.\n- @param url Endpoint URL.\n- @return Promise resolving to the typed entity.\n```\nasync function fetchEntity<T>(url: string): Promise<T> {\nconst response = await fetch(url);\nreturn response.json() as Promise<T>;\n}\n```\n\n### NAMESPACE: `MyNS`\n> Signature: `export namespace MyNS`\n> Lines: 300-312\n- @brief Namespace grouping related constants and helpers.\n- @brief Exported constant within namespace.\n```\nexport namespace MyNS {\nexport const x = 1;\nexport function double(val: number): number {\nreturn val * 2;\n}\n}\n```\n\n### FUNCTION: `double`\n> Signature: `export function double(val: number): number`\n> Lines: 309-311\n- @brief Helper function scoped to namespace.\n- @param val Numeric input to double.\n- @return The doubled value.\n```\nexport function double(val: number): number {\nreturn val * 2;\n}\n```\n\n### MODULE: `MyMod`\n> Signature: `declare module MyMod`\n> Lines: 320-323\n- @brief Ambient module declaration for external library typings.\n- @brief Version string exposed by the external module.\n```\ndeclare module MyMod {\nexport const version: string;\n}\n```\n\n### DECORATOR: `Component`\n> Lines: 331-331\n- @brief Class using a decorator annotation.\n```\n@Component\n```\n\n### CLASS: `Decorated`\n> Signature: `class Decorated`\n> Lines: 332-335\n- @brief Template string for rendering.\n```\nclass Decorated {\ntemplate: string = '<div></div>';\n}\n```\n\n### FUNCTION: `isUser`\n> Signature: `function isUser(value: unknown): value is User`\n> Lines: 345-351\n- @brief Type guard narrowing unknown to User interface.\n- @param value Unknown input to validate.\n- @return True if value conforms to User shape.\n```\nfunction isUser(value: unknown): value is User {\nif (typeof value !== 'object' || value === null) {\nreturn false;\n}\nconst obj = value as Record<string, unknown>;\nreturn typeof obj.name === 'string' && typeof obj.age === 'number';\n}\n```\n\n### FUNCTION: `makeOptional`\n> Signature: `function makeOptional<T extends object>(obj: T): Partial<T>`\n> Lines: 373-375\n- @brief Convert all properties of an object to optional at runtime.\n@tparam T Source object type.\n- @param obj The source object.\n- @return A partial copy of the object.\n```\nfunction makeOptional<T extends object>(obj: T): Partial<T> {\nreturn { ...obj };\n}\n```\n\n### IMPORT: `{ Injectable } from 'inversify';`\n> Lines: 378-378\n```\nimport { Injectable } from 'inversify';\n```\n\n### IMPORT: `{ Observable } from 'rxjs';`\n> Lines: 379-379\n```\nimport { Observable } from 'rxjs';\n```\n\n### IMPORT: `{ FC } from 'react';`\n> Lines: 380-380\n```\nimport { FC } from 'react';\n```\n\n### DECORATOR: `injectable`\n> Lines: 381-381\n```\n@injectable\n```\n\n### DECORATOR: `sealed`\n> Lines: 382-382\n```\n@sealed\n```\n\n### DECORATOR: `track`\n> Lines: 383-383\n```\n@track\n```\n\n### DECORATOR: `memoized`\n> Lines: 384-384\n```\n@memoized\n```\n\n### INTERFACE: `CacheEntry`\n> Signature: `interface CacheEntry { key: string; value: string }`\n> Lines: 385-385\n```\ninterface CacheEntry { key: string; value: string }\n```\n\n### INTERFACE: `Runner`\n> Signature: `export interface Runner { run(): Promise<void> }`\n> Lines: 386-386\n```\nexport interface Runner { run(): Promise<void> }\n```\n\n### ENUM: `ModeTs`\n> Signature: `enum ModeTs { Fast, Safe }`\n> Lines: 387-387\n```\nenum ModeTs { Fast, Safe }\n```\n\n### ENUM: `StatusTs`\n> Signature: `enum StatusTs { Ready, Busy }`\n> Lines: 388-388\n```\nenum StatusTs { Ready, Busy }\n```\n\n### NAMESPACE: `ExtNSOne`\n> Signature: `namespace ExtNSOne { export const v = 1; }`\n> Lines: 389-389\n```\nnamespace ExtNSOne { export const v = 1; }\n```\n\n### NAMESPACE: `ExtNSTwo`\n> Signature: `namespace ExtNSTwo { export const v = 2; }`\n> Lines: 390-390\n```\nnamespace ExtNSTwo { export const v = 2; }\n```\n\n### NAMESPACE: `ExtNSThree`\n> Signature: `namespace ExtNSThree { export const v = 3; }`\n> Lines: 391-391\n```\nnamespace ExtNSThree { export const v = 3; }\n```\n\n### NAMESPACE: `ExtNSFour`\n> Signature: `namespace ExtNSFour { export const v = 4; }`\n> Lines: 392-392\n```\nnamespace ExtNSFour { export const v = 4; }\n```\n\n### MODULE: `ExtOne`\n> Signature: `declare module ExtOne { export const one: number; }`\n> Lines: 393-393\n```\ndeclare module ExtOne { export const one: number; }\n```\n\n### MODULE: `ExtTwo`\n> Signature: `module ExtTwo { export const two = 2; }`\n> Lines: 394-394\n```\nmodule ExtTwo { export const two = 2; }\n```\n\n### MODULE: `ExtThree`\n> Signature: `module ExtThree { export const three = 3; }`\n> Lines: 395-395\n```\nmodule ExtThree { export const three = 3; }\n```\n\n### MODULE: `ExtFour`\n> Signature: `module ExtFour { export const four = 4; }`\n> Lines: 396-396\n```\nmodule ExtFour { export const four = 4; }\n```\n\n### FUNCTION: `reqCoverTs1`\n> Signature: `function reqCoverTs1(value: number): number { return value + 1; }`\n> Lines: 404-404\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\nfunction reqCoverTs1(value: number): number { return value + 1; }\n```\n\n### FUNCTION: `reqCoverTs2`\n> Signature: `function reqCoverTs2(value: number): number { return value + 2; }`\n> Lines: 411-411\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\nfunction reqCoverTs2(value: number): number { return value + 2; }\n```\n\n### FUNCTION: `reqCoverTs3`\n> Signature: `function reqCoverTs3(value: number): number { return value + 3; }`\n> Lines: 418-418\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\nfunction reqCoverTs3(value: number): number { return value + 3; }\n```\n\n### FUNCTION: `reqCoverTs4`\n> Signature: `function reqCoverTs4(value: number): number { return value + 4; }`\n> Lines: 425-425\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\nfunction reqCoverTs4(value: number): number { return value + 4; }\n```\n\n### FUNCTION: `reqCoverTs5`\n> Signature: `function reqCoverTs5(value: number): number { return value + 5; }`\n> Lines: 432-432\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\nfunction reqCoverTs5(value: number): number { return value + 5; }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_zig.zig | zig\n\n### IMPORT: `std`\n> Lines: 7-7\n```\nconst std = @import(\"std\");\n```\n\n### IMPORT: `mem`\n> Lines: 8-8\n```\nconst mem = @import(\"std\").mem;\n```\n\n### CONSTANT: `Allocator`\n> Signature: `const Allocator = std.mem.Allocator`\n> Lines: 9-9\n```\nconst Allocator = std.mem.Allocator;\n```\n\n### FUNCTION: `main`\n> Signature: `pub fn main() void`\n> Lines: 14-16\n```\npub fn main() void {\nstd.debug.print(\"Hello\\n\", .{});\n}\n```\n\n### FUNCTION: `add`\n> Signature: `pub fn add(a: i32, b: i32) i32`\n> Lines: 22-24\n- @param a First operand.\n- @param b Second operand.\n- @return Sum of a and b.\n```\npub fn add(a: i32, b: i32) i32 {\nreturn a + b;\n}\n```\n\n### FUNCTION: `safeDivide`\n> Signature: `pub fn safeDivide(numerator: i32, denominator: i32) !i32`\n> Lines: 30-35\n- @param numerator The dividend.\n- @param denominator The divisor; must not be zero.\n- @return Quotient or error.DivisionByZero.\n```\npub fn safeDivide(numerator: i32, denominator: i32) !i32 {\nif (denominator == 0) {\nreturn error.DivisionByZero;\n}\nreturn @divTrunc(numerator, denominator);\n}\n```\n\n### FUNCTION: `max`\n> Signature: `pub fn max(comptime T: type, a: T, b: T) T`\n> Lines: 42-44\n- @param T The element type (comptime resolved).\n- @param a First value.\n- @param b Second value.\n- @return The larger of a and b.\n```\npub fn max(comptime T: type, a: T, b: T) T {\nreturn if (a > b) a else b;\n}\n```\n\n### FUNCTION: `indexOf`\n> Signature: `pub fn indexOf(comptime T: type, haystack: []const T, needle: T) ?usize`\n> Lines: 51-59\n- @param T Element type.\n- @param haystack Slice to search.\n- @param needle Value to find.\n- @return Index of needle or null if not found.\n```\npub fn indexOf(comptime T: type, haystack: []const T, needle: T) ?usize {\nfor (haystack, 0..) |item, i| {\nif (item == needle) {\nreturn i;\n}\n}\nreturn null;\n}\n```\n\n### FUNCTION: `comptimeConcat`\n> Signature: `pub fn comptimeConcat(comptime a: []const u8, comptime b: []const u8) []const u8`\n> Lines: 65-67\n- @param a First string literal.\n- @param b Second string literal.\n- @return Concatenated string at compile time.\n```\npub fn comptimeConcat(comptime a: []const u8, comptime b: []const u8) []const u8 {\nreturn a ++ b;\n}\n```\n\n### FUNCTION: `createBuffer`\n> Signature: `pub fn createBuffer(allocator: Allocator) ![]u8`\n> Lines: 72-78\n- @param allocator Memory allocator for buffer creation.\n- @return Allocated buffer or error.\n```\npub fn createBuffer(allocator: Allocator) ![]u8 {\nconst buf = try allocator.alloc(u8, 1024);\nerrdefer allocator.free(buf);\n@memset(buf, 0);\nreturn buf;\n}\n```\n\n### CONSTANT: `buf`\n> Signature: `const buf = try allocator.alloc(u8, 1024)`\n> Lines: 73-73\n```\nconst buf = try allocator.alloc(u8, 1024);\n```\n\n### VARIABLE: `total`\n> Signature: `var total: f32 = 0.0`\n> Lines: 84-84\n- @param values Slice of floats to sum.\n- @return Sum of all elements.\n```\nvar total: f32 = 0.0;\n```\n\n### FUNCTION: `doubleValue`\n> Signature: `export fn doubleValue(x: i32) i32`\n> Lines: 94-96\n- @param x Value to double.\n- @return Input multiplied by two.\n```\nexport fn doubleValue(x: i32) i32 {\nreturn x * 2;\n}\n```\n\n### STRUCT: `Point`\n> Signature: `const Point = struct`\n> Lines: 102-121\n- @brief Basic coordinate pair for geometric computations.\n```\nconst Point = struct {\nx: f64,\ny: f64,\npub fn distSquared(self: Point, other: Point) f64 {\nconst dx = self.x - other.x;\nconst dy = self.y - other.y;\nreturn dx * dx + dy * dy;\n}\npub fn origin() Point {\nreturn .{ .x = 0.0, .y = 0.0 };\n}\n};\n```\n\n### FUNCTION: `distSquared`\n> Signature: `pub fn distSquared(self: Point, other: Point) f64`\n> Lines: 110-114\n- @param self This point.\n- @param other Target point.\n- @return Distance squared (avoids sqrt).\n```\npub fn distSquared(self: Point, other: Point) f64 {\nconst dx = self.x - other.x;\nconst dy = self.y - other.y;\nreturn dx * dx + dy * dy;\n}\n```\n\n### CONSTANT: `dx`\n> Signature: `const dx = self.x - other.x`\n> Lines: 111-111\n```\nconst dx = self.x - other.x;\n```\n\n### CONSTANT: `dy`\n> Signature: `const dy = self.y - other.y`\n> Lines: 112-112\n```\nconst dy = self.y - other.y;\n```\n\n### FUNCTION: `origin`\n> Signature: `pub fn origin() Point`\n> Lines: 118-120\n- @return A zero-initialized Point.\n```\npub fn origin() Point {\nreturn .{ .x = 0.0, .y = 0.0 };\n}\n```\n\n### STRUCT: `PackedFlags`\n> Signature: `const PackedFlags = packed struct`\n> Lines: 125-130\n- @brief Tests parser handling of packed layout specifier.\n```\nconst PackedFlags = packed struct {\nreadable: bool,\nwritable: bool,\nexecutable: bool,\nreserved: u5,\n};\n```\n\n### STRUCT: `Config`\n> Signature: `const Config = struct`\n> Lines: 133-144\n```\nconst Config = struct {\nname: []const u8 = \"default\",\nmax_retries: u32 = 3,\ntimeout_ms: u64 = 5000,\ndebug: bool = false,\npub fn testing() Config {\nreturn .{ .debug = true, .name = \"test\" };\n}\n};\n```\n\n### FUNCTION: `testing`\n> Signature: `pub fn testing() Config`\n> Lines: 141-143\n- @return Config with debug=true.\n```\npub fn testing() Config {\nreturn .{ .debug = true, .name = \"test\" };\n}\n```\n\n### ENUM: `Color`\n> Signature: `const Color = enum`\n> Lines: 149-164\n```\nconst Color = enum {\nred,\ngreen,\nblue,\npub fn toRgb(self: Color) u32 {\nreturn switch (self) {\n.red => 0xFF0000,\n.green => 0x00FF00,\n.blue => 0x0000FF,\n};\n}\n};\n```\n\n### FUNCTION: `toRgb`\n> Signature: `pub fn toRgb(self: Color) u32`\n> Lines: 157-163\n- @param self The color variant.\n- @return 24-bit RGB integer.\n```\npub fn toRgb(self: Color) u32 {\nreturn switch (self) {\n.red => 0xFF0000,\n.green => 0x00FF00,\n.blue => 0x0000FF,\n};\n}\n```\n\n### ENUM: `Status`\n> Signature: `const Status = enum(u8)`\n> Lines: 167-172\n```\nconst Status = enum(u8) {\nidle = 0,\nrunning = 1,\nerror = 2,\ndone = 3,\n};\n```\n\n### UNION: `Result`\n> Signature: `const Result = union(enum)`\n> Lines: 177-187\n```\nconst Result = union(enum) {\nok: i32,\nerr: []const u8,\npub fn isOk(self: Result) bool {\nreturn self == .ok;\n}\n};\n```\n\n### FUNCTION: `isOk`\n> Signature: `pub fn isOk(self: Result) bool`\n> Lines: 184-186\n- @param self The result to inspect.\n- @return True if variant is ok.\n```\npub fn isOk(self: Result) bool {\nreturn self == .ok;\n}\n```\n\n### UNION: `ExternData`\n> Signature: `const ExternData = extern union`\n> Lines: 190-194\n```\nconst ExternData = extern union {\nint_val: i32,\nfloat_val: f32,\nbytes: [4]u8,\n};\n```\n\n### CONSTANT: `MAX_SIZE`\n> Signature: `const MAX_SIZE: usize = 1024`\n> Lines: 199-199\n- @brief Maximum allocation size in bytes.\n```\nconst MAX_SIZE: usize = 1024;\n```\n\n### VARIABLE: `global_state`\n> Signature: `pub var global_state: i32 = 0`\n> Lines: 202-202\n- @brief Global mutable state counter.\n```\npub var global_state: i32 = 0;\n```\n\n### CONSTANT: `MAGIC_NUMBER`\n> Signature: `const MAGIC_NUMBER: u32 = comptime blk:`\n> Lines: 205-205\n- @brief Compile-time computed constant.\n```\nconst MAGIC_NUMBER: u32 = comptime blk: {\n```\n\n### VARIABLE: `x`\n> Signature: `var x: u32 = 1`\n> Lines: 206-206\n```\nvar x: u32 = 1;\n```\n\n### CONSTANT: `ParseError`\n> Signature: `const ParseError = error`\n> Lines: 214-214\n```\nconst ParseError = error{\n```\n\n### CONSTANT: `result`\n> Signature: `const result = add(2, 3)`\n> Lines: 225-225\n```\nconst result = add(2, 3);\n```\n\n### CONSTANT: `result`\n> Signature: `const result = safeDivide(10, 0)`\n> Lines: 231-231\n```\nconst result = safeDivide(10, 0);\n```\n\n### CONSTANT: `items`\n> Signature: `const items = [_]i32{ 1, 2, 3, 4, 5 }`\n> Lines: 237-237\n```\nconst items = [_]i32{ 1, 2, 3, 4, 5 };\n```\n\n### CONSTANT: `idx`\n> Signature: `const idx = indexOf(i32, &items, 3)`\n> Lines: 238-238\n```\nconst idx = indexOf(i32, &items, 3);\n```\n\n### IMPORT: `io`\n> Lines: 243-243\n```\nconst io = @import(\"std\");\n```\n\n### IMPORT: `fs`\n> Lines: 244-244\n```\nconst fs = @import(\"std\");\n```\n\n### IMPORT: `mem`\n> Lines: 245-245\n```\nconst mem = @import(\"std\");\n```\n\n### IMPORT: `math`\n> Lines: 246-246\n```\nconst math = @import(\"std\");\n```\n\n### IMPORT: `json`\n> Lines: 247-247\n```\nconst json = @import(\"std\");\n```\n\n### ENUM: `Mode`\n> Signature: `const Mode = enum { fast, safe }`\n> Lines: 248-248\n```\nconst Mode = enum { fast, safe };\n```\n\n### ENUM: `Phase`\n> Signature: `const Phase = enum { init, done }`\n> Lines: 249-249\n```\nconst Phase = enum { init, done };\n```\n\n### ENUM: `Signal`\n> Signature: `const Signal = enum { on, off }`\n> Lines: 250-250\n```\nconst Signal = enum { on, off };\n```\n\n### STRUCT: `Packet`\n> Signature: `const Packet = struct { id: i32 }`\n> Lines: 251-251\n```\nconst Packet = struct { id: i32 };\n```\n\n### STRUCT: `Limits`\n> Signature: `const Limits = struct { max: i32 }`\n> Lines: 252-252\n```\nconst Limits = struct { max: i32 };\n```\n\n### UNION: `Variant`\n> Signature: `const Variant = union { i: i32, f: f32 }`\n> Lines: 253-253\n```\nconst Variant = union { i: i32, f: f32 };\n```\n\n### UNION: `Payload`\n> Signature: `const Payload = extern union { a: i32, b: i32 }`\n> Lines: 254-254\n```\nconst Payload = extern union { a: i32, b: i32 };\n```\n\n### UNION: `Message`\n> Signature: `const Message = union { txt: [4]u8, len: u32 }`\n> Lines: 255-255\n```\nconst Message = union { txt: [4]u8, len: u32 };\n```\n\n### VARIABLE: `retries`\n> Signature: `var retries: i32 = 0`\n> Lines: 256-256\n```\nvar retries: i32 = 0;\n```\n\n### VARIABLE: `pointer`\n> Signature: `var pointer: usize = 0`\n> Lines: 257-257\n```\nvar pointer: usize = 0;\n```\n\n### FUNCTION: `reqCoverZig1`\n> Signature: `fn reqCoverZig1(value: i32) i32 { return value + 1; }`\n> Lines: 265-265\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\nfn reqCoverZig1(value: i32) i32 { return value + 1; }\n```\n\n### FUNCTION: `reqCoverZig2`\n> Signature: `fn reqCoverZig2(value: i32) i32 { return value + 2; }`\n> Lines: 272-272\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\nfn reqCoverZig2(value: i32) i32 { return value + 2; }\n```\n\n### FUNCTION: `reqCoverZig3`\n> Signature: `fn reqCoverZig3(value: i32) i32 { return value + 3; }`\n> Lines: 279-279\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\nfn reqCoverZig3(value: i32) i32 { return value + 3; }\n```\n\n### FUNCTION: `reqCoverZig4`\n> Signature: `fn reqCoverZig4(value: i32) i32 { return value + 4; }`\n> Lines: 286-286\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\nfn reqCoverZig4(value: i32) i32 { return value + 4; }\n```\n\n### FUNCTION: `reqCoverZig5`\n> Signature: `fn reqCoverZig5(value: i32) i32 { return value + 5; }`\n> Lines: 293-293\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\nfn reqCoverZig5(value: i32) i32 { return value + 5; }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_c.c | c\n- @brief Comprehensive C language test fixture for parser validation.\n- @details Covers structs, unions, enums, function pointers, inline functions,\npreprocessor directives, bitfields, variadic functions, and complex\ntypedef chains that stress-test regex-based parsing.\n\n### IMPORT: `\"myheader.h\"`\n> Lines: 14-14\n```\n14: #include \"myheader.h\"\n```\n\n### IMPORT: `<stdarg.h>`\n> Lines: 15-15\n```\n15: #include <stdarg.h>\n```\n\n### IMPORT: `<stdio.h>`\n> Lines: 16-16\n```\n16: #include <stdio.h>\n```\n\n### IMPORT: `<stdlib.h>`\n> Lines: 17-17\n```\n17: #include <stdlib.h>\n```\n\n### IMPORT: `<string.h>`\n> Lines: 18-18\n```\n18: #include <string.h>\n```\n\n### MACRO: `MAX_SIZE`\n> Signature: `#define MAX_SIZE 100`\n> Lines: 22-22\n```\n22: #define MAX_SIZE 100\n```\n\n### MACRO: `CLAMP`\n> Signature: `#define CLAMP(val, lo, hi) ((val) < (lo) ? (lo) : ((val) > (hi) ? (hi) : (val)))`\n> Lines: 31-31\n- @brief Constrain value between lower and upper bounds.\n- @param val Value to clamp.\n- @param lo Minimum allowed value.\n- @param hi Maximum allowed value.\n```\n31: #define CLAMP(val, lo, hi) ((val) < (lo) ? (lo) : ((val) > (hi) ? (hi) : (val)))\n```\n\n### MACRO: `STRINGIFY`\n> Signature: `#define STRINGIFY(x) #x`\n> Lines: 34-34\n```\n34: #define STRINGIFY(x) #x\n```\n\n### MACRO: `CONCAT`\n> Signature: `#define CONCAT(a, b) a##b`\n> Lines: 40-40\n- @brief Token-pasting macro joining two identifiers.\n```\n40: #define CONCAT(a, b) a##b\n```\n\n### MACRO: `LOG`\n> Signature: `#define LOG(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)`\n> Lines: 43-43\n```\n43: #define LOG(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)\n```\n\n### MACRO: `LOG`\n> Signature: `#define LOG(fmt, ...) ((void)0)`\n> Lines: 45-45\n```\n45: #define LOG(fmt, ...) ((void)0)\n```\n\n### TYPEDEF: `my_int`\n> Signature: `typedef int my_int`\n> Lines: 51-51\n```\n51: typedef int my_int;\n```\n\n### TYPEDEF: `byte_t`\n> Signature: `typedef unsigned char byte_t`\n> Lines: 54-54\n```\n54: typedef unsigned char byte_t;\n```\n\n### STRUCT: `Point`\n> Signature: `struct Point`\n> Lines: 62-65\n- @brief 2D point with integer coordinates.\n- @brief Horizontal coordinate.\n- @brief Vertical coordinate.\n```\n62: struct Point {\n63: int x;\n64: int y;\n65: };\n```\n\n### STRUCT: `PackedFlags`\n> Signature: `struct PackedFlags`\n> Lines: 71-76\n- @brief Bitfield struct testing parser handling of colon-separated widths.\n- @brief Read permission flag.\n- @brief Write permission flag.\n- @brief Execute permission flag.\n```\n71: struct PackedFlags {\n72: unsigned int readable : 1;\n73: unsigned int writable : 1;\n74: unsigned int executable : 1;\n75: unsigned int reserved : 5;\n76: };\n```\n\n### STRUCT: `Node`\n> Signature: `struct Node`\n> Lines: 82-89\n- @brief Self-referential linked-list node with embedded anonymous union.\n- @brief Payload can hold either an integer or float value.\n```\n82: struct Node {\n84: union {\n85: int i_val;\n86: float f_val;\n87: } payload;\n88: struct Node *next;\n89: };\n```\n\n### VARIABLE: `i_val`\n> Signature: `int i_val`\n> Lines: 85-85\n- @brief Payload can hold either an integer or float value. */\n```\n85: int i_val;\n```\n\n### VARIABLE: `f_val`\n> Signature: `float f_val`\n> Lines: 86-86\n```\n86: float f_val;\n```\n\n### UNION: `Data`\n> Signature: `union Data`\n> Lines: 97-101\n- @brief Discriminated union for multi-type storage.\n- @brief Integer interpretation.\n- @brief Float interpretation.\n- @brief Fixed-size string buffer.\n```\n97: union Data {\n98: int i;\n99: float f;\n100: char s[16];\n101: };\n```\n\n### ENUM: `Color`\n> Signature: `enum Color`\n> Lines: 109-113\n- @brief Primary color identifiers for rendering pipeline.\n- @brief Red channel.\n- @brief Green channel.\n- @brief Blue channel.\n```\n109: enum Color {\n110: RED,\n111: GREEN,\n112: BLUE\n113: };\n```\n\n### FUNCTION: `int`\n> Signature: `typedef int (*comparator_fn)(const void *a, const void *b)`\n> Lines: 124-142\n- @brief Function pointer type for generic comparison callbacks.\n- @brief Unary transform callback operating on a single integer.\n- @param a Pointer to first element.\n- @param b Pointer to second element.\n- @return Negative if a<b, zero if equal, positive if a>b.\n```\n124: typedef int (*comparator_fn)(const void *a, const void *b);\n130: typedef int (*transform_fn)(int value);\n138: typedef struct {\n139: const char *name;\n140: comparator_fn handler;\n141: int priority;\n142: } callback_entry_t;\n```\n\n### FUNCTION: `int`\n> Signature: `typedef int (*transform_fn)(int value)`\n> Lines: 130-142\n- @brief Unary transform callback operating on a single integer.\n```\n130: typedef int (*transform_fn)(int value);\n138: typedef struct {\n139: const char *name;\n140: comparator_fn handler;\n141: int priority;\n142: } callback_entry_t;\n```\n\n### VARIABLE: `counter`\n> Signature: `static int counter = 0`\n> Lines: 147-147\n- @brief Module-scoped invocation counter, not visible externally. */\n```\n147: static int counter = 0;\n```\n\n### VARIABLE: `error_buffer`\n> Signature: `static char error_buffer[256] = {0}`\n> Lines: 150-150\n- @brief Global error message buffer shared across translation unit. */\n```\n150: static char error_buffer[256] = {0};\n```\n\n### FUNCTION: `min_val`\n> Signature: `static inline int min_val(int a, int b) { return a < b ? a : b; }`\n> Lines: 160-160\n- @brief Compute the minimum of two integers.\n- @param a First integer.\n- @param b Second integer.\n- @return The smaller of a and b.\n```\n160: static inline int min_val(int a, int b) { return a < b ? a : b; }\n```\n\n### FUNCTION: `greet`\n> Signature: `void greet(const char *name)`\n> Lines: 168-174\n- @brief Print a greeting message to stdout.\n- @param name The recipient name; must not be NULL.\n```\n168: void greet(const char *name) {\n170: if (name == NULL) {\n171: return;\n172: }\n173: printf(\"Hello %s\\n\", name);\n174: }\n```\n\n### FUNCTION: `main`\n> Signature: `int main(int argc, char **argv)`\n> Lines: 182-190\n- @brief Application entry point.\n- @param argc Argument count from the OS.\n- @param argv Argument vector; argv[0] is the program name.\n- @return Exit code: 0 on success, 1 on error.\n```\n182: int main(int argc, char **argv) {\n183: if (argc < 2) {\n185: fprintf(stderr, \"Usage: %s <name>\\n\", argv[0]);\n186: return 1;\n187: }\n188: greet(argv[1]);\n189: return 0;\n190: }\n```\n\n### FUNCTION: `sum_ints`\n> Signature: `int sum_ints(int count, ...)`\n> Lines: 200-210\n- @brief Compute the sum of a variable number of integers.\n- @param count Number of integer arguments that follow.\n- @param ... Variable integer arguments to sum.\n- @return The cumulative sum of all provided integers.\n```\n200: int sum_ints(int count, ...) {\n201: va_list ap;\n202: va_start(ap, count);\n203: int total = 0;\n205: for (int i = 0; i < count; i++) {\n206: total += va_arg(ap, int);\n207: }\n208: va_end(ap);\n209: return total;\n210: }\n```\n\n### VARIABLE: `total`\n> Signature: `int total = 0`\n> Lines: 203-203\n```\n203: int total = 0;\n```\n\n### FUNCTION: `apply_transform`\n> Signature: `void apply_transform(int *arr, size_t len, transform_fn fn)`\n> Lines: 220-225\n- @brief Apply a transform function to every element in an array.\n- @param arr Array of integers to transform in-place.\n- @param len Number of elements in arr.\n- @param fn Transform callback applied to each element.\n```\n220: void apply_transform(int *arr, size_t len, transform_fn fn) {\n221: for (size_t i = 0; i < len; i++) {\n223: arr[i] = fn(arr[i]);\n224: }\n225: }\n```\n\n### FUNCTION: `factorial`\n> Signature: `unsigned long factorial(unsigned int n)`\n> Lines: 234-241\n- @brief Compute factorial recursively.\n- @param n Non-negative integer input.\n- @return n! or 1 when n <= 1.\n```\n234: unsigned long factorial(unsigned int n) {\n236: if (n <= 1) {\n237: return 1;\n238: }\n240: return n * factorial(n - 1);\n241: }\n```\n\n### FUNCTION: `fast_copy`\n> Signature: `static void fast_copy(void *restrict dest, const void *restrict src, size_t n)`\n> Lines: 251-253\n- @brief Copy bytes between non-overlapping buffers.\n- @param dest Destination buffer (restrict-qualified).\n- @param src Source buffer (restrict-qualified).\n- @param n Number of bytes to copy.\n```\n251: static void fast_copy(void *restrict dest, const void *restrict src, size_t n) {\n252: memcpy(dest, src, n);\n253: }\n```\n\n### FUNCTION: `read_volatile`\n> Signature: `static int read_volatile(volatile int *reg) { return *reg; }`\n> Lines: 260-260\n- @brief Read a hardware register marked volatile.\n- @param reg Pointer to the memory-mapped register.\n- @return The current 32-bit register value.\n```\n260: static int read_volatile(volatile int *reg) { return *reg; }\n```\n\n### FUNCTION: `sum_fixed`\n> Signature: `int sum_fixed(int arr[static 10])`\n> Lines: 269-275\n- @brief Sum elements of a fixed-size array.\n- @param arr Array with at least 10 elements (compiler hint via static 10).\n- @return The sum of the first 10 elements.\n```\n269: int sum_fixed(int arr[static 10]) {\n270: int s = 0;\n271: for (int i = 0; i < 10; i++) {\n272: s += arr[i];\n273: }\n274: return s;\n275: }\n```\n\n### VARIABLE: `s`\n> Signature: `int s = 0`\n> Lines: 270-270\n```\n270: int s = 0;\n```\n\n### STRUCT: `Vector2`\n> Signature: `struct Vector2`\n> Lines: 278-281\n```\n278: struct Vector2 {\n279: int x;\n280: int y;\n281: };\n```\n\n### VARIABLE: `x`\n> Signature: `int x`\n> Lines: 279-279\n```\n279: int x;\n```\n\n### VARIABLE: `y`\n> Signature: `int y`\n> Lines: 280-280\n```\n280: int y;\n```\n\n### STRUCT: `Matrix2`\n> Signature: `struct Matrix2`\n> Lines: 282-285\n```\n282: struct Matrix2 {\n283: int a11;\n284: int a22;\n285: };\n```\n\n### VARIABLE: `a11`\n> Signature: `int a11`\n> Lines: 283-283\n```\n283: int a11;\n```\n\n### VARIABLE: `a22`\n> Signature: `int a22`\n> Lines: 284-284\n```\n284: int a22;\n```\n\n### ENUM: `StatusCode`\n> Signature: `enum StatusCode { STATUS_OK, STATUS_ERR, STATUS_UNKNOWN }`\n> Lines: 286-286\n```\n286: enum StatusCode { STATUS_OK, STATUS_ERR, STATUS_UNKNOWN };\n```\n\n### ENUM: `LevelCode`\n> Signature: `enum LevelCode { LEVEL_LOW, LEVEL_MEDIUM, LEVEL_HIGH }`\n> Lines: 287-287\n```\n287: enum LevelCode { LEVEL_LOW, LEVEL_MEDIUM, LEVEL_HIGH };\n```\n\n### ENUM: `ModeCode`\n> Signature: `enum ModeCode { MODE_A, MODE_B }`\n> Lines: 288-288\n```\n288: enum ModeCode { MODE_A, MODE_B };\n```\n\n### ENUM: `FlagCode`\n> Signature: `enum FlagCode { FLAG_ON, FLAG_OFF }`\n> Lines: 289-289\n```\n289: enum FlagCode { FLAG_ON, FLAG_OFF };\n```\n\n### UNION: `NumberValue`\n> Signature: `union NumberValue`\n> Lines: 290-293\n```\n290: union NumberValue {\n291: int i;\n292: float f;\n293: };\n```\n\n### VARIABLE: `i`\n> Signature: `int i`\n> Lines: 291-291\n```\n291: int i;\n```\n\n### VARIABLE: `f`\n> Signature: `float f`\n> Lines: 292-292\n```\n292: float f;\n```\n\n### UNION: `PtrValue`\n> Signature: `union PtrValue`\n> Lines: 294-297\n```\n294: union PtrValue {\n295: void *p;\n296: long l;\n297: };\n```\n\n### VARIABLE: `l`\n> Signature: `long l`\n> Lines: 296-296\n```\n296: long l;\n```\n\n### UNION: `StateValue`\n> Signature: `union StateValue`\n> Lines: 298-301\n```\n298: union StateValue {\n299: int s;\n300: char c;\n301: };\n```\n\n### VARIABLE: `s`\n> Signature: `int s`\n> Lines: 299-299\n```\n299: int s;\n```\n\n### VARIABLE: `c`\n> Signature: `char c`\n> Lines: 300-300\n```\n300: char c;\n```\n\n### UNION: `PairValue`\n> Signature: `union PairValue`\n> Lines: 302-305\n```\n302: union PairValue {\n303: int x;\n304: int y;\n305: };\n```\n\n### VARIABLE: `x`\n> Signature: `int x`\n> Lines: 303-303\n```\n303: int x;\n```\n\n### VARIABLE: `y`\n> Signature: `int y`\n> Lines: 304-304\n```\n304: int y;\n```\n\n### TYPEDEF: `index_t`\n> Signature: `typedef long index_t`\n> Lines: 306-306\n```\n306: typedef long index_t;\n```\n\n### TYPEDEF: `ratio_t`\n> Signature: `typedef float ratio_t`\n> Lines: 307-307\n```\n307: typedef float ratio_t;\n```\n\n### STRUCT: `Point`\n> Signature: `typedef struct Point point_t`\n> Lines: 308-319\n```\n308: typedef struct Point point_t;\n309: typedef double score_t;\n319: int req_cover_c_1(int value) { return value + 1; }\n```\n\n### TYPEDEF: `score_t`\n> Signature: `typedef double score_t`\n> Lines: 309-309\n```\n309: typedef double score_t;\n```\n\n### FUNCTION: `req_cover_c_1`\n> Signature: `int req_cover_c_1(int value) { return value + 1; }`\n> Lines: 319-319\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n319: int req_cover_c_1(int value) { return value + 1; }\n```\n\n### FUNCTION: `req_cover_c_2`\n> Signature: `int req_cover_c_2(int value) { return value + 2; }`\n> Lines: 328-328\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n328: int req_cover_c_2(int value) { return value + 2; }\n```\n\n### FUNCTION: `req_cover_c_3`\n> Signature: `int req_cover_c_3(int value) { return value + 3; }`\n> Lines: 337-337\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n337: int req_cover_c_3(int value) { return value + 3; }\n```\n\n### FUNCTION: `req_cover_c_4`\n> Signature: `int req_cover_c_4(int value) { return value + 4; }`\n> Lines: 346-346\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n346: int req_cover_c_4(int value) { return value + 4; }\n```\n\n### FUNCTION: `req_cover_c_5`\n> Signature: `int req_cover_c_5(int value) { return value + 5; }`\n> Lines: 355-355\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n355: int req_cover_c_5(int value) { return value + 5; }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_cpp.cpp.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_cpp.cpp | cpp\n- @brief Comprehensive C++ test fixture for parser stress-testing.\n- @details Covers templates, SFINAE, constexpr, lambdas, concepts, CRTP,\noperator overloading, move semantics, nested namespaces, and\nmodern C++20/23 constructs.\n\n### IMPORT: `<concepts>`\n> Lines: 13-13\n```\n13: #include <concepts>\n```\n\n### IMPORT: `<functional>`\n> Lines: 14-14\n```\n14: #include <functional>\n```\n\n### IMPORT: `<iostream>`\n> Lines: 15-15\n```\n15: #include <iostream>\n```\n\n### IMPORT: `<memory>`\n> Lines: 16-16\n```\n16: #include <memory>\n```\n\n### IMPORT: `<optional>`\n> Lines: 17-17\n```\n17: #include <optional>\n```\n\n### IMPORT: `<string>`\n> Lines: 18-18\n```\n18: #include <string>\n```\n\n### IMPORT: `<vector>`\n> Lines: 19-19\n```\n19: #include <vector>\n```\n\n### MACRO: `VERSION`\n> Signature: `#define VERSION 2`\n> Lines: 21-21\n```\n21: #define VERSION 2\n```\n\n### MACRO: `LIKELY`\n> Signature: `#define LIKELY(x) __builtin_expect(!!(x), 1)`\n> Lines: 24-24\n```\n24: #define LIKELY(x) __builtin_expect(!!(x), 1)\n```\n\n### NAMESPACE: `MyNS`\n> Signature: `namespace MyNS`\n> Lines: 28-299\n```\n28: namespace MyNS {\n36: template <typename T>\n37: concept Printable = requires(std::ostream &os, T val) {\n38: { os << val } -> std::same_as<std::ostream &>;\n39: };\n45: template <typename T>\n46: concept Numeric = std::integral<T> || std::floating_point<T>;\n55: template <Printable T> class Container {\n56: public:\n57: T value;\n63: explicit Container(T v) : value(std::move(v)) {}\n69: Container(const Container &other) = default;\n75: Container(Container &&other) noexcept = default;\n82: Container &operator=(const Container &other) = default;\n89: Container &operator=(Container &&other) noexcept = default;\n92: ~Container() = default;\n100: friend std::ostream &operator<<(std::ostream &os, const Container &c) {\n101: return os << c.value;\n102: }\n109: bool operator==(const Container &other) const { return value == other.value; }\n110: };\n118: struct Point {\n119: double x;\n120: double y;\n127: constexpr double dist_sq(const Point &other) const {\n129: double dx = x - other.x;\n130: double dy = y - other.y;\n131: return dx * dx + dy * dy;\n132: }\n139: constexpr Point operator+(const Point &rhs) const {\n140: return {x + rhs.x, y + rhs.y};\n141: }\n142: };\n150: enum class Direction {\n151: Up,\n152: Down,\n153: Left,\n154: Right\n155: };\n160: using StringVec = std::vector<std::string>;\n163: typedef int my_int_t;\n166: using Callback = std::function<void(int)>;\n175: template <typename Derived> class Cloneable {\n176: public:\n181: std::unique_ptr<Derived> clone() const {\n183: return std::make_unique<Derived>(static_cast<const Derived &>(*this));\n184: }\n185: };\n193: class Base {\n194: public:\n199: virtual const char *type_name() const = 0;\n200: virtual ~Base() = default;\n201: };\n207: class DerivedA : public virtual Base {\n208: public:\n209: const char *type_name() const override { return \"DerivedA\"; }\n210: };\n216: class DerivedB : public virtual Base {\n217: public:\n218: const char *type_name() const override { return \"DerivedB\"; }\n219: };\n225: class Diamond : public DerivedA, public DerivedB {\n226: public:\n227: const char *type_name() const override { return \"Diamond\"; }\n228: };\n237: constexpr unsigned long long constexpr_factorial(unsigned int n) {\n239: return n <= 1 ? 1ULL : n * constexpr_factorial(n - 1);\n240: }\n249: std::pair<std::string, std::string> parse_kv(const std::string &input) {\n250: auto pos = input.find('=');\n251: if (pos == std::string::npos) {\n253: return {\"\", \"\"};\n254: }\n255: return {input.substr(0, pos), input.substr(pos + 1)};\n256: }\n264: void greet(std::string name) { std::cout << \"Hello, \" << name << \"\\n\"; }\n270: int main() {\n272: auto [key, val] = parse_kv(\"lang=cpp\");\n273: greet(key);\n274: return 0;\n275: }\n284: constexpr auto square = [](auto x) { return x * x; };\n288: namespace Inner::Detail {\n295: inline std::string format_int(int v) { return std::to_string(v); }\n297: }\n299: }\n```\n\n### CLASS: `Container`\n> Signature: `template <Printable T> class Container`\n> Lines: 55-110\n- @brief Generic container with RAII semantics.\n@tparam T Element type; must satisfy Printable concept.\n- @brief Stored value of type T.\n```\n55: template <Printable T> class Container {\n56: public:\n57: T value;\n63: explicit Container(T v) : value(std::move(v)) {}\n69: Container(const Container &other) = default;\n75: Container(Container &&other) noexcept = default;\n82: Container &operator=(const Container &other) = default;\n89: Container &operator=(Container &&other) noexcept = default;\n92: ~Container() = default;\n100: friend std::ostream &operator<<(std::ostream &os, const Container &c) {\n101: return os << c.value;\n102: }\n109: bool operator==(const Container &other) const { return value == other.value; }\n110: };\n```\n\n### FUNCTION: `r`\n> Signature: `explicit Container(T v) : value(std::move(v)) {}`\n> Lines: 63-63\n- @brief Construct container with an initial value.\n- @param v The value to store.\n```\n63: explicit Container(T v) : value(std::move(v)) {}\n```\n\n### FUNCTION: `r`\n> Signature: `Container(const Container &other) = default`\n> Lines: 69-102\n- @brief Copy constructor performs deep copy.\n- @brief Move constructor transfers ownership.\n- @param other Source container to copy from.\n- @param other Source container; left in valid but unspecified state.\n```\n69: Container(const Container &other) = default;\n75: Container(Container &&other) noexcept = default;\n82: Container &operator=(const Container &other) = default;\n89: Container &operator=(Container &&other) noexcept = default;\n92: ~Container() = default;\n100: friend std::ostream &operator<<(std::ostream &os, const Container &c) {\n101: return os << c.value;\n102: }\n```\n\n### FUNCTION: `r`\n> Signature: `Container(Container &&other) noexcept = default`\n> Lines: 75-102\n- @brief Move constructor transfers ownership.\n- @brief Copy assignment operator.\n- @param other Source container; left in valid but unspecified state.\n- @param other Source container.\n- @return Reference to this container.\n```\n75: Container(Container &&other) noexcept = default;\n82: Container &operator=(const Container &other) = default;\n89: Container &operator=(Container &&other) noexcept = default;\n92: ~Container() = default;\n100: friend std::ostream &operator<<(std::ostream &os, const Container &c) {\n101: return os << c.value;\n102: }\n```\n\n### STRUCT: `Point`\n> Signature: `struct Point`\n> Lines: 118-142\n- @brief 2D coordinate with constexpr arithmetic support.\n- @brief X coordinate.\n- @brief Y coordinate.\n```\n118: struct Point {\n119: double x;\n120: double y;\n127: constexpr double dist_sq(const Point &other) const {\n129: double dx = x - other.x;\n130: double dy = y - other.y;\n131: return dx * dx + dy * dy;\n132: }\n139: constexpr Point operator+(const Point &rhs) const {\n140: return {x + rhs.x, y + rhs.y};\n141: }\n142: };\n```\n\n### FUNCTION: `dist_sq`\n> Signature: `constexpr double dist_sq(const Point &other) const`\n> Lines: 127-132\n- @brief Compute Euclidean distance squared to another point.\n- @param other Target point.\n- @return Distance squared (avoids sqrt overhead).\n```\n127: constexpr double dist_sq(const Point &other) const {\n129: double dx = x - other.x;\n130: double dy = y - other.y;\n131: return dx * dx + dy * dy;\n132: }\n```\n\n### ENUM: `Direction`\n> Signature: `enum class Direction`\n> Lines: 150-155\n- @brief Cardinal movement directions with strong typing.\n- @brief Move upward.\n- @brief Move downward.\n- @brief Move left.\n```\n150: enum class Direction {\n151: Up,\n152: Down,\n153: Left,\n154: Right\n155: };\n```\n\n### TYPE_ALIAS: `StringVec`\n> Signature: `using StringVec = std::vector<std::string>`\n> Lines: 160-160\n```\n160: using StringVec = std::vector<std::string>;\n```\n\n### TYPE_ALIAS: `int`\n> Signature: `typedef int my_int_t`\n> Lines: 163-163\n```\n163: typedef int my_int_t;\n```\n\n### TYPE_ALIAS: `Callback`\n> Signature: `using Callback = std::function<void(int)>`\n> Lines: 166-166\n```\n166: using Callback = std::function<void(int)>;\n```\n\n### CLASS: `Cloneable`\n> Signature: `template <typename Derived> class Cloneable`\n> Lines: 175-185\n- @brief CRTP base providing a polymorphic clone method.\n@tparam Derived The concrete class inheriting this base.\n- @brief Create a heap-allocated copy of the derived object.\n- @return Unique pointer to the cloned instance.\n```\n175: template <typename Derived> class Cloneable {\n176: public:\n181: std::unique_ptr<Derived> clone() const {\n183: return std::make_unique<Derived>(static_cast<const Derived &>(*this));\n184: }\n185: };\n```\n\n### CLASS: `Base`\n> Signature: `class Base`\n> Lines: 193-201\n- @brief Abstract base with a pure virtual method.\n- @brief Identify the concrete type at runtime.\n- @return A non-owning string literal naming the type.\n```\n193: class Base {\n194: public:\n199: virtual const char *type_name() const = 0;\n200: virtual ~Base() = default;\n201: };\n```\n\n### FUNCTION: `type_name`\n> Signature: `virtual const char *type_name() const = 0`\n> Lines: 199-207\n- @brief Identify the concrete type at runtime.\n- @return A non-owning string literal naming the type.\n```\n199: virtual const char *type_name() const = 0;\n200: virtual ~Base() = default;\n201: };\n207: class DerivedA : public virtual Base {\n```\n\n### CLASS: `DerivedA`\n> Signature: `class DerivedA : public virtual Base`\n> Lines: 207-210\n- @brief First concrete implementation of Base.\n```\n207: class DerivedA : public virtual Base {\n208: public:\n209: const char *type_name() const override { return \"DerivedA\"; }\n210: };\n```\n\n### FUNCTION: `type_name`\n> Signature: `const char *type_name() const override { return \"DerivedA\"; }`\n> Lines: 209-209\n```\n209: const char *type_name() const override { return \"DerivedA\"; }\n```\n\n### CLASS: `DerivedB`\n> Signature: `class DerivedB : public virtual Base`\n> Lines: 216-219\n- @brief Second concrete implementation for diamond inheritance testing.\n```\n216: class DerivedB : public virtual Base {\n217: public:\n218: const char *type_name() const override { return \"DerivedB\"; }\n219: };\n```\n\n### FUNCTION: `type_name`\n> Signature: `const char *type_name() const override { return \"DerivedB\"; }`\n> Lines: 218-218\n```\n218: const char *type_name() const override { return \"DerivedB\"; }\n```\n\n### CLASS: `Diamond`\n> Signature: `class Diamond : public DerivedA, public DerivedB`\n> Lines: 225-228\n- @brief Diamond inheritance: inherits from both DerivedA and DerivedB.\n```\n225: class Diamond : public DerivedA, public DerivedB {\n226: public:\n227: const char *type_name() const override { return \"Diamond\"; }\n228: };\n```\n\n### FUNCTION: `type_name`\n> Signature: `const char *type_name() const override { return \"Diamond\"; }`\n> Lines: 227-227\n```\n227: const char *type_name() const override { return \"Diamond\"; }\n```\n\n### FUNCTION: `f`\n> Signature: `if (pos == std::string::npos)`\n> Lines: 251-254\n- @brief Parse a key=value string into its components.\n- @param input String in \"key=value\" format.\n- @return Pair of key and value; empty strings if malformed.\n```\n251: if (pos == std::string::npos) {\n253: return {\"\", \"\"};\n254: }\n```\n\n### FUNCTION: `greet`\n> Signature: `void greet(std::string name) { std::cout << \"Hello, \" << name << \"\\n\"; }`\n> Lines: 264-264\n- @brief Greet a person by name on stdout.\n- @param name The person's name to display.\n```\n264: void greet(std::string name) { std::cout << \"Hello, \" << name << \"\\n\"; }\n```\n\n### FUNCTION: `main`\n> Signature: `int main()`\n> Lines: 270-275\n- @brief Program entry point.\n- @return 0 on success.\n```\n270: int main() {\n272: auto [key, val] = parse_kv(\"lang=cpp\");\n273: greet(key);\n274: return 0;\n275: }\n```\n\n### FUNCTION: `t`\n> Signature: `greet(key)`\n> Lines: 273-284\n```\n273: greet(key);\n274: return 0;\n275: }\n284: constexpr auto square = [](auto x) { return x * x; };\n```\n\n### NAMESPACE: `Inner`\n> Signature: `namespace Inner::Detail`\n> Lines: 288-297\n- @brief Internal helper formatting integers to strings.\n- @param v The integer to format.\n- @return Formatted string representation.\n```\n288: namespace Inner::Detail {\n295: inline std::string format_int(int v) { return std::to_string(v); }\n297: }\n```\n\n### FUNCTION: `format_int`\n> Signature: `inline std::string format_int(int v) { return std::to_string(v); }`\n> Lines: 295-295\n- @brief Internal helper formatting integers to strings.\n- @param v The integer to format.\n- @return Formatted string representation.\n```\n295: inline std::string format_int(int v) { return std::to_string(v); }\n```\n\n### FUNCTION: `std::to_string`\n> Signature: `return std::to_string(value)`\n> Lines: 310-318\n- @brief SFINAE-enabled serialize function for Numeric types.\n@tparam T Numeric type.\n- @brief Overload for string serialization (identity transform).\n- @param value The numeric value to serialize.\n- @param value The string to serialize.\n- @return String representation of the value.\n- @return The input string unchanged.\n```\n310: return std::to_string(value);\n311: }\n318: inline std::string serialize(const std::string &value) { return value; }\n```\n\n### FUNCTION: `serialize`\n> Signature: `inline std::string serialize(const std::string &value) { return value; }`\n> Lines: 318-318\n- @brief Overload for string serialization (identity transform).\n- @param value The string to serialize.\n- @return The input string unchanged.\n```\n318: inline std::string serialize(const std::string &value) { return value; }\n```\n\n### STRUCT: `Pixel`\n> Signature: `struct Pixel`\n> Lines: 321-325\n```\n321: struct Pixel {\n322: int r;\n323: int g;\n324: int b;\n325: };\n```\n\n### STRUCT: `Size`\n> Signature: `struct Size`\n> Lines: 326-329\n```\n326: struct Size {\n327: int w;\n328: int h;\n329: };\n```\n\n### STRUCT: `Bounds`\n> Signature: `struct Bounds`\n> Lines: 330-335\n```\n330: struct Bounds {\n331: int x;\n332: int y;\n333: int w;\n334: int h;\n335: };\n```\n\n### STRUCT: `Marker`\n> Signature: `struct Marker`\n> Lines: 336-338\n```\n336: struct Marker {\n337: int id;\n338: };\n```\n\n### ENUM: `Mode`\n> Signature: `enum Mode { ModeA, ModeB }`\n> Lines: 339-339\n```\n339: enum Mode { ModeA, ModeB };\n```\n\n### ENUM: `State`\n> Signature: `enum State { StateIdle, StateBusy }`\n> Lines: 340-340\n```\n340: enum State { StateIdle, StateBusy };\n```\n\n### ENUM: `Grade`\n> Signature: `enum Grade { GradeA, GradeB }`\n> Lines: 341-341\n```\n341: enum Grade { GradeA, GradeB };\n```\n\n### ENUM: `Severity`\n> Signature: `enum Severity { SevLow, SevHigh }`\n> Lines: 342-342\n```\n342: enum Severity { SevLow, SevHigh };\n```\n\n### NAMESPACE: `extns`\n> Signature: `namespace extns`\n> Lines: 343-345\n```\n343: namespace extns {\n344: inline int add_one(int v) { return v + 1; }\n345: }\n```\n\n### FUNCTION: `add_one`\n> Signature: `inline int add_one(int v) { return v + 1; }`\n> Lines: 344-344\n```\n344: inline int add_one(int v) { return v + 1; }\n```\n\n### NAMESPACE: `ext_alpha`\n> Signature: `namespace ext_alpha`\n> Lines: 346-348\n```\n346: namespace ext_alpha {\n347: inline int ping() { return 1; }\n348: }\n```\n\n### FUNCTION: `ping`\n> Signature: `inline int ping() { return 1; }`\n> Lines: 347-347\n```\n347: inline int ping() { return 1; }\n```\n\n### NAMESPACE: `ext_beta`\n> Signature: `namespace ext_beta`\n> Lines: 349-351\n```\n349: namespace ext_beta {\n350: inline int pong() { return 2; }\n351: }\n```\n\n### FUNCTION: `pong`\n> Signature: `inline int pong() { return 2; }`\n> Lines: 350-350\n```\n350: inline int pong() { return 2; }\n```\n\n### MACRO: `FEATURE_ALPHA`\n> Signature: `#define FEATURE_ALPHA 1`\n> Lines: 352-352\n```\n352: #define FEATURE_ALPHA 1\n```\n\n### MACRO: `FEATURE_BETA`\n> Signature: `#define FEATURE_BETA 2`\n> Lines: 353-353\n```\n353: #define FEATURE_BETA 2\n```\n\n### MACRO: `FEATURE_GAMMA`\n> Signature: `#define FEATURE_GAMMA 3`\n> Lines: 354-354\n```\n354: #define FEATURE_GAMMA 3\n```\n\n### TYPE_ALIAS: `NumberVec`\n> Signature: `using NumberVec = std::vector<int>`\n> Lines: 355-355\n```\n355: using NumberVec = std::vector<int>;\n```\n\n### TYPE_ALIAS: `long`\n> Signature: `typedef long LongId`\n> Lines: 356-356\n```\n356: typedef long LongId;\n```\n\n### FUNCTION: `req_cover_cpp_1`\n> Signature: `int req_cover_cpp_1(int value) { return value + 1; }`\n> Lines: 366-366\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n366: int req_cover_cpp_1(int value) { return value + 1; }\n```\n\n### FUNCTION: `req_cover_cpp_2`\n> Signature: `int req_cover_cpp_2(int value) { return value + 2; }`\n> Lines: 375-375\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n375: int req_cover_cpp_2(int value) { return value + 2; }\n```\n\n### FUNCTION: `req_cover_cpp_3`\n> Signature: `int req_cover_cpp_3(int value) { return value + 3; }`\n> Lines: 384-384\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n384: int req_cover_cpp_3(int value) { return value + 3; }\n```\n\n### FUNCTION: `req_cover_cpp_4`\n> Signature: `int req_cover_cpp_4(int value) { return value + 4; }`\n> Lines: 393-393\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n393: int req_cover_cpp_4(int value) { return value + 4; }\n```\n\n### FUNCTION: `req_cover_cpp_5`\n> Signature: `int req_cover_cpp_5(int value) { return value + 5; }`\n> Lines: 402-402\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n402: int req_cover_cpp_5(int value) { return value + 5; }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_csharp.cs.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_csharp.cs | csharp\n\n### IMPORT: `System`\n> Lines: 9-9\n```\n9: using System;\n```\n\n### IMPORT: `System.Collections.Generic`\n> Lines: 10-10\n```\n10: using System.Collections.Generic;\n```\n\n### IMPORT: `System.Linq`\n> Lines: 11-11\n```\n11: using System.Linq;\n```\n\n### IMPORT: `System.Threading.Tasks`\n> Lines: 12-12\n```\n12: using System.Threading.Tasks;\n```\n\n### IMPORT: `System.Threading`\n> Lines: 13-13\n```\n13: using System.Threading;\n```\n\n### NAMESPACE: `MyApp`\n> Signature: `namespace MyApp`\n> Lines: 15-314\n```\n15: namespace MyApp {\n24: public delegate void DataChangedHandler(object sender, string data);\n32: public delegate T Transform<T>(T value);\n39: [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]\n40: public class AuditableAttribute : Attribute {\n42: public int Level { get; set; } = 1;\n43: }\n51: [Serializable]\n52: [Auditable(Level = 2)]\n53: public class Person : IComparable<Person>, IDisposable {\n55: public const int MAX_AGE = 150;\n58: private static int _instanceCount = 0;\n61: private string _name;\n68: public string Name {\n69: get => _name;\n70: set {\n72: if (string.IsNullOrWhiteSpace(value))\n73: throw new ArgumentException(\"Name cannot be empty\");\n74: _name = value;\n75: }\n76: }\n79: public int Age { get; init; }\n82: public string? Email { get; set; }\n85: public Guid Id { get; } = Guid.NewGuid();\n90: public event DataChangedHandler? OnDataChanged;\n97: public Person(string name, int age) {\n98: _name = name;\n99: Age = age;\n100: Interlocked.Increment(ref _instanceCount);\n101: }\n106: public void Greet() {\n108: OnDataChanged?.Invoke(this, $\"Greeted {Name}\");\n109: Console.WriteLine($\"Hello, {Name}!\");\n110: }\n117: public static async Task<string> FetchAsync(CancellationToken token = default) {\n118: await Task.Delay(100, token);\n119: return \"data\";\n120: }\n127: public int CompareTo(Person? other) {\n128: if (other is null) return 1;\n129: return Age.CompareTo(other.Age);\n130: }\n135: public void Dispose() {\n137: Interlocked.Decrement(ref _instanceCount);\n138: GC.SuppressFinalize(this);\n139: }\n146: public object? this[string propertyName] {\n147: get {\n148: return propertyName switch {\n149: \"Name\" => Name,\n150: \"Age\" => Age,\n151: \"Email\" => Email,\n152: _ => null,\n153: };\n154: }\n155: }\n162: public void Deconstruct(out string name, out int age) {\n163: name = Name;\n164: age = Age;\n165: }\n171: public static int GetInstanceCount() => _instanceCount;\n172: }\n179: public interface IGreeter {\n184: void SayHello(string name);\n190: void SayGoodbye(string name) {\n191: Console.WriteLine($\"Goodbye, {name}\");\n192: }\n193: }\n199: public interface IRepository<T> where T : class, new() {\n201: Task<T?> FindByIdAsync(int id);\n204: IAsyncEnumerable<T> GetAllAsync(CancellationToken token = default);\n207: Task<bool> SaveAsync(T entity);\n208: }\n215: public readonly struct Point {\n217: public double X { get; init; }\n219: public double Y { get; init; }\n224: public static Point operator +(Point a, Point b) => new() { X = a.X + b.X, Y = a.Y + b.Y };\n229: public double Magnitude => Math.Sqrt(X * X + Y * Y);\n230: }\n237: [Flags]\n238: public enum Color {\n240: None = 0,\n242: Red = 1,\n244: Green = 2,\n246: Blue = 4,\n248: All = Red | Green | Blue,\n249: }\n258: public record ConfigEntry(string Key, string Value);\n265: public record struct Vector2(double X, double Y);\n272: public static class StringExtensions {\n279: public static string Truncate(this string str, int maxLength) {\n280: if (str.Length <= maxLength) return str;\n281: return str[..maxLength] + \"...\";\n282: }\n289: public static bool IsAscii(this string str) {\n290: return str.All(c => c < 128);\n291: }\n292: }\n300: public class SortedCollection<T> where T : IComparable<T> {\n301: private readonly List<T> _items = new();\n307: public void Add(T item) {\n309: var index = _items.BinarySearch(item);\n310: if (index < 0) index = ~index;\n311: _items.Insert(index, item);\n312: }\n```\n\n### DECORATOR: `AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)`\n> Lines: 39-39\n```\n39: [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]\n```\n\n### CLASS: `AuditableAttribute`\n> Signature: `public class AuditableAttribute : Attribute`\n> Lines: 40-43\n```\n40: public class AuditableAttribute : Attribute {\n42: public int Level { get; set; } = 1;\n43: }\n```\n\n### PROPERTY: `Level`\n> Signature: `public int Level { get; set; } = 1`\n> Lines: 42-42\n```\n42: public int Level { get; set; } = 1;\n```\n\n### DECORATOR: `Serializable`\n> Lines: 51-51\n```\n51: [Serializable]\n```\n\n### DECORATOR: `Auditable(Level = 2)`\n> Lines: 52-52\n```\n52: [Auditable(Level = 2)]\n```\n\n### CLASS: `Person`\n> Signature: `public class Person : IComparable<Person>, IDisposable`\n> Lines: 53-172\n```\n53: public class Person : IComparable<Person>, IDisposable {\n55: public const int MAX_AGE = 150;\n58: private static int _instanceCount = 0;\n61: private string _name;\n68: public string Name {\n69: get => _name;\n70: set {\n72: if (string.IsNullOrWhiteSpace(value))\n73: throw new ArgumentException(\"Name cannot be empty\");\n74: _name = value;\n75: }\n76: }\n79: public int Age { get; init; }\n82: public string? Email { get; set; }\n85: public Guid Id { get; } = Guid.NewGuid();\n90: public event DataChangedHandler? OnDataChanged;\n97: public Person(string name, int age) {\n98: _name = name;\n99: Age = age;\n100: Interlocked.Increment(ref _instanceCount);\n101: }\n106: public void Greet() {\n108: OnDataChanged?.Invoke(this, $\"Greeted {Name}\");\n109: Console.WriteLine($\"Hello, {Name}!\");\n110: }\n117: public static async Task<string> FetchAsync(CancellationToken token = default) {\n118: await Task.Delay(100, token);\n119: return \"data\";\n120: }\n127: public int CompareTo(Person? other) {\n128: if (other is null) return 1;\n129: return Age.CompareTo(other.Age);\n130: }\n135: public void Dispose() {\n137: Interlocked.Decrement(ref _instanceCount);\n138: GC.SuppressFinalize(this);\n139: }\n146: public object? this[string propertyName] {\n147: get {\n148: return propertyName switch {\n149: \"Name\" => Name,\n150: \"Age\" => Age,\n151: \"Email\" => Email,\n152: _ => null,\n153: };\n154: }\n155: }\n162: public void Deconstruct(out string name, out int age) {\n163: name = Name;\n164: age = Age;\n165: }\n171: public static int GetInstanceCount() => _instanceCount;\n172: }\n```\n\n### CONSTANT: `MAX_AGE`\n> Signature: `public const int MAX_AGE = 150`\n> Lines: 55-55\n```\n55: public const int MAX_AGE = 150;\n```\n\n### PROPERTY: `Name`\n> Signature: `public string Name`\n> Lines: 68-68\n```\n68: public string Name {\n```\n\n### PROPERTY: `Age`\n> Signature: `public int Age { get; init; }`\n> Lines: 79-79\n```\n79: public int Age { get; init; }\n```\n\n### PROPERTY: `Id`\n> Signature: `public Guid Id { get; } = Guid.NewGuid()`\n> Lines: 85-85\n```\n85: public Guid Id { get; } = Guid.NewGuid();\n```\n\n### FUNCTION: `Person`\n> Signature: `public Person(string name, int age)`\n> Lines: 97-101\n- @brief Construct a new Person with name and age.\n- @details Initializes backing fields and updates instance counters.\n- @param name Display name (required).\n- @param age Age in years (must be 0..MAX_AGE).\n- @return Constructed Person instance.\n```\n97: public Person(string name, int age) {\n98: _name = name;\n99: Age = age;\n100: Interlocked.Increment(ref _instanceCount);\n101: }\n```\n\n### FUNCTION: `Greet`\n> Signature: `public void Greet()`\n> Lines: 106-110\n```\n106: public void Greet() {\n108: OnDataChanged?.Invoke(this, $\"Greeted {Name}\");\n109: Console.WriteLine($\"Hello, {Name}!\");\n110: }\n```\n\n### FUNCTION: `FetchAsync`\n> Signature: `public static async Task<string> FetchAsync(CancellationToken token = default)`\n> Lines: 117-120\n- @brief Fetch person data asynchronously with cancellation support.\n- @details Waits asynchronously and returns a deterministic payload.\n- @details Supports cancellation through token propagation.\n- @param token Cancellation token for cooperative cancellation.\n- @return Formatted data string.\n```\n117: public static async Task<string> FetchAsync(CancellationToken token = default) {\n118: await Task.Delay(100, token);\n119: return \"data\";\n120: }\n```\n\n### FUNCTION: `CompareTo`\n> Signature: `public int CompareTo(Person? other)`\n> Lines: 127-130\n- @brief Compare persons by age for sorting.\n- @details Implements IComparable ordering semantics.\n- @details Null values are ordered after non-null instances.\n- @param other Person to compare with.\n- @return Comparison result: negative, zero, or positive.\n```\n127: public int CompareTo(Person? other) {\n128: if (other is null) return 1;\n129: return Age.CompareTo(other.Age);\n130: }\n```\n\n### FUNCTION: `Dispose`\n> Signature: `public void Dispose()`\n> Lines: 135-139\n```\n135: public void Dispose() {\n137: Interlocked.Decrement(ref _instanceCount);\n138: GC.SuppressFinalize(this);\n139: }\n```\n\n### FUNCTION: `Deconstruct`\n> Signature: `public void Deconstruct(out string name, out int age)`\n> Lines: 162-165\n```\n162: public void Deconstruct(out string name, out int age) {\n163: name = Name;\n164: age = Age;\n165: }\n```\n\n### FUNCTION: `GetInstanceCount`\n> Signature: `public static int GetInstanceCount() => _instanceCount`\n> Lines: 171-179\n```\n171: public static int GetInstanceCount() => _instanceCount;\n172: }\n179: public interface IGreeter {\n```\n\n### INTERFACE: `IGreeter`\n> Signature: `public interface IGreeter`\n> Lines: 179-193\n```\n179: public interface IGreeter {\n184: void SayHello(string name);\n190: void SayGoodbye(string name) {\n191: Console.WriteLine($\"Goodbye, {name}\");\n192: }\n193: }\n```\n\n### FUNCTION: `SayHello`\n> Signature: `void SayHello(string name)`\n> Lines: 184-192\n```\n184: void SayHello(string name);\n190: void SayGoodbye(string name) {\n191: Console.WriteLine($\"Goodbye, {name}\");\n192: }\n```\n\n### FUNCTION: `SayGoodbye`\n> Signature: `void SayGoodbye(string name)`\n> Lines: 190-192\n```\n190: void SayGoodbye(string name) {\n191: Console.WriteLine($\"Goodbye, {name}\");\n192: }\n```\n\n### INTERFACE: `IRepository`\n> Signature: `public interface IRepository<T> where T : class, new()`\n> Lines: 199-208\n```\n199: public interface IRepository<T> where T : class, new() {\n201: Task<T?> FindByIdAsync(int id);\n204: IAsyncEnumerable<T> GetAllAsync(CancellationToken token = default);\n207: Task<bool> SaveAsync(T entity);\n208: }\n```\n\n### FUNCTION: `FindByIdAsync`\n> Signature: `Task<T?> FindByIdAsync(int id)`\n> Lines: 201-215\n```\n201: Task<T?> FindByIdAsync(int id);\n204: IAsyncEnumerable<T> GetAllAsync(CancellationToken token = default);\n207: Task<bool> SaveAsync(T entity);\n208: }\n215: public readonly struct Point {\n```\n\n### FUNCTION: `GetAllAsync`\n> Signature: `IAsyncEnumerable<T> GetAllAsync(CancellationToken token = default)`\n> Lines: 204-215\n```\n204: IAsyncEnumerable<T> GetAllAsync(CancellationToken token = default);\n207: Task<bool> SaveAsync(T entity);\n208: }\n215: public readonly struct Point {\n```\n\n### FUNCTION: `SaveAsync`\n> Signature: `Task<bool> SaveAsync(T entity)`\n> Lines: 207-215\n```\n207: Task<bool> SaveAsync(T entity);\n208: }\n215: public readonly struct Point {\n```\n\n### STRUCT: `Point`\n> Signature: `public readonly struct Point`\n> Lines: 215-230\n```\n215: public readonly struct Point {\n217: public double X { get; init; }\n219: public double Y { get; init; }\n224: public static Point operator +(Point a, Point b) => new() { X = a.X + b.X, Y = a.Y + b.Y };\n229: public double Magnitude => Math.Sqrt(X * X + Y * Y);\n230: }\n```\n\n### PROPERTY: `X`\n> Signature: `public double X { get; init; }`\n> Lines: 217-217\n```\n217: public double X { get; init; }\n```\n\n### PROPERTY: `Y`\n> Signature: `public double Y { get; init; }`\n> Lines: 219-219\n```\n219: public double Y { get; init; }\n```\n\n### DECORATOR: `Flags`\n> Lines: 237-237\n```\n237: [Flags]\n```\n\n### ENUM: `Color`\n> Signature: `public enum Color`\n> Lines: 238-249\n```\n238: public enum Color {\n240: None = 0,\n242: Red = 1,\n244: Green = 2,\n246: Blue = 4,\n248: All = Red | Green | Blue,\n249: }\n```\n\n### FUNCTION: `ConfigEntry`\n> Signature: `public record ConfigEntry(string Key, string Value)`\n> Lines: 258-292\n```\n258: public record ConfigEntry(string Key, string Value);\n265: public record struct Vector2(double X, double Y);\n272: public static class StringExtensions {\n279: public static string Truncate(this string str, int maxLength) {\n280: if (str.Length <= maxLength) return str;\n281: return str[..maxLength] + \"...\";\n282: }\n289: public static bool IsAscii(this string str) {\n290: return str.All(c => c < 128);\n291: }\n292: }\n```\n\n### CLASS: `StringExtensions`\n> Signature: `public static class StringExtensions`\n> Lines: 272-292\n```\n272: public static class StringExtensions {\n279: public static string Truncate(this string str, int maxLength) {\n280: if (str.Length <= maxLength) return str;\n281: return str[..maxLength] + \"...\";\n282: }\n289: public static bool IsAscii(this string str) {\n290: return str.All(c => c < 128);\n291: }\n292: }\n```\n\n### FUNCTION: `Truncate`\n> Signature: `public static string Truncate(this string str, int maxLength)`\n> Lines: 279-282\n```\n279: public static string Truncate(this string str, int maxLength) {\n280: if (str.Length <= maxLength) return str;\n281: return str[..maxLength] + \"...\";\n282: }\n```\n\n### FUNCTION: `IsAscii`\n> Signature: `public static bool IsAscii(this string str)`\n> Lines: 289-291\n```\n289: public static bool IsAscii(this string str) {\n290: return str.All(c => c < 128);\n291: }\n```\n\n### CLASS: `SortedCollection`\n> Signature: `public class SortedCollection<T> where T : IComparable<T>`\n> Lines: 300-322\n```\n300: public class SortedCollection<T> where T : IComparable<T> {\n301: private readonly List<T> _items = new();\n307: public void Add(T item) {\n309: var index = _items.BinarySearch(item);\n310: if (index < 0) index = ~index;\n311: _items.Insert(index, item);\n312: }\n319: public IEnumerable<T> Where(Func<T, bool> predicate) {\n320: return _items.Where(predicate);\n321: }\n322: }\n```\n\n### FUNCTION: `Add`\n> Signature: `public void Add(T item)`\n> Lines: 307-312\n```\n307: public void Add(T item) {\n309: var index = _items.BinarySearch(item);\n310: if (index < 0) index = ~index;\n311: _items.Insert(index, item);\n312: }\n```\n\n### FUNCTION: `Where`\n> Signature: `public IEnumerable<T> Where(Func<T, bool> predicate)`\n> Lines: 319-321\n```\n319: public IEnumerable<T> Where(Func<T, bool> predicate) {\n320: return _items.Where(predicate);\n321: }\n```\n\n### CLASS: `PatternMatcher`\n> Signature: `public static class PatternMatcher`\n> Lines: 329-347\n```\n329: public static class PatternMatcher {\n335: public static string Describe(object? obj) {\n336: return obj switch {\n337: null => \"null\",\n338: int i when i > 0 => $\"positive int: {i}\",\n339: int i => $\"non-positive int: {i}\",\n340: string { Length: 0 } => \"empty string\",\n341: string s => $\"string({s.Length}): {s}\",\n342: Person { Age: >= 18 } p => $\"adult: {p.Name}\",\n343: Person p => $\"minor: {p.Name}\",\n344: _ => $\"unknown: {obj.GetType().Name}\",\n345: };\n346: }\n347: }\n```\n\n### FUNCTION: `Describe`\n> Signature: `public static string Describe(object? obj)`\n> Lines: 335-346\n```\n335: public static string Describe(object? obj) {\n336: return obj switch {\n337: null => \"null\",\n338: int i when i > 0 => $\"positive int: {i}\",\n339: int i => $\"non-positive int: {i}\",\n340: string { Length: 0 } => \"empty string\",\n341: string s => $\"string({s.Length}): {s}\",\n342: Person { Age: >= 18 } p => $\"adult: {p.Name}\",\n343: Person p => $\"minor: {p.Name}\",\n344: _ => $\"unknown: {obj.GetType().Name}\",\n345: };\n346: }\n```\n\n### NAMESPACE: `MyApp.Services`\n> Signature: `namespace MyApp.Services {}`\n> Lines: 352-352\n```\n352: namespace MyApp.Services {}\n```\n\n### NAMESPACE: `MyApp.Core`\n> Signature: `namespace MyApp.Core {}`\n> Lines: 353-353\n```\n353: namespace MyApp.Core {}\n```\n\n### NAMESPACE: `MyApp.Data`\n> Signature: `namespace MyApp.Data {}`\n> Lines: 354-354\n```\n354: namespace MyApp.Data {}\n```\n\n### NAMESPACE: `MyApp.Api`\n> Signature: `namespace MyApp.Api {}`\n> Lines: 355-355\n```\n355: namespace MyApp.Api {}\n```\n\n### INTERFACE: `ILogger`\n> Signature: `public interface ILogger {}`\n> Lines: 356-356\n```\n356: public interface ILogger {}\n```\n\n### INTERFACE: `IParser`\n> Signature: `public interface IParser {}`\n> Lines: 357-357\n```\n357: public interface IParser {}\n```\n\n### INTERFACE: `IRunner`\n> Signature: `public interface IRunner {}`\n> Lines: 358-358\n```\n358: public interface IRunner {}\n```\n\n### ENUM: `ModeCs`\n> Signature: `public enum ModeCs { Fast, Safe }`\n> Lines: 359-359\n```\n359: public enum ModeCs { Fast, Safe }\n```\n\n### ENUM: `PhaseCs`\n> Signature: `public enum PhaseCs { Init, Done }`\n> Lines: 360-360\n```\n360: public enum PhaseCs { Init, Done }\n```\n\n### ENUM: `StateCs`\n> Signature: `public enum StateCs { Open, Closed }`\n> Lines: 361-361\n```\n361: public enum StateCs { Open, Closed }\n```\n\n### ENUM: `SignalCs`\n> Signature: `public enum SignalCs { On, Off }`\n> Lines: 362-362\n```\n362: public enum SignalCs { On, Off }\n```\n\n### STRUCT: `Size`\n> Signature: `public struct Size { public int W; public int H; }`\n> Lines: 363-363\n```\n363: public struct Size { public int W; public int H; }\n```\n\n### STRUCT: `Vector`\n> Signature: `public readonly struct Vector { public readonly int X; public readonly int Y; }`\n> Lines: 364-364\n```\n364: public readonly struct Vector { public readonly int X; public readonly int Y; }\n```\n\n### STRUCT: `Limits`\n> Signature: `public struct Limits { public int Max; }`\n> Lines: 365-365\n```\n365: public struct Limits { public int Max; }\n```\n\n### STRUCT: `Cursor`\n> Signature: `public struct Cursor { public int Index; }`\n> Lines: 366-366\n```\n366: public struct Cursor { public int Index; }\n```\n\n### DECORATOR: `DebuggerDisplay(\"{Value}\")`\n> Lines: 367-367\n```\n367: [DebuggerDisplay(\"{Value}\")]\n```\n\n### CONSTANT: `MIN_AGE`\n> Signature: `public const int MIN_AGE = 10`\n> Lines: 368-368\n```\n368: public const int MIN_AGE = 10;\n```\n\n### CONSTANT: `RETRY_LIMIT`\n> Signature: `public const int RETRY_LIMIT = 3`\n> Lines: 369-369\n```\n369: public const int RETRY_LIMIT = 3;\n```\n\n### CONSTANT: `CACHE_SIZE`\n> Signature: `public const int CACHE_SIZE = 128`\n> Lines: 370-370\n```\n370: public const int CACHE_SIZE = 128;\n```\n\n### CONSTANT: `DEFAULT_PAGE`\n> Signature: `public const int DEFAULT_PAGE = 1`\n> Lines: 371-371\n```\n371: public const int DEFAULT_PAGE = 1;\n```\n\n### CLASS: `ReqCoverCsharp`\n> Signature: `public static class ReqCoverCsharp`\n> Lines: 374-410\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n```\n374: public static class ReqCoverCsharp {\n380: public static int ReqCoverCsharp1(int value) { return value + 1; }\n387: public static int ReqCoverCsharp2(int value) { return value + 2; }\n394: public static int ReqCoverCsharp3(int value) { return value + 3; }\n401: public static int ReqCoverCsharp4(int value) { return value + 4; }\n408: public static int ReqCoverCsharp5(int value) { return value + 5; }\n410: }\n```\n\n### FUNCTION: `ReqCoverCsharp1`\n> Signature: `public static int ReqCoverCsharp1(int value) { return value + 1; }`\n> Lines: 380-380\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n380: public static int ReqCoverCsharp1(int value) { return value + 1; }\n```\n\n### FUNCTION: `ReqCoverCsharp2`\n> Signature: `public static int ReqCoverCsharp2(int value) { return value + 2; }`\n> Lines: 387-387\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n387: public static int ReqCoverCsharp2(int value) { return value + 2; }\n```\n\n### FUNCTION: `ReqCoverCsharp3`\n> Signature: `public static int ReqCoverCsharp3(int value) { return value + 3; }`\n> Lines: 394-394\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n394: public static int ReqCoverCsharp3(int value) { return value + 3; }\n```\n\n### FUNCTION: `ReqCoverCsharp4`\n> Signature: `public static int ReqCoverCsharp4(int value) { return value + 4; }`\n> Lines: 401-401\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n401: public static int ReqCoverCsharp4(int value) { return value + 4; }\n```\n\n### FUNCTION: `ReqCoverCsharp5`\n> Signature: `public static int ReqCoverCsharp5(int value) { return value + 5; }`\n> Lines: 408-408\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n408: public static int ReqCoverCsharp5(int value) { return value + 5; }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|