Skip to content

Commit

Permalink
Improve check-match failure message
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Nov 16, 2023
1 parent eee279e commit 1d83b99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rackunit-lib/rackunit/private/check.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@
(syntax->location (quote-syntax #,(datum->syntax #f 'loc stx))))
(make-check-expression '#,(syntax->datum stx))
(make-check-actual actual-val)
(make-check-expected 'expected))
(make-check-info 'pattern 'expected)
#,@(cond [(eq? (syntax-e #'pred) #t) '()]
[else #'((make-check-info 'condition 'pred))]))
(lambda ()
(check-true (match actual-val
[expected pred]
Expand Down

0 comments on commit 1d83b99

Please sign in to comment.