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

LHS is not expected to throw, when RHS throws #33

Closed
Kacarott opened this issue Jul 17, 2022 · 1 comment
Closed

LHS is not expected to throw, when RHS throws #33

Kacarott opened this issue Jul 17, 2022 · 1 comment

Comments

@Kacarott
Copy link
Contributor

According to the docs:

If test code on the right side of the arrow -> throws an error, the left side is expected to throw that same error, if it does, the test passes, if it doesn't the test fails.

However this is not the case. When the RHS throws an error, the actual behaviour is that the resulting object is compared against any resulting values from the LHS, regardless of whether the LHS threw or not.

For example, the following word would pass, despite not throwing.

: should-throw ( -- msg ) "Error!" ;

<{ should-throw -> "Error!" throw }>

I have created a Kumite providing more in depth examples of where the behaviour is unexpected.

@nomennescio
Copy link
Collaborator

Fixed in release 2.0.1

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

No branches or pull requests

2 participants