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 Parallax2D #95650

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

LeonStansfield
Copy link
Contributor

In this PR I have added unit tests for parallax_2d.h for the tracker #43440
The tests include

  • set_scroll_scale and get_scroll_scale
  • set_repeat_size and get_repeat_size
  • set_repeat_times and get_repeat_times
  • set_autoscroll and get_autoscroll
  • set_scroll_offset and get_scroll_offset
  • set_screen_offset and get_screen_offset
  • set_limit_begin and get_limit_begin
  • set_limit_end and get_limit_end
  • set_follow_viewport and get_follow_viewport
  • set_ignore_camera_scroll and is_ignore_camera_scroll

@LeonStansfield LeonStansfield requested a review from a team as a code owner August 16, 2024 16:56
@Calinou Calinou added this to the 4.4 milestone Aug 16, 2024
@Calinou
Copy link
Member

Calinou commented Aug 16, 2024

cc @markdibarry

@AThousandShips
Copy link
Member

Please use clang-format or the precommit hook, see here, to fix your style instead

@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).

@LeonStansfield LeonStansfield force-pushed the parallax_2d_tests branch 2 times, most recently from 37bfa81 to 7ae9f6b Compare September 5, 2024 18:01
@AThousandShips AThousandShips changed the title Unit tests for parallax_2d Add unit tests for Parallax2D Sep 5, 2024
@AThousandShips
Copy link
Member

Please fix the commit message to follow the style, the PR title would be good

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.

Style looks good otherwise

- Added test cases for setting and getting key properties of Parallax2D, including:
  - Scroll scale
  - Repeat size and times
  - Autoscroll
  - Scroll and screen offset
  - Limit begin and end
  - Follow viewport and ignore camera scroll flags
@akien-mga akien-mga merged commit df387b2 into godotengine:master Sep 6, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

6 participants