Fix two CombinationResultsConverter edge cases - #1867
Merged
Conversation
… flattened messages Two edge cases in CombinationResultsConverter: * Write started an object then returned early for empty results without closing it, so anything written after the results was swallowed into them. Reachable by constructing CombinationResults directly, since the runner rejects empty lists. * FlattenMessage only appended ". " when a line did not already end in a period, so a line that did was run straight into the next one. The two line net48 ArgumentNullException rendered as "Value cannot be null.Parameter name: p".
This was referenced Aug 26, 2026
This was referenced Aug 28, 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.
Unclosed object for empty results.
WritecallsWriteStartObject(), then returns early when there are no items without callingWriteEndObject(). The writer auto-closes at the end of the document, so a top level empty result still renders as{}and looks fine — but anything written after the results gets swallowed into them. Onmain:Only reachable by constructing
CombinationResultsdirectly, sinceCombinationRunnerrejects empty lists.Flattened messages lost the joining space.
FlattenMessageappended". "only when a line did not already end in a period, so a line that did was run straight into the next one. The two line net48ArgumentNullExceptionrendered as:The period and the separating space are now appended independently.
Tests in
Verify.Tests/CombinationTests:EmptyResultsandEmptyResultsNestedfor the first (the nested one is what actually fails onmain— the flat one passes either way, which is why the bug is easy to miss), andMultiLineArgumentExceptionfor the second, using an explicit two line message so it does not depend on how a given framework wordsArgumentNullException.Empty lines in a message still contribute a
.— unchanged, and out of scope here.Verify.Tests(1302) andStaticSettingsTestspass.docs/combinations.mdregenerates because it embeds the converter source.