YarnSpinnerTool / YarnSpinner

Yarn Spinner is a tool for building interactive dialogue in games!
https://yarnspinner.dev
MIT License
2.3k stars 201 forks source link

`TestLineTagsAreAdded` depends on dictionary order, which is not guaranteed #363

Closed janhohenheim closed 1 year ago

janhohenheim commented 1 year ago

Specifically this line: https://github.com/YarnSpinnerTool/YarnSpinner/blob/main/YarnSpinner.Tests/ProjectTests.cs#L263 This is only well-defined if matchingEntries has a length of exactly 1, but by manually checking I was able to verify that its length goes up to 4.

McJones commented 1 year ago

oh nice catch. I suppose the best fix is to sort the expected results so that tagged results are processed first, just because we can't know the results of the line tagger ahead of time so the best we can do is check the known results first and then run through the ones the auto-tagger has processed.