mastodon-sc / mastodon

Mastodon – a large-scale tracking and track-editing framework for large, multi-view images.
BSD 2-Clause "Simplified" License
66 stars 20 forks source link

Add Unit Test to Thoroughly Tests Mastodon's Undo Redo Mechanism #289

Closed maarzt closed 3 months ago

maarzt commented 4 months ago

There is a PR to fix a small problem in Mastodon's undo/redo mechanism: https://github.com/mastodon-sc/mastodon-collection/pull/16

The goal of this PR is to ensure that Mastodons very important undo/redo mechanism works properly. I there for added a unit test ModelUndoRedoTest. The unit test uses the ModelUtils.dump(...) method to convert the current status of the Model into a string. Converting the model status into string allows me to test if the model is correctly rolled back into a specific (previously) recorded state.

It was necessary to extend the ModelUtils.dump(...) method to also print the tag sets. (The undo redo mechanism handle tags as well.)

maarzt commented 4 months ago

The test currently fails because of a but in the Undo/Redo mechanism. That will be fixed by this PR https://github.com/mastodon-sc/mastodon-collection/pull/16