Skip to content

Add test for writing to undefined identifier and parsing#137

Open
smarr wants to merge 2 commits into
SOM-st:masterfrom
smarr:add-new-tests
Open

Add test for writing to undefined identifier and parsing#137
smarr wants to merge 2 commits into
SOM-st:masterfrom
smarr:add-new-tests

Conversation

@smarr
Copy link
Copy Markdown
Member

@smarr smarr commented May 16, 2026

This PR adds two tests based on SOM-st/SOMpp#65

  • parse_and_methods.som: tests that the parser correctly takes --- as a method name instead of the instance/class separator and that we can print the methods and their holders in two classes. The printing caused a segfault on SOM++ because the holder was not correctly set

  • unknown_field_write2.som: another test for writing to an undefined identifier. SOM++ had a wrong assertion for this case

I don't expect to merge this any time soon, since this requires updating all SOMs. And I should really have a more uniform error format.

smarr added 2 commits May 16, 2026 15:31
Bug report: SOM-st/SOMpp#65

Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
@smarr smarr added the enhancement Improves the implementation with something noteworthy label May 16, 2026
@smarr smarr linked an issue May 16, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improves the implementation with something noteworthy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Turn reported bug examples into integration tests

1 participant