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 HeightMapShape3D #95123

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

LeonStansfield
Copy link
Contributor

Description

This PR adds unit tests for the HeightMapShape3D class, as part of '[TRACKER] Unit tests to add or improve #43440'
#43440

Changes

I have added 7 new tests:

  • Constructor
  • set_map_width and get_map_width
  • set_map_depth and get_map_depth
  • set_map_data and get_map_data
  • get_min_height
  • get_max_height
  • update_map_data_from_image

@LeonStansfield LeonStansfield requested a review from a team as a code owner August 4, 2024 10:31
tests/test_main.cpp Outdated Show resolved Hide resolved
@AThousandShips AThousandShips changed the title Test height map shape 3d Add tests for HeightMapShape3D Aug 4, 2024
@AThousandShips AThousandShips added this to the 4.x milestone Aug 4, 2024
tests/scene/test_height_map_shape_3d.h Outdated Show resolved Hide resolved
tests/scene/test_height_map_shape_3d.h Outdated Show resolved Hide resolved
tests/scene/test_height_map_shape_3d.h Outdated Show resolved Hide resolved
tests/scene/test_height_map_shape_3d.h Show resolved Hide resolved
tests/scene/test_height_map_shape_3d.h Outdated Show resolved Hide resolved
tests/scene/test_height_map_shape_3d.h Outdated Show resolved Hide resolved
Copy link
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.

LGTM

@kleonc
Copy link
Member

kleonc commented Sep 5, 2024

Please squash commits into one, see PR workflow (and ensure the resulting commit has a short descriptive title).

@AThousandShips
Copy link
Member

Please fix the commit title here as well

@AThousandShips AThousandShips changed the title Add tests for HeightMapShape3D Add unit tests for HeightMapShape3D Sep 5, 2024
@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 6, 2024
Added test cases for constructor and property getters/setters:
- Map width, depth, and data
- Minimum and maximum height
- Update map data from image
@akien-mga akien-mga merged commit b47bf22 into godotengine:master Sep 6, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

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.

5 participants