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 extra unit tests for Transform2D #74999

Closed
wants to merge 1 commit into from

Conversation

titus125
Copy link
Contributor

Added extra tests to cover almost all functions in the Transform2D class. Note that the looking_at tests fail with the current implementation of the function. Issue raised in #74966.

Sorry for duplicate #74977. I deleted my repo on accident.

@titus125 titus125 requested a review from a team as a code owner March 16, 2023 20:26
@Rubonnek Rubonnek added this to the 4.1 milestone Mar 16, 2023
@titus125
Copy link
Contributor Author

The failed tests seem to be related to the unit test of looking_at failing, which I've addressed. Do all tests need to pass for review?

@AThousandShips
Copy link
Member

AThousandShips commented Mar 17, 2023

All tests have to pass for merger, probably can't be reviewed until a fix for that bug is added and the test passes for it

@titus125 titus125 requested a review from a team as a code owner March 18, 2023 05:56
@titus125
Copy link
Contributor Author

I've rewritten the looking_at function. I'm not too familiar with the procedures here. Should I open a new pull request for changing looking_at, since it makes sense to have 2 seperate pull requests when I'm appending code in one area of the code base and changing another area of the code. However, it seems like I can only make one pull request for my fork.

@AThousandShips
Copy link
Member

You can only make one PR per branch, you should make any contributions on individual branches to make this easier

@titus125
Copy link
Contributor Author

titus125 commented Mar 18, 2023

Okay I have reverted the change to looking_at here and made a new PR that specifically changes the function.

@AThousandShips
Copy link
Member

I would recommend moving the looking_at tests to that PR so this can be evaluated independently, if there's any discussion about the specific solution etc.

@YuriSizov YuriSizov modified the milestones: 4.1, 4.2 Jun 14, 2023
@YuriSizov YuriSizov changed the title Added unit tests to test_transform_2d Add extra unit tests for Transform2D Jun 14, 2023
CHECK(test == expected);
}

TEST_CASE("[transform2d] Constructor from angle, scale, skew and position") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
TEST_CASE("[transform2d] Constructor from angle, scale, skew and position") {
TEST_CASE("[Transform2d] Constructor from angle, scale, skew and position") {

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
TEST_CASE("[transform2d] Constructor from angle, scale, skew and position") {
TEST_CASE("[Transform2D] Constructor from angle, scale, skew and position") {

}

TEST_CASE("[transform2d] Constructor from angle, scale, skew and position") {
const float ROTATATION = Math_PI / 2;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const float ROTATATION = Math_PI / 2;
const float ROTATION = Math_PI / 2;

and likewise where it's used.

}

TEST_CASE("[Transform2D] Constructor from angle and position") {
const float ROTATATION = Math_PI / 4;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const float ROTATATION = Math_PI / 4;
const float ROTATION = Math_PI / 4;

And where used

@AThousandShips AThousandShips modified the milestones: 4.2, 4.3 Oct 26, 2023
@Calinou Calinou removed the topic:2d label Apr 10, 2024
@akien-mga
Copy link
Member

Superseded by #90506. Thanks for the contribution!

@akien-mga akien-mga closed this Apr 10, 2024
@AThousandShips AThousandShips removed this from the 4.3 milestone Apr 11, 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.

7 participants