Description
There are currently no tests for errors raised by lexer/parser, which is primary because we cannot determine the exact reason it errors. I see two main ways to test this:
- Test that the range returned matches the expected error range. This does not account for errors covering the same range but have different messages.
- Test that the summary and details message match expected values, fixing the above limitation.
For testing messages, I would prefer to have a way to access the message dynamically through something like a ResourceBundle rather than hardcoding them in text. This also moves us in the direction of translatable messages, which is a benefit as well. I'm not quite sure how to go about this at the moment, hence this issue.
Motivation
These error messages in particular are extremely important since they're displayed to users, and we should ensure their accurate for the error and generally suggest the correct solution. This also helps us do the same for serializers later on.
Description
There are currently no tests for errors raised by lexer/parser, which is primary because we cannot determine the exact reason it errors. I see two main ways to test this:
For testing messages, I would prefer to have a way to access the message dynamically through something like a
ResourceBundlerather than hardcoding them in text. This also moves us in the direction of translatable messages, which is a benefit as well. I'm not quite sure how to go about this at the moment, hence this issue.Motivation
These error messages in particular are extremely important since they're displayed to users, and we should ensure their accurate for the error and generally suggest the correct solution. This also helps us do the same for serializers later on.