Skip to content

Commit 92b6812

Browse files
soraweesamth
authored andcommitted
Update test to reflect changes in #123 and #109
Sine we "treat exceptions thrown by arguments to check as test failures", and test failures contain "params" clause, it makes sense for the reported message to contain the clause as well. The clause is also useful in itself. Use procedure-rename to avoid names like #<procedure:.../path/to/file.rkt:x:y> which is brittle and especially too sensitive to changes.
1 parent d7665dd commit 92b6812

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

rackunit-test/tests/rackunit/standalone-check-test.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
(check = 1 1 0.0)
4242

4343
;; This check should display an error including the message "Outta here!"
44-
(check-pred (lambda (x) (error "Outta here!")) 'foo)
44+
(check-pred (procedure-rename (lambda (x) (error "Outta here!")) 'proc) 'foo)
4545

4646

4747
;; This check should display a failure

rackunit-test/tests/rackunit/standalone.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
ERROR
4444
name: check-pred
4545
location: standalone-check-test.rkt:44:0
46+
params: '(#<procedure:proc> foo)
4647
4748
Outta here!
4849
--------------------

0 commit comments

Comments
 (0)