Open jsbean opened 4 years ago
I've tried a bit round-trip testing for custom examples, and I found that the current state of XMLCoder
does not support pretty printing - meaning the model -> xml conversion is never going to be the same as the original xml.
Neither we have any tools to trim all spaces between element tags reliably for xml, so we cannot compare the trimmed version of xml to the generated xml.
You can set XMLEncoder.outputFormatting = .prettyPrinted
.
That said, I don’t think we need to test the concrete encoded values directly. Instead, we should test the semantics of the decoded to the decoded-encoded-decoded values.
We currently only test that we can decode the LilyPond test suite without throwing errors. Now, let's up the ante by making the LilyPond tests perform the following maneuver:
MusicXML
modelMusicXML
model