Skip to content

Comments

test: raise reliable arity error#104

Merged
bennn merged 1 commit intoracket:masterfrom
bennn:arity-test
Aug 20, 2018
Merged

test: raise reliable arity error#104
bennn merged 1 commit intoracket:masterfrom
bennn:arity-test

Conversation

@bennn
Copy link
Contributor

@bennn bennn commented Aug 20, 2018

change (= 1) to an expression that throws an arity error on 7.0.0.13 and earlier



(define (raise-sample-arity-error)
(raise-arity-error 'check-test 1))
Copy link
Member

Choose a reason for hiding this comment

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

Why not call a function defined here, so that this never breaks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that works too, but I thought this was clearer and should also never break

I guess it would be even clearer to define a new exception type ... exn:fail:rackunit-test. Do you think I should do that?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I misunderstood -- I thought you were calling raise-arity-error with the wrong number of arguments to generate an arity error. All looks good.

change `(= 1)` to an expression that throws an arity error on 7.0.0.13
and earlier
@bennn bennn merged commit 5fc1ec7 into racket:master Aug 20, 2018
@bennn bennn deleted the arity-test branch August 20, 2018 17:46
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.

2 participants