Skip to content

property test for joinable_struct! conflict visitor - #93

Open
yuval-block wants to merge 1 commit into
mainfrom
conflict-visitor-prop
Open

yuval-block wants to merge 1 commit into
mainfrom
conflict-visitor-prop

Conversation

@yuval-block

Copy link
Copy Markdown
Collaborator

Follow-up to #68. The property was written in response to review on #68, but #68 was merged before it was pushed.

for_each_conflict was only covered by a unit test where every field conflicts. This adds a property over arbitrary pairs of small samples, so that clean and conflicted entries both show up in one join. It checks that the visitor reports exactly the disagreeing scalar, option and map entries, in field order and then key order, with the map key passed through. It also checks that is_ok and try_unwrap agree with it.

Before writing it I confirmed it catches two seeded mutants: one that always passes None for the map key, and one that stops after the first conflicted map entry.

The macro tests are split into unit and prop modules, and the test module now compiles under either feature.

🤖 Generated with Claude Code

for_each_conflict was only covered by a unit test where every field
conflicts. Check against arbitrary pairs of samples that it visits
exactly the disagreeing scalar, option and map entries, in field then
key order, with the map key passed through, and that is_ok and
try_unwrap agree with it.

Split the macro tests into unit and prop modules and enable the test
module under either feature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: Rust

Rust / code-coverage/cargo-llvm-cov

main 227c7b5 conflict-visitor-pro... d6d6e70 +/-
100% 100% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@oakagent

Copy link
Copy Markdown

ACK d6d6e70

oak · automated · d6d6e70 · 1 commit · 0 findings

@bc1cindy bc1cindy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK d6d6e70

@oakagent

Copy link
Copy Markdown

ACK d6d6e70

oakagent · automated · d6d6e70 · 1 commit · 0 findings

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants