Closed mneumann closed 1 year ago
Where is the appropriate place to add test cases for this?
Technically we could add them in spec/parser_spec.cr
(as a unit test for the parsing part of the compiler).
But for something like this I think it's better to add an end-to-end test for the language - inside the language specs in spec/language/semantics
.
@jemc Do you have any kind of "parse fail" tests, where you have Savi programs that should parse and others that should fail with a parser warning?
We currently don't have any kind of concept of a "warning" in the compiler, and I want to avoid those kinds of things until we have a proper linting system in place.
For parse error tests, search for "complains" in spec/parser_spec.cr
for some examples of those.
Where is the appropriate place to add test cases for this?
This currently allows trailing "_", which in Ruby for instance is not allowed.
Related issues: #370