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

Added unit tests #1294

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open

Added unit tests #1294

wants to merge 54 commits into from

Conversation

gsenden
Copy link

@gsenden gsenden commented May 17, 2024

Hi,

For my hobby project to create a Rust implementation of matter.js, I am creating unittests . The Javascript unittests are used to replicate the functionality in Rust. This way I can ensure that the code behaves in a simular fashion.

I have never done any opensource contributions, but I thought that my work could be of use to the community. As an example I have included the unittests for Vector.

The goal of the unittests is to take the current implementation as standard. So no tests should fail, but I have added a //TODO: comment when the behavior micht be less desireable. This could be if the code throws an error or calculates to NaN or Infinity.

In case this kind of work is appreciated I can commit the unittests for the rest of the code. To be clear here: I'm not ready yet.

As stated earlier: I have never done this before. That is why I have kept the Rust implementation private. I will make it public once it gets done, or if other people want to participate. For now it is just a hobby project, but I thought the Javascript code could be helpful.

Greetings,
Ger

@gsenden gsenden changed the title Added Vector unit tests Added unit tests May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant