[repo-assist] test: expand RuntimeHelpers coverage (+8 tests, 417->425)#442
Merged
sergey-tihon merged 2 commits intoMay 17, 2026
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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
toParamtests covering int64, bool (true/false), float32 and double formatting paths. - Add 3
formatObjecttests 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.
This was referenced May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Add tests for code paths in
RuntimeHelpersthat were previously not exercised by the test suite.New Tests
formatObjectedge casesnullelement"[null]"output"[a; null; b]"output"{}"outputThese cover the
if isNull x then sb.Append("null")branch inside array formatting and the zero-property fast path.toParamcoverageint64bool truebool falsefalsecasefloat32obj.ToString()fallbackdoubleobj.ToString()fallbackTest Status