Skip to content

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

@Kacarott

Description

@Kacarott

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions