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

Improve check-match failure message #164

Merged
merged 3 commits into from
Nov 17, 2023

Conversation

AlexKnauth
Copy link
Member

Fixes #163 by changing the expected check-info in pretty-print mode into a pattern check-info in write mode, and adding a condition check-info in write mode when there's a condition that must pass too.

The new messages look like this:

--------------------
. FAILURE
name:       check-match
location:   meow.rkt:5:0
actual:     1
pattern:    a
condition:  (symbol? a)
--------------------
--------------------
. FAILURE
name:       check-match
location:   meow.rkt:10:0
actual:     '(1)
pattern:    `(,a)
condition:  (symbol? a)
--------------------
--------------------
. FAILURE
name:       check-match
location:   meow.rkt:15:0
actual:     'a
pattern:    a
condition:  (integer? a)
--------------------

@AlexKnauth AlexKnauth merged commit fb96819 into racket:master Nov 17, 2023
2 checks passed
@AlexKnauth AlexKnauth deleted the check-match-failure-message branch November 17, 2023 20:32
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.

Bad error with check-match
1 participant