Property based tests - #116
Draft
hahn-kev wants to merge 4 commits into
Draft
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
On failure, each property now prints (via CsCheck print:) the full C# source of a self-contained [Fact] with the shrunk counterexample hard-coded, so a failing case can be pasted into the test project and debugged without CsCheck or a seed. One body template per property type (ReproTemplate); each ChangeSpec renders itself via ToCode(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CsCheck.SampleErrorMessage hard-truncates the printed value at 5000 chars, clipping the emitted reproduction method for larger shrunk schedules in CI. Route the full ready-to-run method to ITestOutputHelper (shown untruncated in CI logs) and keep only a compact schedule summary plus a pointer in the capped exception message. The output helper is captured before sampling so it is valid on whatever thread CsCheck's print callback runs on. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The message returned from print embedded the full schedule summary, which itself exceeded CsCheck's 5000-char cap for large schedules and showed a trailing " ...". Return only a short pointer to the test output (which holds the full, untruncated reproduction); the assertion diff still follows in the message. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
generate random sequences of commits and insert them in random orders and compare with a different order to ensure that the outcomes are the same.