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,380 @@
|
|
|
1
|
+
/// @file fixture_rust.rs
|
|
2
|
+
/// @brief Comprehensive Rust test fixture for parser stress-testing.
|
|
3
|
+
/// @details Covers lifetimes, closures, trait objects, async traits,
|
|
4
|
+
/// unsafe blocks, pattern matching, generic impls, where clauses,
|
|
5
|
+
/// pub(crate) visibility, and advanced macro rules.
|
|
6
|
+
// Single line comment
|
|
7
|
+
/* Multi-line
|
|
8
|
+
comment */
|
|
9
|
+
use std::io;
|
|
10
|
+
use std::collections::HashMap;
|
|
11
|
+
use std::fmt::{self, Display, Formatter};
|
|
12
|
+
use std::sync::{Arc, Mutex};
|
|
13
|
+
|
|
14
|
+
/* ── Struct with derive and lifetimes ─────────────────────────────────── */
|
|
15
|
+
|
|
16
|
+
/// A simple struct for testing derive macros and field parsing.
|
|
17
|
+
///
|
|
18
|
+
/// @brief Holds a single i32 field with Debug/Clone derives.
|
|
19
|
+
#[derive(Debug, Clone, PartialEq)]
|
|
20
|
+
pub struct MyStruct {
|
|
21
|
+
/// @brief Primary integer field.
|
|
22
|
+
field: i32,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/// Struct with lifetime parameter for borrowed data.
|
|
26
|
+
///
|
|
27
|
+
/// @brief Demonstrates lifetime annotations in struct definitions.
|
|
28
|
+
/// @tparam 'a Lifetime of the borrowed string slice.
|
|
29
|
+
#[derive(Debug)]
|
|
30
|
+
pub struct BorrowedData<'a> {
|
|
31
|
+
/// @brief Reference to externally-owned string data.
|
|
32
|
+
content: &'a str,
|
|
33
|
+
/// @brief Numeric tag for identification.
|
|
34
|
+
tag: u64,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/// Generic struct with multiple type parameters and bounds.
|
|
38
|
+
///
|
|
39
|
+
/// @tparam K Key type; must implement Hash and Eq.
|
|
40
|
+
/// @tparam V Value type; must implement Clone.
|
|
41
|
+
pub struct TypedMap<K: std::hash::Hash + Eq, V: Clone> {
|
|
42
|
+
/// @brief Internal hash map storage.
|
|
43
|
+
inner: HashMap<K, V>,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* ── Enum with data variants ──────────────────────────────────────────── */
|
|
47
|
+
|
|
48
|
+
/// Enum with mixed variant types for discriminated union testing.
|
|
49
|
+
///
|
|
50
|
+
/// @brief Represents either structured data, a simple flag, or a pair.
|
|
51
|
+
pub enum MyEnum {
|
|
52
|
+
/// @brief Unit variant carrying no data.
|
|
53
|
+
A,
|
|
54
|
+
/// @brief Tuple variant holding a string payload.
|
|
55
|
+
B(String),
|
|
56
|
+
/// @brief Struct variant with named fields.
|
|
57
|
+
C { x: i32, y: i32 },
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* ── Trait and impls ──────────────────────────────────────────────────── */
|
|
61
|
+
|
|
62
|
+
/// Trait defining a work execution interface.
|
|
63
|
+
///
|
|
64
|
+
/// @brief Implementors must provide both sync and optional async execution.
|
|
65
|
+
pub trait MyTrait {
|
|
66
|
+
/// Execute a unit of work synchronously.
|
|
67
|
+
fn do_work(&self);
|
|
68
|
+
|
|
69
|
+
/// Execute work with a context parameter.
|
|
70
|
+
///
|
|
71
|
+
/// @param ctx Contextual string passed to the implementation.
|
|
72
|
+
/// @return True if work completed successfully.
|
|
73
|
+
fn do_work_with_ctx(&self, ctx: &str) -> bool {
|
|
74
|
+
/* Default implementation logs and delegates */
|
|
75
|
+
println!("ctx: {}", ctx);
|
|
76
|
+
self.do_work();
|
|
77
|
+
true
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/// Trait with associated type and lifetime.
|
|
82
|
+
///
|
|
83
|
+
/// @brief Parsers produce items of an associated Output type.
|
|
84
|
+
/// @tparam 'a Lifetime of the input data.
|
|
85
|
+
pub trait Parser<'a> {
|
|
86
|
+
/// @brief The output type produced by parsing.
|
|
87
|
+
type Output;
|
|
88
|
+
|
|
89
|
+
/// Parse input bytes into the associated output type.
|
|
90
|
+
///
|
|
91
|
+
/// @param input Byte slice to parse.
|
|
92
|
+
/// @return Parsed output or an IO error.
|
|
93
|
+
fn parse(&self, input: &'a [u8]) -> Result<Self::Output, io::Error>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
impl MyStruct {
|
|
97
|
+
/// Create a new MyStruct with default field value.
|
|
98
|
+
///
|
|
99
|
+
/// @return A MyStruct with field initialized to 0.
|
|
100
|
+
fn new() -> Self {
|
|
101
|
+
Self { field: 0 }
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/// Create a MyStruct with a specific value.
|
|
105
|
+
///
|
|
106
|
+
/// @param val The initial field value.
|
|
107
|
+
/// @return A new MyStruct.
|
|
108
|
+
pub fn with_value(val: i32) -> Self {
|
|
109
|
+
Self { field: val }
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/// Get the current field value.
|
|
113
|
+
///
|
|
114
|
+
/// @return The stored integer.
|
|
115
|
+
pub fn value(&self) -> i32 {
|
|
116
|
+
self.field
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/// Conditionally update the field.
|
|
120
|
+
///
|
|
121
|
+
/// @param new_val New value to set.
|
|
122
|
+
/// @return Old value if updated, None if new_val equals current.
|
|
123
|
+
pub fn try_update(&mut self, new_val: i32) -> Option<i32> {
|
|
124
|
+
if new_val == self.field {
|
|
125
|
+
return None;
|
|
126
|
+
}
|
|
127
|
+
let old = self.field;
|
|
128
|
+
self.field = new_val;
|
|
129
|
+
/* Return the previous value wrapped in Some */
|
|
130
|
+
Some(old)
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
impl MyTrait for MyStruct {
|
|
135
|
+
/// Concrete implementation printing the struct.
|
|
136
|
+
fn do_work(&self) {
|
|
137
|
+
println!("{:?}", self);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
impl Display for MyStruct {
|
|
142
|
+
/// Format MyStruct for user-facing display.
|
|
143
|
+
///
|
|
144
|
+
/// @param f Formatter to write into.
|
|
145
|
+
/// @return fmt::Result indicating success or failure.
|
|
146
|
+
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
|
147
|
+
write!(f, "MyStruct({})", self.field)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* ── Generic impl with where clause ───────────────────────────────────── */
|
|
152
|
+
|
|
153
|
+
impl<K, V> TypedMap<K, V>
|
|
154
|
+
where
|
|
155
|
+
K: std::hash::Hash + Eq + Display,
|
|
156
|
+
V: Clone + Default,
|
|
157
|
+
{
|
|
158
|
+
/// Insert a key-value pair, returning the old value if present.
|
|
159
|
+
///
|
|
160
|
+
/// @param key The lookup key.
|
|
161
|
+
/// @param value The value to associate with the key.
|
|
162
|
+
/// @return Previous value for this key, or None.
|
|
163
|
+
pub fn insert(&mut self, key: K, value: V) -> Option<V> {
|
|
164
|
+
self.inner.insert(key, value)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/// Get a cloned value by key reference.
|
|
168
|
+
///
|
|
169
|
+
/// @param key The key to look up.
|
|
170
|
+
/// @return Cloned value if found, or the default for V.
|
|
171
|
+
pub fn get_or_default(&self, key: &K) -> V {
|
|
172
|
+
match self.inner.get(key) {
|
|
173
|
+
Some(v) => v.clone(),
|
|
174
|
+
None => V::default(),
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* ── Module ───────────────────────────────────────────────────────────── */
|
|
180
|
+
|
|
181
|
+
/// @brief Sub-module containing utility helpers.
|
|
182
|
+
pub mod my_module;
|
|
183
|
+
|
|
184
|
+
/// @brief Inline module with pub(crate) scoped items.
|
|
185
|
+
pub(crate) mod internal {
|
|
186
|
+
/// Internal counter not exposed outside the crate.
|
|
187
|
+
pub(crate) static COUNTER: std::sync::atomic::AtomicUsize =
|
|
188
|
+
std::sync::atomic::AtomicUsize::new(0);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* ── Macro rules ──────────────────────────────────────────────────────── */
|
|
192
|
+
|
|
193
|
+
/// Variadic macro generating a HashMap from key-value pairs.
|
|
194
|
+
///
|
|
195
|
+
/// @brief Usage: `hashmap!{ "a" => 1, "b" => 2 }`.
|
|
196
|
+
macro_rules! hashmap {
|
|
197
|
+
($($key:expr => $val:expr),* $(,)?) => {{
|
|
198
|
+
let mut map = HashMap::new();
|
|
199
|
+
$(map.insert($key, $val);)*
|
|
200
|
+
map
|
|
201
|
+
}};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/// Macro with multiple match arms for different patterns.
|
|
205
|
+
macro_rules! my_macro {
|
|
206
|
+
() => {};
|
|
207
|
+
($x:expr) => { println!("{}", $x) };
|
|
208
|
+
($x:expr, $($rest:expr),+) => {
|
|
209
|
+
print!("{}, ", $x);
|
|
210
|
+
my_macro!($($rest),+);
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* ── Constants and statics ────────────────────────────────────────────── */
|
|
215
|
+
|
|
216
|
+
/// @brief Compile-time constant for maximum retry attempts.
|
|
217
|
+
const MY_CONST: i32 = 42;
|
|
218
|
+
|
|
219
|
+
/// @brief Mutable static requiring unsafe access.
|
|
220
|
+
static MY_STATIC: i32 = 0;
|
|
221
|
+
|
|
222
|
+
/// @brief Thread-safe lazy-initialized global configuration.
|
|
223
|
+
static CONFIG: std::sync::LazyLock<HashMap<String, String>> =
|
|
224
|
+
std::sync::LazyLock::new(|| HashMap::new());
|
|
225
|
+
|
|
226
|
+
/* ── Type alias ───────────────────────────────────────────────────────── */
|
|
227
|
+
|
|
228
|
+
/// @brief Alias for a common Result type with IO errors.
|
|
229
|
+
pub type IoResult<T> = Result<T, io::Error>;
|
|
230
|
+
|
|
231
|
+
/// @brief Simple integer alias.
|
|
232
|
+
pub type MyAlias = i32;
|
|
233
|
+
|
|
234
|
+
/* ── Functions ────────────────────────────────────────────────────────── */
|
|
235
|
+
|
|
236
|
+
/// Top-level function demonstrating multiple return paths.
|
|
237
|
+
///
|
|
238
|
+
/// @param input Optional string to evaluate.
|
|
239
|
+
/// @return Processed string or a fallback default.
|
|
240
|
+
pub fn my_function(input: Option<&str>) -> String {
|
|
241
|
+
/* Early return on None */
|
|
242
|
+
let text = match input {
|
|
243
|
+
Some(s) if !s.is_empty() => s,
|
|
244
|
+
Some(_) => return String::from("empty"),
|
|
245
|
+
None => return String::from("none"),
|
|
246
|
+
};
|
|
247
|
+
/* Transform and return */
|
|
248
|
+
text.to_uppercase()
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/// Async function performing simulated IO.
|
|
252
|
+
///
|
|
253
|
+
/// @return A greeting string after async computation.
|
|
254
|
+
pub async fn async_function() -> String {
|
|
255
|
+
/* Simulate async work */
|
|
256
|
+
String::from("hello async")
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/// Function accepting a closure with trait bounds.
|
|
260
|
+
///
|
|
261
|
+
/// @param items Slice of integers to filter.
|
|
262
|
+
/// @param predicate Closure returning true for items to keep.
|
|
263
|
+
/// @return Vector of items passing the predicate.
|
|
264
|
+
pub fn filter_with<F>(items: &[i32], predicate: F) -> Vec<i32>
|
|
265
|
+
where
|
|
266
|
+
F: Fn(&i32) -> bool,
|
|
267
|
+
{
|
|
268
|
+
items.iter().copied().filter(|x| predicate(x)).collect()
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/// Function returning a boxed trait object.
|
|
272
|
+
///
|
|
273
|
+
/// @param use_struct If true, returns MyStruct; otherwise panics.
|
|
274
|
+
/// @return A heap-allocated trait object implementing MyTrait.
|
|
275
|
+
pub fn create_worker(use_struct: bool) -> Box<dyn MyTrait> {
|
|
276
|
+
if use_struct {
|
|
277
|
+
Box::new(MyStruct::new())
|
|
278
|
+
} else {
|
|
279
|
+
panic!("No alternative implementation available");
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/// Unsafe function wrapping raw pointer dereference.
|
|
284
|
+
///
|
|
285
|
+
/// @param ptr Raw pointer to an i32 value.
|
|
286
|
+
/// @return The value pointed to by ptr.
|
|
287
|
+
/// @safety Caller must ensure ptr is valid and aligned.
|
|
288
|
+
pub unsafe fn read_raw(ptr: *const i32) -> i32 {
|
|
289
|
+
/* Dereference raw pointer under unsafe contract */
|
|
290
|
+
*ptr
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/// Extern "C" function for FFI interoperability.
|
|
294
|
+
///
|
|
295
|
+
/// @param x Integer to double.
|
|
296
|
+
/// @return The input multiplied by 2.
|
|
297
|
+
pub extern "C" fn ffi_double(x: i32) -> i32 {
|
|
298
|
+
x * 2
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/// Function demonstrating exhaustive pattern matching.
|
|
302
|
+
///
|
|
303
|
+
/// @param val An enum variant to match against.
|
|
304
|
+
/// @return A description string for the matched variant.
|
|
305
|
+
pub fn describe_enum(val: &MyEnum) -> String {
|
|
306
|
+
match val {
|
|
307
|
+
MyEnum::A => String::from("unit"),
|
|
308
|
+
MyEnum::B(s) => format!("string: {}", s),
|
|
309
|
+
MyEnum::C { x, y } => {
|
|
310
|
+
/* Compute magnitude for struct variant */
|
|
311
|
+
let mag = ((x * x + y * y) as f64).sqrt();
|
|
312
|
+
format!("point({}, {}) mag={:.2}", x, y, mag)
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* coverage extension block */
|
|
318
|
+
use std::time::Duration;
|
|
319
|
+
pub mod ext_tools { pub fn id() -> i32 { 1 } }
|
|
320
|
+
mod ext_local { pub fn ping() -> i32 { 2 } }
|
|
321
|
+
pub mod ext_api { pub fn pong() -> i32 { 3 } }
|
|
322
|
+
#[inline]
|
|
323
|
+
#[allow(dead_code)]
|
|
324
|
+
#[cfg(test)]
|
|
325
|
+
pub enum Status { Ready, Busy }
|
|
326
|
+
pub enum Mode { Alpha, Beta }
|
|
327
|
+
pub enum Signal { On, Off }
|
|
328
|
+
pub enum ErrorKind { Io, Parse }
|
|
329
|
+
pub struct ExtraNode { pub id: i32 }
|
|
330
|
+
struct InnerNode { id: i32 }
|
|
331
|
+
pub trait Inspectable { fn inspect(&self) -> i32; }
|
|
332
|
+
trait Named { fn name(&self) -> &'static str; }
|
|
333
|
+
pub trait Executable { fn exec(&self) -> i32; }
|
|
334
|
+
impl Inspectable for ExtraNode { fn inspect(&self) -> i32 { self.id } }
|
|
335
|
+
impl Named for InnerNode { fn name(&self) -> &'static str { "inner" } }
|
|
336
|
+
impl Executable for MyEnum { fn exec(&self) -> i32 { 1 } }
|
|
337
|
+
macro_rules! ext_macro { () => { 42 } }
|
|
338
|
+
macro_rules! trace_macro { ($v:expr) => { $v }; }
|
|
339
|
+
macro_rules! build_pair { ($a:expr,$b:expr) => { ($a,$b) }; }
|
|
340
|
+
pub const LIMIT: usize = 8;
|
|
341
|
+
pub type ItemId = u64;
|
|
342
|
+
type AliasValue = i32;
|
|
343
|
+
|
|
344
|
+
// REQ-COVER-SRS-231 START
|
|
345
|
+
/// @REQ-COVER-SRS-231 block 1
|
|
346
|
+
/// @brief Coverage helper construct 1.
|
|
347
|
+
/// @details Provides deterministic fixture-level Doxygen coverage block 1.
|
|
348
|
+
/// @param value Input value for helper construct 1.
|
|
349
|
+
/// @return Output value for helper construct 1.
|
|
350
|
+
fn req_cover_rust_1(value: i32) -> i32 { value + 1 }
|
|
351
|
+
|
|
352
|
+
/// @REQ-COVER-SRS-231 block 2
|
|
353
|
+
/// @brief Coverage helper construct 2.
|
|
354
|
+
/// @details Provides deterministic fixture-level Doxygen coverage block 2.
|
|
355
|
+
/// @param value Input value for helper construct 2.
|
|
356
|
+
/// @return Output value for helper construct 2.
|
|
357
|
+
fn req_cover_rust_2(value: i32) -> i32 { value + 2 }
|
|
358
|
+
|
|
359
|
+
/// @REQ-COVER-SRS-231 block 3
|
|
360
|
+
/// @brief Coverage helper construct 3.
|
|
361
|
+
/// @details Provides deterministic fixture-level Doxygen coverage block 3.
|
|
362
|
+
/// @param value Input value for helper construct 3.
|
|
363
|
+
/// @return Output value for helper construct 3.
|
|
364
|
+
fn req_cover_rust_3(value: i32) -> i32 { value + 3 }
|
|
365
|
+
|
|
366
|
+
/// @REQ-COVER-SRS-231 block 4
|
|
367
|
+
/// @brief Coverage helper construct 4.
|
|
368
|
+
/// @details Provides deterministic fixture-level Doxygen coverage block 4.
|
|
369
|
+
/// @param value Input value for helper construct 4.
|
|
370
|
+
/// @return Output value for helper construct 4.
|
|
371
|
+
fn req_cover_rust_4(value: i32) -> i32 { value + 4 }
|
|
372
|
+
|
|
373
|
+
/// @REQ-COVER-SRS-231 block 5
|
|
374
|
+
/// @brief Coverage helper construct 5.
|
|
375
|
+
/// @details Provides deterministic fixture-level Doxygen coverage block 5.
|
|
376
|
+
/// @param value Input value for helper construct 5.
|
|
377
|
+
/// @return Output value for helper construct 5.
|
|
378
|
+
fn req_cover_rust_5(value: i32) -> i32 { value + 5 }
|
|
379
|
+
|
|
380
|
+
/* REQ-COVER-SRS-231 END */
|