Skip to content

[repo-assist] test: expand RuntimeHelpers coverage (+8 tests, 417->425)#442

Merged
sergey-tihon merged 2 commits into
masterfrom
repo-assist/test-coverage-improvements-8525d12ae3afee33
May 17, 2026
Merged

[repo-assist] test: expand RuntimeHelpers coverage (+8 tests, 417->425)#442
sergey-tihon merged 2 commits into
masterfrom
repo-assist/test-coverage-improvements-8525d12ae3afee33

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Add tests for code paths in RuntimeHelpers that were previously not exercised by the test suite.

New Tests

formatObject edge cases

Test Scenario
array with single null element "[null]" output
array with mixed null/non-null elements "[a; null; b]" output
object with no declared properties "{}" output

These cover the if isNull x then sb.Append("null") branch inside array formatting and the zero-property fast path.

toParam coverage

Test Scenario
int64 fast-path branch `
bool true fast-path branch `
bool false same fast-path, false case
float32 generic obj.ToString() fallback
double generic obj.ToString() fallback

Test Status

SwaggerProvider.Tests  Total: 425, Errors: 0, Failed: 0, Skipped: 1, Time: 1.022s

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@79c99dfd73f3b7ad8ab2b0f4944838018dbe4736

Add tests for previously uncovered code paths in RuntimeHelpers:

formatObject:
- array with a single null element -> "[null]"
- array with mixed null/non-null elements
- object with no declared properties -> "{}"

toParam:
- int64 fast-path (9876543210L)
- bool true/false fast-paths
- float32 and double via the generic obj.ToString() fallback

All 425 tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sergey-tihon sergey-tihon marked this pull request as ready for review May 17, 2026 21:15
Copilot AI review requested due to automatic review settings May 17, 2026 21:16
@sergey-tihon sergey-tihon merged commit 3b262e3 into master May 17, 2026
3 checks passed
@sergey-tihon sergey-tihon deleted the repo-assist/test-coverage-improvements-8525d12ae3afee33 branch May 17, 2026 21:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds 8 new unit tests to RuntimeHelpersTests.fs to cover previously unexercised branches in toParam (int64/bool/float32/double fast paths) and formatObject (null array elements, mixed-null arrays, and zero-property objects).

Changes:

  • Add 5 toParam tests covering int64, bool (true/false), float32 and double formatting paths.
  • Add 3 formatObject tests covering null array elements, mixed null/non-null arrays, and empty-property object output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants