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 tests for Projection #99125

Merged
merged 1 commit into from
Nov 29, 2024
Merged

Conversation

Flarkk
Copy link
Contributor

@Flarkk Flarkk commented Nov 12, 2024

This PR adds nearly full test coverage for struct Projection.

The following few methods are not covered yet and left to further PR(s) :

  • set_for_hmd() and create_perspective_hmd()
  • set_perspective() with eye input
  • set_orthogonal() with aspect input and create_orthogonal_aspect()
  • set_frustum() with aspect input and create_frustum_aspect()
  • get_pixels_per_meter()
  • get_lod_multiplier()
  • and a few operators (==, !=, Transform3D)

@Flarkk Flarkk requested a review from a team as a code owner November 12, 2024 12:56
@Flarkk Flarkk force-pushed the projection_tests branch 2 times, most recently from 8d3129a to ffe5c8b Compare November 12, 2024 13:45
@Repiteo Repiteo added this to the 4.4 milestone Nov 12, 2024
@Flarkk Flarkk force-pushed the projection_tests branch 2 times, most recently from 980655b to d5f4beb Compare November 12, 2024 17:46
@Flarkk
Copy link
Contributor Author

Flarkk commented Nov 13, 2024

Sorry for these repeated force push. The workflow stopped on a weird error with asan. I ended up removing the DOCTEST_STRINGIFY_VARIANT I had added for Vector4, Vector4i and Projection in test_macros.h as I suspect it was related to the stringification logic. I couldn't investigate further for now so as a quick fix I simply removed them. I hope it's ok now.

@Flarkk
Copy link
Contributor Author

Flarkk commented Nov 13, 2024

Last force push I hope... Everything builds and runs fine in my environment

@Flarkk
Copy link
Contributor Author

Flarkk commented Nov 16, 2024

Allright, ready for review !

@Flarkk
Copy link
Contributor Author

Flarkk commented Nov 27, 2024

Rebased on top of #95303

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@akien-mga akien-mga merged commit bcb5f83 into godotengine:master Nov 29, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@Flarkk Flarkk deleted the projection_tests branch December 2, 2024 12:24
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.

4 participants