MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

Engraving UTests: more intuitive diffs for failing tests

Open cbjeukendrup opened this issue 1 year ago • 0 comments

The ref file should be passed as the first argument, and the current output as the second argument, otherwise the '-' and '+' in front of lines are inverted w.r.t. what you would intuitively expect.

Of course you have those '---' and '+++' lines at the beginning, so you can still easily figure out what's going on, but it's nice if you can use your intuition too.

For example, in https://github.com/musescore/MuseScore/actions/runs/3750636998/jobs/6370607316#step:9:1533, there is an addition w.r.t. the ref files, but it was displayed as a deletion.

This only applies to the engraving module (and maybe other modules that use ScoreComp::saveCompareScore), because other modules still use the old MTest class where the arguments were swapped inside the compareFiles method (which is not a great solution IMHO, but we'll remove those MTest class anyway).

cbjeukendrup avatar Dec 21 '22 16:12 cbjeukendrup