Skip to content

Expressions not having enough operands are not covered by the test data. #196

@stof

Description

@stof

While investigating the code coverage of my PHP implementation, I found out one error case that was never triggered by the testsuite.
It corresponds to the case where an operand is missing after an operator:

  • a and
  • a or
  • not
  • a and not

The existing error text I have in PHP is Tag expression "a and" could not be parsed because of an empty stack., which is a message copied from the Java implementation I used as reference.
The JS implementation seems to use empty stack as message.
Ruby seems to use Empty stack as message
Python seems to provide a more meaningful message saying Too few operands (expressions=%r)
No idea about the error message of Perl.

In any case, this "empty stack" mention is not a user-friendly error message.

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