Skip to content

Add tests to Image -- rotate_90(), rotate_180() and decompress()#119881

Open
Spudoku wants to merge 10 commits into
godotengine:masterfrom
Spudoku:image-testing
Open

Add tests to Image -- rotate_90(), rotate_180() and decompress()#119881
Spudoku wants to merge 10 commits into
godotengine:masterfrom
Spudoku:image-testing

Conversation

@Spudoku
Copy link
Copy Markdown

@Spudoku Spudoku commented May 29, 2026

What problem(s) does this PR solve?

link to issue #43440

Adds unit tests for the Image class, specifically for its methods rotate_90(), rotate_180() and decompress()

AI was used for code feedback, but not for writing code.

Spudoku added 5 commits May 15, 2026 12:48
…fset_polygon, triangulate_delaunay and triangulate_polygon
collinear lines and zero-area polygons are valid apparently?
These include:
- cases of non-square images
- Idempotecy cases (multiple rotations equalling rotate_180(), the original data, or a single counterclockwise rotation)
@Spudoku Spudoku requested a review from a team as a code owner May 29, 2026 18:49
Comment thread tests/core/io/test_image.cpp Outdated
Comment thread tests/core/io/test_image.cpp Outdated
Comment thread tests/core/io/test_image.cpp Outdated
Comment thread tests/core/io/test_image.cpp Outdated
Comment thread tests/core/io/test_image.cpp Outdated
Comment thread tests/core/io/test_image.cpp Outdated
Copy link
Copy Markdown
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise I think this looks good conceptually, but the relevant teams will have to review as well

Comment thread tests/core/io/test_image.cpp Outdated
Comment thread tests/core/io/test_image.cpp Outdated
Also attempted to address memory leaks found in "Linux / Editor with doubles and GCC sanitizers (target=editor, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=mold)"
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.

3 participants