Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for UndoRedo #85434

Closed
wants to merge 1 commit into from

Conversation

TheSofox
Copy link
Contributor

@TheSofox TheSofox commented Nov 27, 2023

Added Unit Test for the UndoRedo system.

This one tests basic functionality and should pass fine.

I'm getting a warning about "ObjectDB instances leaked at exit", but I get the exact same error when running "test_object" (which I used for help with some of the code I wrote) and I double checked my memory allocation so I'm not sure where this is coming from.

Edit: Mentioning #43440 as it's a unit test.

@TheSofox TheSofox requested a review from a team as a code owner November 27, 2023 14:08
@AThousandShips
Copy link
Member

AThousandShips commented Nov 27, 2023

You seem to have missed some of your code, or was this meant to be a draft?

@AThousandShips AThousandShips changed the title Added Tests for UndoRedo Add unit tests for UndoRedo Nov 27, 2023
@AThousandShips AThousandShips added this to the 4.x milestone Nov 27, 2023
@TheSofox
Copy link
Contributor Author

Apologies. Pushed correct version.

@AThousandShips
Copy link
Member

Still not right, you've not included the actual test file, did you forget to git add them?

tests/core/object/test_undo_redo.h Outdated Show resolved Hide resolved
tests/core/object/test_undo_redo.h Outdated Show resolved Hide resolved
tests/core/object/test_undo_redo.h Outdated Show resolved Hide resolved
tests/core/object/test_undo_redo.h Outdated Show resolved Hide resolved
@TheSofox
Copy link
Contributor Author

I do want to mention that there are other UndoRedo tests I want to write but was waiting for this PR to be accepted first so I could build on it.

I also want to write tests for MERGE_ALL function of 'UndoRedo' once my PR to fix it has been merged: #85390

@TheSofox
Copy link
Contributor Author

TheSofox commented Mar 6, 2024

This PR has served its purpose. When adding Unit Tests to #85390 to demonstrate I'd fixed the problem, I transferred the Unit Tests from this PR to that one. Thanks @AThousandShips for ensuring this code was in good condition. The code is now in the engine so this specific PR no longer has a purpose.

@TheSofox TheSofox closed this Mar 6, 2024
@TheSofox TheSofox deleted the undo-redo-tests branch March 6, 2024 10:27
@TheSofox TheSofox restored the undo-redo-tests branch March 6, 2024 10:27
@AThousandShips AThousandShips removed this from the 4.x milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants