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

Refactor PhysicsTest.cpp: add PhysicsManagerTest feature #397

Merged
merged 4 commits into from
Jan 6, 2020

Conversation

aclegg3
Copy link
Contributor

@aclegg3 aclegg3 commented Dec 20, 2019

Motivation and Context

In order to test physics functionality, the scene must first be loaded and initialized. This process would be duplicated for each test. This setup is now abstracted into PhysicsManagerTest feature which can be re-used by each physics test to avoid code duplication.

How Has This Been Tested

C++ tests still run and pass.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aclegg3 aclegg3 self-assigned this Dec 20, 2019
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 20, 2019
Copy link
Contributor

@msbaines msbaines left a comment

Choose a reason for hiding this comment

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

@aclegg3
Copy link
Contributor Author

aclegg3 commented Dec 20, 2019

Maybe use a test fixture

Thanks, this is nicer. 😄

@aclegg3 aclegg3 changed the title Refactor PhysicsTest.cpp: add PhysicsTestWorld Refactor PhysicsTest.cpp: add PhysicsManagerTest feature Dec 20, 2019
@codecov-io
Copy link

codecov-io commented Dec 20, 2019

Codecov Report

Merging #397 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #397      +/-   ##
==========================================
+ Coverage   55.57%   55.58%   +0.01%     
==========================================
  Files         167      167              
  Lines        7862     7865       +3     
  Branches       82       82              
==========================================
+ Hits         4369     4372       +3     
  Misses       3493     3493
Flag Coverage Δ
#CPP 51.95% <100%> (+0.02%) ⬆️
#JavaScript 5.53% <ø> (ø) ⬆️
#Python 77.42% <ø> (ø) ⬆️
Impacted Files Coverage Δ
src/tests/PhysicsTest.cpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f43e096...b3dcd9f. Read the comment docs.

@aclegg3 aclegg3 mentioned this pull request Dec 20, 2019
11 tasks
@aclegg3 aclegg3 mentioned this pull request Jan 3, 2020
11 tasks
Copy link
Contributor

@msbaines msbaines left a comment

Choose a reason for hiding this comment

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

One small nit.

src/tests/PhysicsTest.cpp Outdated Show resolved Hide resolved
@aclegg3 aclegg3 merged commit 7187be0 into master Jan 6, 2020
@aclegg3 aclegg3 deleted the physics-test-world branch January 6, 2020 19:18
Ram81 pushed a commit to Ram81/habitat-web-sim that referenced this pull request Dec 10, 2020
…earch#397)

* Refactor PhysicsTest.cpp to extract world/scene setup from individual tests to avoid code duplication.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants