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,397 @@
|
|
|
1
|
+
/// @file fixture_swift.swift
|
|
2
|
+
/// @brief Comprehensive Swift test fixture for parser validation.
|
|
3
|
+
/// @details Covers closures, computed properties, property observers,
|
|
4
|
+
/// subscripts, generic constraints, result builders, actors,
|
|
5
|
+
/// opaque types, property wrappers, and key paths.
|
|
6
|
+
// Single line comment
|
|
7
|
+
/* Multi-line comment */
|
|
8
|
+
import Foundation
|
|
9
|
+
import Combine
|
|
10
|
+
|
|
11
|
+
/* ── Class with properties and observers ──────────────────────────────── */
|
|
12
|
+
|
|
13
|
+
/// Animal base class demonstrating inheritance and property patterns.
|
|
14
|
+
///
|
|
15
|
+
/// @brief Base class with stored, computed, and observed properties.
|
|
16
|
+
class Animal {
|
|
17
|
+
/// @brief Species name identifier.
|
|
18
|
+
var species: String
|
|
19
|
+
|
|
20
|
+
/// @brief Number of legs; triggers a didSet observer on change.
|
|
21
|
+
var legs: Int = 4 {
|
|
22
|
+
willSet {
|
|
23
|
+
/* Log upcoming change from current to new value */
|
|
24
|
+
print("Legs changing from \(legs) to \(newValue)")
|
|
25
|
+
}
|
|
26
|
+
didSet {
|
|
27
|
+
/* Enforce minimum of zero legs */
|
|
28
|
+
if legs < 0 { legs = 0 }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/// @brief Computed property returning a descriptive string.
|
|
33
|
+
var description: String {
|
|
34
|
+
return "\(species) with \(legs) legs"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/// @brief Initialize an Animal with species name.
|
|
38
|
+
/// @param species The species identifier string.
|
|
39
|
+
init(species: String) {
|
|
40
|
+
self.species = species
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/// @brief Produce a sound; subclasses should override.
|
|
44
|
+
func speak() {
|
|
45
|
+
print("...")
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/// @brief Class method creating a generic instance.
|
|
49
|
+
/// @return An Animal with species "Unknown".
|
|
50
|
+
class func createDefault() -> Animal {
|
|
51
|
+
return Animal(species: "Unknown")
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/// @brief Deinitializer for cleanup on deallocation.
|
|
55
|
+
deinit {
|
|
56
|
+
print("\(species) deallocated")
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/// Dog subclass demonstrating method override and super calls.
|
|
61
|
+
///
|
|
62
|
+
/// @brief Concrete animal with dog-specific behavior.
|
|
63
|
+
class Dog: Animal {
|
|
64
|
+
/// @brief Dog's name.
|
|
65
|
+
let name: String
|
|
66
|
+
|
|
67
|
+
/// @brief Initialize a named dog.
|
|
68
|
+
/// @param name The dog's name.
|
|
69
|
+
init(name: String) {
|
|
70
|
+
self.name = name
|
|
71
|
+
super.init(species: "Dog")
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/// @brief Override speak to produce dog-specific sound.
|
|
75
|
+
override func speak() {
|
|
76
|
+
print("\(name) says: Woof!")
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* ── Struct with subscript and Equatable ───────────────────────────────── */
|
|
81
|
+
|
|
82
|
+
/// 2D point with arithmetic operator overloading.
|
|
83
|
+
///
|
|
84
|
+
/// @brief Value type representing a coordinate pair.
|
|
85
|
+
struct Point: Equatable {
|
|
86
|
+
var x: Double = 0.0
|
|
87
|
+
var y: Double = 0.0
|
|
88
|
+
|
|
89
|
+
/// @brief Add two points component-wise.
|
|
90
|
+
/// @param lhs Left-hand operand.
|
|
91
|
+
/// @param rhs Right-hand operand.
|
|
92
|
+
/// @return New Point with summed coordinates.
|
|
93
|
+
static func + (lhs: Point, rhs: Point) -> Point {
|
|
94
|
+
return Point(x: lhs.x + rhs.x, y: lhs.y + rhs.y)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/// @brief Compute Euclidean distance from origin.
|
|
98
|
+
/// @return Distance as a Double.
|
|
99
|
+
var magnitude: Double {
|
|
100
|
+
return (x * x + y * y).squareRoot()
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/// Matrix structure with subscript access pattern.
|
|
105
|
+
///
|
|
106
|
+
/// @brief 2D matrix supporting element access via subscript.
|
|
107
|
+
struct Matrix {
|
|
108
|
+
/// @brief Flat storage for matrix values.
|
|
109
|
+
private var data: [[Double]]
|
|
110
|
+
|
|
111
|
+
/// @brief Number of rows.
|
|
112
|
+
let rows: Int
|
|
113
|
+
/// @brief Number of columns.
|
|
114
|
+
let cols: Int
|
|
115
|
+
|
|
116
|
+
/// @brief Initialize a zero-filled matrix.
|
|
117
|
+
/// @param rows Number of rows.
|
|
118
|
+
/// @param cols Number of columns.
|
|
119
|
+
init(rows: Int, cols: Int) {
|
|
120
|
+
self.rows = rows
|
|
121
|
+
self.cols = cols
|
|
122
|
+
data = Array(repeating: Array(repeating: 0.0, count: cols), count: rows)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/// @brief Access matrix elements using row/column subscript.
|
|
126
|
+
/// @param row Row index (zero-based).
|
|
127
|
+
/// @param col Column index (zero-based).
|
|
128
|
+
/// @return The value at (row, col).
|
|
129
|
+
subscript(row: Int, col: Int) -> Double {
|
|
130
|
+
get { return data[row][col] }
|
|
131
|
+
set { data[row][col] = newValue }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* ── Enum with associated values and methods ──────────────────────────── */
|
|
136
|
+
|
|
137
|
+
/// Direction enum with raw string values.
|
|
138
|
+
///
|
|
139
|
+
/// @brief Cardinal directions supporting CaseIterable iteration.
|
|
140
|
+
enum Direction: String, CaseIterable {
|
|
141
|
+
case up = "UP"
|
|
142
|
+
case down = "DOWN"
|
|
143
|
+
case left = "LEFT"
|
|
144
|
+
case right = "RIGHT"
|
|
145
|
+
|
|
146
|
+
/// @brief Compute the opposite direction.
|
|
147
|
+
/// @return The direction 180 degrees from self.
|
|
148
|
+
var opposite: Direction {
|
|
149
|
+
switch self {
|
|
150
|
+
case .up: return .down
|
|
151
|
+
case .down: return .up
|
|
152
|
+
case .left: return .right
|
|
153
|
+
case .right: return .left
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/// Result-like enum with associated error types.
|
|
159
|
+
///
|
|
160
|
+
/// @brief Generic result type for error handling.
|
|
161
|
+
/// @tparam T The success value type.
|
|
162
|
+
enum AppResult<T> {
|
|
163
|
+
/// @brief Successful result carrying a value.
|
|
164
|
+
case success(T)
|
|
165
|
+
/// @brief Failure carrying an error description.
|
|
166
|
+
case failure(Error)
|
|
167
|
+
|
|
168
|
+
/// @brief Map the success value using a transform closure.
|
|
169
|
+
/// @param transform Closure converting T to U.
|
|
170
|
+
/// @return A new AppResult with the transformed value.
|
|
171
|
+
func map<U>(_ transform: (T) -> U) -> AppResult<U> {
|
|
172
|
+
switch self {
|
|
173
|
+
case .success(let value):
|
|
174
|
+
return .success(transform(value))
|
|
175
|
+
case .failure(let error):
|
|
176
|
+
return .failure(error)
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* ── Protocol ─────────────────────────────────────────────────────────── */
|
|
182
|
+
|
|
183
|
+
/// Protocol for objects that can render themselves to a string.
|
|
184
|
+
///
|
|
185
|
+
/// @brief Defines the render contract with a default extension implementation.
|
|
186
|
+
protocol Drawable {
|
|
187
|
+
/// @brief Render the object to a string representation.
|
|
188
|
+
/// @return Rendered string output.
|
|
189
|
+
func draw() -> String
|
|
190
|
+
|
|
191
|
+
/// @brief Optional priority for render ordering.
|
|
192
|
+
var renderPriority: Int { get }
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/// Protocol with associated type for generic containers.
|
|
196
|
+
///
|
|
197
|
+
/// @brief Defines a type-erased container interface.
|
|
198
|
+
protocol Container {
|
|
199
|
+
/// @brief The type of element stored in the container.
|
|
200
|
+
associatedtype Item
|
|
201
|
+
|
|
202
|
+
/// @brief Add an item to the container.
|
|
203
|
+
/// @param item The element to add.
|
|
204
|
+
mutating func add(_ item: Item)
|
|
205
|
+
|
|
206
|
+
/// @brief Number of elements in the container.
|
|
207
|
+
var count: Int { get }
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* ── Protocol extension with default implementation ───────────────────── */
|
|
211
|
+
|
|
212
|
+
extension Drawable {
|
|
213
|
+
/// @brief Default render priority for all Drawable conformants.
|
|
214
|
+
var renderPriority: Int { return 0 }
|
|
215
|
+
|
|
216
|
+
/// @brief Debug draw with priority prefix.
|
|
217
|
+
/// @return String with priority and rendered content.
|
|
218
|
+
func debugDraw() -> String {
|
|
219
|
+
return "[\(renderPriority)] \(draw())"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* ── Extension on existing type ───────────────────────────────────────── */
|
|
224
|
+
|
|
225
|
+
/// Extension adding utility methods to Animal.
|
|
226
|
+
extension Animal: Drawable {
|
|
227
|
+
/// @brief Render animal as a descriptive string.
|
|
228
|
+
/// @return Description of the animal.
|
|
229
|
+
func draw() -> String {
|
|
230
|
+
return description
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/// @brief Describe the animal for UI display.
|
|
234
|
+
/// @return A formatted string suitable for labels.
|
|
235
|
+
func describe() -> String {
|
|
236
|
+
return "Animal: \(species)"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* ── Property wrapper ─────────────────────────────────────────────────── */
|
|
241
|
+
|
|
242
|
+
/// Property wrapper clamping values to a specified range.
|
|
243
|
+
///
|
|
244
|
+
/// @brief Ensures wrapped values stay within min/max bounds.
|
|
245
|
+
/// @tparam Value Must conform to Comparable.
|
|
246
|
+
@propertyWrapper
|
|
247
|
+
struct Clamped<Value: Comparable> {
|
|
248
|
+
/// @brief Minimum allowed value.
|
|
249
|
+
let min: Value
|
|
250
|
+
/// @brief Maximum allowed value.
|
|
251
|
+
let max: Value
|
|
252
|
+
/// @brief Current stored value.
|
|
253
|
+
private var value: Value
|
|
254
|
+
|
|
255
|
+
/// @brief The wrapped value, clamped on set.
|
|
256
|
+
var wrappedValue: Value {
|
|
257
|
+
get { return value }
|
|
258
|
+
set { value = Swift.min(Swift.max(newValue, min), max) }
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/// @brief Initialize with range and starting value.
|
|
262
|
+
init(wrappedValue: Value, min: Value, max: Value) {
|
|
263
|
+
self.min = min
|
|
264
|
+
self.max = max
|
|
265
|
+
/* Clamp initial value to range */
|
|
266
|
+
self.value = Swift.min(Swift.max(wrappedValue, min), max)
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* ── Actor (Swift concurrency) ────────────────────────────────────────── */
|
|
271
|
+
|
|
272
|
+
/// Actor providing thread-safe counter operations.
|
|
273
|
+
///
|
|
274
|
+
/// @brief Demonstrates Swift structured concurrency with actor isolation.
|
|
275
|
+
actor Counter {
|
|
276
|
+
/// @brief Current count value.
|
|
277
|
+
private var value: Int = 0
|
|
278
|
+
|
|
279
|
+
/// @brief Increment the counter and return the new value.
|
|
280
|
+
/// @return The incremented count.
|
|
281
|
+
func increment() -> Int {
|
|
282
|
+
value += 1
|
|
283
|
+
return value
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/// @brief Reset the counter to zero.
|
|
287
|
+
func reset() {
|
|
288
|
+
value = 0
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* ── Free functions ───────────────────────────────────────────────────── */
|
|
293
|
+
|
|
294
|
+
/// @brief Greet a person by name.
|
|
295
|
+
/// @param name The person's name.
|
|
296
|
+
public func greet(name: String) {
|
|
297
|
+
print("Hello \(name)")
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/// @brief Build an opaque some-typed Drawable.
|
|
301
|
+
/// @return An opaque Drawable hiding the concrete type.
|
|
302
|
+
func makeDrawable() -> some Drawable {
|
|
303
|
+
return Animal(species: "Cat")
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/// @brief Generic function with where clause constraint.
|
|
307
|
+
/// @tparam T Must be Equatable.
|
|
308
|
+
/// @param items Collection of items to search.
|
|
309
|
+
/// @param target The item to find.
|
|
310
|
+
/// @return True if target exists in items.
|
|
311
|
+
func contains<T: Collection>(items: T, target: T.Element) -> Bool where T.Element: Equatable {
|
|
312
|
+
return items.contains(target)
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/// @brief Higher-order function accepting an escaping closure.
|
|
316
|
+
/// @param action The closure to store for later execution.
|
|
317
|
+
/// @return A wrapper closure that invokes action.
|
|
318
|
+
func deferred(_ action: @escaping () -> Void) -> () -> Void {
|
|
319
|
+
return {
|
|
320
|
+
/* Execute the captured closure */
|
|
321
|
+
action()
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* ── Constants and variables ──────────────────────────────────────────── */
|
|
326
|
+
|
|
327
|
+
/// @brief Application-wide maximum buffer size constant.
|
|
328
|
+
let MAX_SIZE = 1024
|
|
329
|
+
|
|
330
|
+
/// @brief Module-scoped mutable counter with restricted access.
|
|
331
|
+
private var counter = 0
|
|
332
|
+
|
|
333
|
+
/// @brief Lazy computed constant using a closure.
|
|
334
|
+
let defaultConfig: [String: Any] = {
|
|
335
|
+
var config: [String: Any] = [:]
|
|
336
|
+
config["debug"] = false
|
|
337
|
+
config["version"] = "1.0"
|
|
338
|
+
return config
|
|
339
|
+
}()
|
|
340
|
+
|
|
341
|
+
/* coverage extension block */
|
|
342
|
+
import SwiftUI
|
|
343
|
+
import Combine
|
|
344
|
+
import Foundation
|
|
345
|
+
import Dispatch
|
|
346
|
+
import UIKit
|
|
347
|
+
class ServiceController {}
|
|
348
|
+
final class CacheStore {}
|
|
349
|
+
struct Vector2 { let x: Int; let y: Int }
|
|
350
|
+
struct Limits { let max: Int }
|
|
351
|
+
enum ModeSwift { case fast, safe }
|
|
352
|
+
enum PhaseSwift { case initState, done }
|
|
353
|
+
enum SignalSwift { case on, off }
|
|
354
|
+
protocol RunnerSwift { func run() }
|
|
355
|
+
protocol LoggerSwift { func log(_ msg: String) }
|
|
356
|
+
protocol ParserSwift { func parse(_ input: String) -> String }
|
|
357
|
+
extension String { func trimmed2() -> String { self.trimmingCharacters(in: .whitespaces) } }
|
|
358
|
+
extension Int { func doubled2() -> Int { self * 2 } }
|
|
359
|
+
extension Array { var isNotEmpty: Bool { !self.isEmpty } }
|
|
360
|
+
|
|
361
|
+
// REQ-COVER-SRS-231 START
|
|
362
|
+
/// @REQ-COVER-SRS-231 block 1
|
|
363
|
+
/// @brief Coverage helper construct 1.
|
|
364
|
+
/// @details Provides deterministic fixture-level Doxygen coverage block 1.
|
|
365
|
+
/// @param value Input value for helper construct 1.
|
|
366
|
+
/// @return Output value for helper construct 1.
|
|
367
|
+
func reqCoverSwift1(_ value: Int) -> Int { value + 1 }
|
|
368
|
+
|
|
369
|
+
/// @REQ-COVER-SRS-231 block 2
|
|
370
|
+
/// @brief Coverage helper construct 2.
|
|
371
|
+
/// @details Provides deterministic fixture-level Doxygen coverage block 2.
|
|
372
|
+
/// @param value Input value for helper construct 2.
|
|
373
|
+
/// @return Output value for helper construct 2.
|
|
374
|
+
func reqCoverSwift2(_ value: Int) -> Int { value + 2 }
|
|
375
|
+
|
|
376
|
+
/// @REQ-COVER-SRS-231 block 3
|
|
377
|
+
/// @brief Coverage helper construct 3.
|
|
378
|
+
/// @details Provides deterministic fixture-level Doxygen coverage block 3.
|
|
379
|
+
/// @param value Input value for helper construct 3.
|
|
380
|
+
/// @return Output value for helper construct 3.
|
|
381
|
+
func reqCoverSwift3(_ value: Int) -> Int { value + 3 }
|
|
382
|
+
|
|
383
|
+
/// @REQ-COVER-SRS-231 block 4
|
|
384
|
+
/// @brief Coverage helper construct 4.
|
|
385
|
+
/// @details Provides deterministic fixture-level Doxygen coverage block 4.
|
|
386
|
+
/// @param value Input value for helper construct 4.
|
|
387
|
+
/// @return Output value for helper construct 4.
|
|
388
|
+
func reqCoverSwift4(_ value: Int) -> Int { value + 4 }
|
|
389
|
+
|
|
390
|
+
/// @REQ-COVER-SRS-231 block 5
|
|
391
|
+
/// @brief Coverage helper construct 5.
|
|
392
|
+
/// @details Provides deterministic fixture-level Doxygen coverage block 5.
|
|
393
|
+
/// @param value Input value for helper construct 5.
|
|
394
|
+
/// @return Output value for helper construct 5.
|
|
395
|
+
func reqCoverSwift5(_ value: Int) -> Int { value + 5 }
|
|
396
|
+
|
|
397
|
+
// REQ-COVER-SRS-231 END
|