Renanse / Ardor3D

Ardor3D is a free Java based, professionally oriented, open source 3D graphics engine.
Other
227 stars 77 forks source link

Add tests for com.ardor3d.math.MathUtils #84

Closed sudo-jaa closed 4 years ago

sudo-jaa commented 5 years ago

Hi, I've analysed your code base and noticed that com.ardor3d.math.MathUtils is not fully tested. This is according to IntelliJ's internal coverage runner.

I've written tests for the functions in this classes with the help of Diffblue Cover. Hopefully, they should help you detect any regressions caused by future code changes. Given that many of the functions in this class can be run with either FastMath or regular math, I have written the tests here to describe the behaviour of these functions whether the useFastMath boolean is set to true or false.

I will note that the FastMath implementation of tan() seems to yield considerably different results from its regular math counterpart. I wasn't sure if this is considered a bug or not.

If you would find it useful to have additional tests written for this repository, I would be more than happy to look at other particular classes that you consider important.

Renanse commented 4 years ago

I would like more test coverage, but I don't believe auto-generated tests will give us guaranteed relevant coverage.