Closed dudarboh closed 2 years ago
I would add some debug printouts, but I was hesitant to use std::cout
...
Hi @dudarboh,
Thanks for actually diving into this and fixing the underlying issue. Looks like you found a quite elegant fix in the end. I am currently having a look to see if there is an easy way of adding some tests for this. I will do that once I found it.
~Can you rebase this onto the latest master to pick up a working CI configuration for now, please?~
Great, thanks for the test processor!
Do you think it makes sense to add some tests, where parameters are added with a value
keyword?
As it enters completely different if
branch and has a completely different readout logic:
(which probably can be removed(?)/refactored better, but I didn't try)
https://github.com/iLCSoft/Marlin/blob/f56c872894f9b5575db507fb34babf7b57846200/source/src/XMLParser.cc#L384-L387
Comments there look very weird to even add them in the first place, but it still should read parameters properly w/o any comments.
How would a comment look like in the value
use-case in xml? In any case adding more ways to parse parameters to the existing tests should be fairly straight forward now.
It looks like trying to put a comment into an explicit value
tag actually breaks parsing, so that should not be a problem at all. I have added one simple test case that checks if things work also for that. Additionally, the tests are now actually checking the expected content, not just the expected number of parameters.
BEGINRELEASENOTES
ENDRELEASENOTES
Tests
steer.xml
Before PR:
After PR:
steer.xml
Before PR:
After PR:
Simple tests that don't change the behaviour
Before/After PR:
Let me know if I should check other variations.