Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically report LHS and RHS values for comparisons used in tests #428

Merged
merged 4 commits into from
Dec 27, 2024

Conversation

byorgey
Copy link
Member

@byorgey byorgey commented Dec 27, 2024

Technically, this is achieved by desugaring boolean comparison operators inside a Prop into operators wrapped in Should, which triggers the testing framework to report the value on both sides of the operator. This means (1) there is no longer any needed distinction at the surface language level between == and =!= (indeed, the latter is now a syntax error), and it also generalizes to work with any comparison operator, not just == and <.

Also generally improve test result reporting.

Closes #363 .

@byorgey byorgey changed the title Automatically report LHS and RHS values for comparisons used in a test Automatically report LHS and RHS values for comparisons used in tests Dec 27, 2024
Co-authored-by: Restyled.io <commits@restyled.io>
@byorgey byorgey merged commit eabf3d1 into main Dec 27, 2024
9 checks passed
@byorgey byorgey deleted the feature/desugar-prop branch December 27, 2024 13:05
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.

Desugar == to =!= if it is used at type Prop
1 participant