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

Tests: Unit Tests for Math #25385

Merged
merged 26 commits into from
Jan 31, 2023
Merged

Tests: Unit Tests for Math #25385

merged 26 commits into from
Jan 31, 2023

Conversation

epreston
Copy link
Contributor

Related issue: #XXXX

Description

This cleans up the unit tests for Math.
Adds missing unit test files, fills in some unit tests, populates the missing member tests with stubs.

A test fixture, 'math/Constants.tests.js' wasnt a test file but a set of fixures used by:

animation/AnimationMixer.tests.js
core/BufferGeometry.tests.js
core/Object3D.tests.js
core/Uniform.tests.js
math/Box2.tests.js
math/Box3.tests.js
math/Color.tests.js
math/Cylindrical.tests.js
math/Euler.tests.js
math/Frustum.tests.js
math/Line3.tests.js
math/Matrix4.tests.js
math/Plane.tests.js
math/Quaternion.tests.js
math/Ray.tests.js
math/Sphere.tests.js
math/Spherical.tests.js
math/Triangle.tests.js
math/Vector2.tests.js
math/Vector3.tests.js
math/Vector4.tests.js

Shared math constants for tests moved to utils. Only tests in test source. This also removes the confusion with the actual 'Constants.tests.js' file in the parent directory.

A test fixture, 'math/Constants.tests.js' wasnt a test file but a set of fixures used by:

animation/AnimationMixer.tests.js
core/BufferGeometry.tests.js
core/Object3D.tests.js
core/Uniform.tests.js
math/Box2.tests.js
math/Box3.tests.js
math/Color.tests.js
math/Cylindrical.tests.js
math/Euler.tests.js
math/Frustum.tests.js
math/Line3.tests.js
math/Matrix4.tests.js
math/Plane.tests.js
math/Quaternion.tests.js
math/Ray.tests.js
math/Sphere.tests.js
math/Spherical.tests.js
math/Triangle.tests.js
math/Vector2.tests.js
math/Vector3.tests.js
math/Vector4.tests.js

Shared math constants for tests moved to utils.  Only tests in test source.
Add unit tests for ColorManagement
Add unit tests for SphericalHarmonics3
CubicInterpolant extends from Interpolant.
Add missing member tests and stubs.
DiscreteInterpolant extends from Interpolant.
Add missing member tests and stubs.
QuaternionLinearInterpolant extends from Interpolant.
Add missing member tests and stubs.
LinearInterpolant extends from Interpolant.
Add missing member tests and stubs.
Add missing member test.
Stub missing member tests.  Source ordering.  Group all functional tests under "Others".
Stub missing member test.
Stub missing member test.  Update old names in test description.
Stub missing member tests. Source ordering.
Stub missing member tests.
Add missing member test.
Stub missing member test. isInterestionLine does not exist, intersectLine does not test the boolean variant with an extra S, intersectsLine.
Stub missing member tests.
Stub missing member test. Correct typo.
isSpherical does not exist on Spherical.  Add missing member test.
Stub missing static and member tests. Both are API even if one calls the other.
isSphere does not exist on Sphere.
isRay does not exist on Ray.
Fill in member tests.  Rename test title to reflect recent changes in API.
Stub missing member tests. Source ordering.
Fill in member test.
I'm going to agree with Code scanning
/ CodeQL and use a more specific test.
@epreston
Copy link
Contributor Author

Are we running 8 of the same E2E tests ? Each operating system appears 8 times.

@LeviPesin
Copy link
Contributor

Yes, we run 8 tests on each of 3 OSes.

@epreston
Copy link
Contributor Author

What's the difference between them ? Is it to find variance in images generated ?

@LeviPesin
Copy link
Contributor

Each runs on the 1/8'th of all examples -- it would be too slow to combine them into one test without parallelization.

@mrdoob mrdoob added this to the r150 milestone Jan 31, 2023
@mrdoob mrdoob merged commit 3221e43 into mrdoob:dev Jan 31, 2023
@epreston epreston deleted the tests-math-cleanup branch January 31, 2023 07:38
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.

3 participants