Procházet zdrojové kódy

Tests: Unit Tests for Math (#25385)

* Move Shared Math Utils to Utils

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 ColorManagement

* Add unit tests for SphericalHarmonics3

Add unit tests for SphericalHarmonics3

* Update CubicInterpolant.tests.js

CubicInterpolant extends from Interpolant.
Add missing member tests and stubs.

* Update DiscreteInterpolant.tests.js

DiscreteInterpolant extends from Interpolant.
Add missing member tests and stubs.

* Update QuaternionLinearInterpolant.tests.js

QuaternionLinearInterpolant extends from Interpolant.
Add missing member tests and stubs.

* Update LinearInterpolant.tests.js

LinearInterpolant extends from Interpolant.
Add missing member tests and stubs.

* Update Box2.tests.js

Add missing member test.

* Update Color.tests.js

Stub missing member tests.  Source ordering.  Group all functional tests under "Others".

* Update Cylindrical.tests.js

Stub missing member test.

* Update Frustum.tests.js

Review.

* Update Euler.tests.js

Stub missing member test.  Update old names in test description.

* Update MathUtils.tests.js

Stub missing member tests. Source ordering.

* Update Interpolant.tests.js

Stub missing member tests.

* Update Quaternion.tests.js

Add missing member test.

* Update Plane.tests.js

Stub missing member test. isInterestionLine does not exist, intersectLine does not test the boolean variant with an extra S, intersectsLine.

* Update Matrix3.tests.js

Stub missing member tests.

* Update Matrix4.tests.js

Stub missing member test. Correct typo.

* Update Spherical.tests.js

isSpherical does not exist on Spherical.  Add missing member test.

* Update Triangle.tests.js

Stub missing static and member tests. Both are API even if one calls the other.

* Update Sphere.tests.js

isSphere does not exist on Sphere.

* Update Ray.tests.js

isRay does not exist on Ray.

* Update Vector4.tests.js

Fill in member tests.  Rename test title to reflect recent changes in API.

* Update Vector3.tests.js

Stub missing member tests. Source ordering.

* Update Vector2.tests.js

Fill in member test.

* Update Interpolant.tests.js

I'm going to agree with Code scanning
/ CodeQL and use a more specific test.
Ed Preston před 2 roky
rodič
revize
3221e436c5
32 změnil soubory, kde provedl 677 přidání a 140 odebrání
  1. 1 1
      test/unit/src/animation/AnimationMixer.tests.js
  2. 1 1
      test/unit/src/core/BufferGeometry.tests.js
  3. 1 1
      test/unit/src/core/Object3D.tests.js
  4. 1 1
      test/unit/src/core/Uniform.tests.js
  5. 11 1
      test/unit/src/math/Box2.tests.js
  6. 1 1
      test/unit/src/math/Box3.tests.js
  7. 47 19
      test/unit/src/math/Color.tests.js
  8. 59 0
      test/unit/src/math/ColorManagement.tests.js
  9. 9 2
      test/unit/src/math/Cylindrical.tests.js
  10. 10 3
      test/unit/src/math/Euler.tests.js
  11. 4 3
      test/unit/src/math/Frustum.tests.js
  12. 39 3
      test/unit/src/math/Interpolant.tests.js
  13. 1 1
      test/unit/src/math/Line3.tests.js
  14. 31 4
      test/unit/src/math/MathUtils.tests.js
  15. 28 0
      test/unit/src/math/Matrix3.tests.js
  16. 9 2
      test/unit/src/math/Matrix4.tests.js
  17. 9 2
      test/unit/src/math/Plane.tests.js
  18. 8 1
      test/unit/src/math/Quaternion.tests.js
  19. 2 8
      test/unit/src/math/Ray.tests.js
  20. 2 8
      test/unit/src/math/Sphere.tests.js
  21. 18 7
      test/unit/src/math/Spherical.tests.js
  22. 121 0
      test/unit/src/math/SphericalHarmonics3.tests.js
  23. 27 3
      test/unit/src/math/Triangle.tests.js
  24. 15 3
      test/unit/src/math/Vector2.tests.js
  25. 74 20
      test/unit/src/math/Vector3.tests.js
  26. 61 31
      test/unit/src/math/Vector4.tests.js
  27. 26 3
      test/unit/src/math/interpolants/CubicInterpolant.tests.js
  28. 19 3
      test/unit/src/math/interpolants/DiscreteInterpolant.tests.js
  29. 19 3
      test/unit/src/math/interpolants/LinearInterpolant.tests.js
  30. 19 3
      test/unit/src/math/interpolants/QuaternionLinearInterpolant.tests.js
  31. 2 0
      test/unit/three.source.unit.js
  32. 2 2
      test/unit/utils/math-constants.js

+ 1 - 1
test/unit/src/animation/AnimationMixer.tests.js

@@ -4,7 +4,7 @@ import { AnimationMixer } from '../../../../src/animation/AnimationMixer.js';
 import { AnimationClip } from '../../../../src/animation/AnimationClip.js';
 import { AnimationClip } from '../../../../src/animation/AnimationClip.js';
 import { VectorKeyframeTrack } from '../../../../src/animation/tracks/VectorKeyframeTrack.js';
 import { VectorKeyframeTrack } from '../../../../src/animation/tracks/VectorKeyframeTrack.js';
 import { Object3D } from '../../../../src/core/Object3D.js';
 import { Object3D } from '../../../../src/core/Object3D.js';
-import { zero3, one3, two3 } from '../math/Constants.tests.js';
+import { zero3, one3, two3 } from '../../utils/math-constants.js';
 
 
 function getClips( pos1, pos2, scale1, scale2, dur ) {
 function getClips( pos1, pos2, scale1, scale2, dur ) {
 
 

+ 1 - 1
test/unit/src/core/BufferGeometry.tests.js

@@ -10,7 +10,7 @@ import { Vector3 } from '../../../../src/math/Vector3.js';
 import { Matrix4 } from '../../../../src/math/Matrix4.js';
 import { Matrix4 } from '../../../../src/math/Matrix4.js';
 import { Quaternion } from '../../../../src/math/Quaternion.js';
 import { Quaternion } from '../../../../src/math/Quaternion.js';
 import { Sphere } from '../../../../src/math/Sphere.js';
 import { Sphere } from '../../../../src/math/Sphere.js';
-import { x, y, z } from '../math/Constants.tests.js';
+import { x, y, z } from '../../utils/math-constants.js';
 
 
 var DegToRad = Math.PI / 180;
 var DegToRad = Math.PI / 180;
 
 

+ 1 - 1
test/unit/src/core/Object3D.tests.js

@@ -11,7 +11,7 @@ import {
 	z,
 	z,
 	w,
 	w,
 	eps
 	eps
-} from '../math/Constants.tests.js';
+} from '../../utils/math-constants.js';
 import { EventDispatcher } from '../../../../src/core/EventDispatcher.js';
 import { EventDispatcher } from '../../../../src/core/EventDispatcher.js';
 
 
 const matrixEquals4 = ( a, b ) => {
 const matrixEquals4 = ( a, b ) => {

+ 1 - 1
test/unit/src/core/Uniform.tests.js

@@ -6,7 +6,7 @@ import {
 	x,
 	x,
 	y,
 	y,
 	z
 	z
-} from '../math/Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Core', () => {
 export default QUnit.module( 'Core', () => {
 
 

+ 11 - 1
test/unit/src/math/Box2.tests.js

@@ -9,7 +9,7 @@ import {
 	zero2,
 	zero2,
 	one2,
 	one2,
 	two2
 	two2
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -33,6 +33,16 @@ export default QUnit.module( 'Maths', () => {
 		} );
 		} );
 
 
 		// PUBLIC STUFF
 		// PUBLIC STUFF
+		QUnit.test( 'isBox2', ( assert ) => {
+
+			var a = new Box2();
+			assert.ok( a.isBox2 === true, 'Passed!' );
+
+			var b = new Object();
+			assert.ok( ! b.isBox2, 'Passed!' );
+
+		} );
+
 		QUnit.test( 'set', ( assert ) => {
 		QUnit.test( 'set', ( assert ) => {
 
 
 			var a = new Box2();
 			var a = new Box2();

+ 1 - 1
test/unit/src/math/Box3.tests.js

@@ -18,7 +18,7 @@ import {
 	zero3,
 	zero3,
 	one3,
 	one3,
 	two3
 	two3
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 function compareBox( a, b, threshold ) {
 function compareBox( a, b, threshold ) {
 
 

+ 47 - 19
test/unit/src/math/Color.tests.js

@@ -1,7 +1,7 @@
 /* global QUnit */
 /* global QUnit */
 
 
 import { Color } from '../../../../src/math/Color.js';
 import { Color } from '../../../../src/math/Color.js';
-import { eps } from './Constants.tests.js';
+import { eps } from '../../utils/math-constants.js';
 import { CONSOLE_LEVEL } from '../../utils/console-wrapper.js';
 import { CONSOLE_LEVEL } from '../../utils/console-wrapper.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
@@ -251,6 +251,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'getRGB', ( assert ) => {
+
+			// getRGB( target, colorSpace = ColorManagement.workingColorSpace )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'getStyle', ( assert ) => {
 		QUnit.test( 'getStyle', ( assert ) => {
 
 
 			var c = new Color( 'plum' );
 			var c = new Color( 'plum' );
@@ -344,33 +351,29 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		QUnit.test( 'copyHex', ( assert ) => {
+		QUnit.test( 'lerp', ( assert ) => {
 
 
 			var c = new Color();
 			var c = new Color();
-			var c2 = new Color( 0xF5FFFA );
-			c.copy( c2 );
-			assert.ok( c.getHex() == c2.getHex(), 'Hex c: ' + c.getHex() + ' Hex c2: ' + c2.getHex() );
+			var c2 = new Color();
+			c.setRGB( 0, 0, 0 );
+			c.lerp( c2, 0.2 );
+			assert.ok( c.r == 0.2, 'Red: ' + c.r );
+			assert.ok( c.g == 0.2, 'Green: ' + c.g );
+			assert.ok( c.b == 0.2, 'Blue: ' + c.b );
 
 
 		} );
 		} );
 
 
-		QUnit.test( 'copyColorString', ( assert ) => {
+		QUnit.todo( 'lerpColors', ( assert ) => {
 
 
-			var c = new Color();
-			var c2 = new Color( 'ivory' );
-			c.copy( c2 );
-			assert.ok( c.getHex() == c2.getHex(), 'Hex c: ' + c.getHex() + ' Hex c2: ' + c2.getHex() );
+			// lerpColors( color1, color2, alpha )
+			assert.ok( false, 'everything\'s gonna be alright' );
 
 
 		} );
 		} );
 
 
-		QUnit.test( 'lerp', ( assert ) => {
+		QUnit.todo( 'lerpHSL', ( assert ) => {
 
 
-			var c = new Color();
-			var c2 = new Color();
-			c.setRGB( 0, 0, 0 );
-			c.lerp( c2, 0.2 );
-			assert.ok( c.r == 0.2, 'Red: ' + c.r );
-			assert.ok( c.g == 0.2, 'Green: ' + c.g );
-			assert.ok( c.b == 0.2, 'Blue: ' + c.b );
+			// lerpHSL( color, alpha )
+			assert.ok( false, 'everything\'s gonna be alright' );
 
 
 		} );
 		} );
 
 
@@ -438,6 +441,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'fromBufferAttribute', ( assert ) => {
+
+			// fromBufferAttribute( attribute, index )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'toJSON', ( assert ) => {
 		QUnit.test( 'toJSON', ( assert ) => {
 
 
 			var a = new Color( 0.0, 0.0, 0.0 );
 			var a = new Color( 0.0, 0.0, 0.0 );
@@ -452,7 +462,25 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		// OTHERS
+		// OTHERS - FUNCTIONAL
+		QUnit.test( 'copyHex', ( assert ) => {
+
+			var c = new Color();
+			var c2 = new Color( 0xF5FFFA );
+			c.copy( c2 );
+			assert.ok( c.getHex() == c2.getHex(), 'Hex c: ' + c.getHex() + ' Hex c2: ' + c2.getHex() );
+
+		} );
+
+		QUnit.test( 'copyColorString', ( assert ) => {
+
+			var c = new Color();
+			var c2 = new Color( 'ivory' );
+			c.copy( c2 );
+			assert.ok( c.getHex() == c2.getHex(), 'Hex c: ' + c.getHex() + ' Hex c2: ' + c2.getHex() );
+
+		} );
+
 		QUnit.test( 'setWithNum', ( assert ) => {
 		QUnit.test( 'setWithNum', ( assert ) => {
 
 
 			var c = new Color();
 			var c = new Color();

+ 59 - 0
test/unit/src/math/ColorManagement.tests.js

@@ -0,0 +1,59 @@
+/* global QUnit */
+
+import { ColorManagement } from '../../../../src/math/ColorManagement.js';
+
+export default QUnit.module( 'Maths', () => {
+
+	QUnit.module( 'ColorManagement', () => {
+
+		// PROPERTIES
+		QUnit.test( 'legacyMode', ( assert ) => {
+
+			assert.ok(
+				ColorManagement.legacyMode == true,
+				'ColorManagement.legacyMode is true by default.'
+			);
+
+		} );
+
+		QUnit.todo( 'workingColorSpace', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		// PUBLIC
+		QUnit.todo( 'convert', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'fromWorkingColorSpace', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'toWorkingColorSpace', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		// EXPORTED FUNCTIONS
+		QUnit.todo( 'SRGBToLinear', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'LinearToSRGB', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+	} );
+
+} );

+ 9 - 2
test/unit/src/math/Cylindrical.tests.js

@@ -2,7 +2,7 @@
 
 
 import { Cylindrical } from '../../../../src/math/Cylindrical.js';
 import { Cylindrical } from '../../../../src/math/Cylindrical.js';
 import { Vector3 } from '../../../../src/math/Vector3.js';
 import { Vector3 } from '../../../../src/math/Vector3.js';
-import { eps } from './Constants.tests.js';
+import { eps } from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -27,7 +27,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		// PUBLIC STUFF
+		// PUBLIC
 		QUnit.test( 'set', ( assert ) => {
 		QUnit.test( 'set', ( assert ) => {
 
 
 			var a = new Cylindrical();
 			var a = new Cylindrical();
@@ -91,6 +91,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'setFromCartesianCoords', ( assert ) => {
+
+			// setFromCartesianCoords( x, y, z )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 	} );
 	} );
 
 
 } );
 } );

+ 10 - 3
test/unit/src/math/Euler.tests.js

@@ -4,7 +4,7 @@ import { Euler } from '../../../../src/math/Euler.js';
 import { Matrix4 } from '../../../../src/math/Matrix4.js';
 import { Matrix4 } from '../../../../src/math/Matrix4.js';
 import { Quaternion } from '../../../../src/math/Quaternion.js';
 import { Quaternion } from '../../../../src/math/Quaternion.js';
 import { Vector3 } from '../../../../src/math/Vector3.js';
 import { Vector3 } from '../../../../src/math/Vector3.js';
-import { x, y, z } from './Constants.tests.js';
+import { x, y, z } from '../../utils/math-constants.js';
 
 
 const eulerZero = new Euler( 0, 0, 0, 'XYZ' );
 const eulerZero = new Euler( 0, 0, 0, 'XYZ' );
 const eulerAxyz = new Euler( 1, 0, 0, 'XYZ' );
 const eulerAxyz = new Euler( 1, 0, 0, 'XYZ' );
@@ -208,7 +208,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		QUnit.test( 'Quaternion.setFromEuler/Euler.fromQuaternion', ( assert ) => {
+		QUnit.test( 'Quaternion.setFromEuler/Euler.setFromQuaternion', ( assert ) => {
 
 
 			var testValues = [ eulerZero, eulerAxyz, eulerAzyx ];
 			var testValues = [ eulerZero, eulerAxyz, eulerAzyx ];
 			for ( var i = 0; i < testValues.length; i ++ ) {
 			for ( var i = 0; i < testValues.length; i ++ ) {
@@ -224,7 +224,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		QUnit.test( 'Matrix4.setFromEuler/Euler.fromRotationMatrix', ( assert ) => {
+		QUnit.test( 'Matrix4.makeRotationFromEuler/Euler.setFromRotationMatrix', ( assert ) => {
 
 
 			var testValues = [ eulerZero, eulerAxyz, eulerAzyx ];
 			var testValues = [ eulerZero, eulerAxyz, eulerAzyx ];
 			for ( var i = 0; i < testValues.length; i ++ ) {
 			for ( var i = 0; i < testValues.length; i ++ ) {
@@ -240,6 +240,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'Euler.setFromVector3', ( assert ) => {
+
+			// setFromVector3( v, order = this._order )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'reorder', ( assert ) => {
 		QUnit.test( 'reorder', ( assert ) => {
 
 
 			var testValues = [ eulerZero, eulerAxyz, eulerAzyx ];
 			var testValues = [ eulerZero, eulerAxyz, eulerAzyx ];

+ 4 - 3
test/unit/src/math/Frustum.tests.js

@@ -9,7 +9,7 @@ import { Matrix4 } from '../../../../src/math/Matrix4.js';
 import { Box3 } from '../../../../src/math/Box3.js';
 import { Box3 } from '../../../../src/math/Box3.js';
 import { Mesh } from '../../../../src/objects/Mesh.js';
 import { Mesh } from '../../../../src/objects/Mesh.js';
 import { BoxGeometry } from '../../../../src/geometries/BoxGeometry.js';
 import { BoxGeometry } from '../../../../src/geometries/BoxGeometry.js';
-import { zero3, one3, eps } from './Constants.tests.js';
+import { zero3, one3, eps } from '../../utils/math-constants.js';
 
 
 const unit3 = new Vector3( 1, 0, 0 );
 const unit3 = new Vector3( 1, 0, 0 );
 
 
@@ -49,7 +49,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		// PUBLIC STUFF
+		// PUBLIC
 		QUnit.test( 'set', ( assert ) => {
 		QUnit.test( 'set', ( assert ) => {
 
 
 			var a = new Frustum();
 			var a = new Frustum();
@@ -247,7 +247,8 @@ export default QUnit.module( 'Maths', () => {
 			intersects = a.intersectsBox( box );
 			intersects = a.intersectsBox( box );
 			assert.notOk( intersects, 'No intersection' );
 			assert.notOk( intersects, 'No intersection' );
 
 
-			// add eps so that we prevent box touching the frustum, which might intersect depending on floating point numerics
+			// add eps so that we prevent box touching the frustum,
+			// which might intersect depending on floating point numerics
 			box.translate( new Vector3( - 1 - eps, - 1 - eps, - 1 - eps ) );
 			box.translate( new Vector3( - 1 - eps, - 1 - eps, - 1 - eps ) );
 
 
 			intersects = a.intersectsBox( box );
 			intersects = a.intersectsBox( box );

+ 39 - 3
test/unit/src/math/Interpolant.tests.js

@@ -54,20 +54,56 @@ export default QUnit.module( 'Maths', () => {
 		// Tests
 		// Tests
 
 
 		// INSTANCING
 		// INSTANCING
-		QUnit.todo( 'Instancing', ( assert ) => {
+		QUnit.test( 'Instancing', ( assert ) => {
+
+			var interpolant = new Mock( null, [ 1, 11, 2, 22, 3, 33 ], 2, [] );
+
+			assert.strictEqual(
+				interpolant instanceof Interpolant, true,
+				'Mock extends from Interpolant'
+			);
+
+		} );
+
+		// PROPERTIES
+		QUnit.todo( 'parameterPositions', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'resultBuffer', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'sampleValues', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'valueSize', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'settings', ( assert ) => {
 
 
 			assert.ok( false, 'everything\'s gonna be alright' );
 			assert.ok( false, 'everything\'s gonna be alright' );
 
 
 		} );
 		} );
 
 
-		// PUBLIC STUFF
+		// PUBLIC
 		QUnit.todo( 'evaluate', ( assert ) => {
 		QUnit.todo( 'evaluate', ( assert ) => {
 
 
 			assert.ok( false, 'everything\'s gonna be alright' );
 			assert.ok( false, 'everything\'s gonna be alright' );
 
 
 		} );
 		} );
 
 
-		// PRIVATE STUFF
+		// PRIVATE
 		QUnit.test( 'copySampleValue_', ( assert ) => {
 		QUnit.test( 'copySampleValue_', ( assert ) => {
 
 
 			var interpolant = new Mock( null, [ 1, 11, 2, 22, 3, 33 ], 2, [] );
 			var interpolant = new Mock( null, [ 1, 11, 2, 22, 3, 33 ], 2, [] );

+ 1 - 1
test/unit/src/math/Line3.tests.js

@@ -11,7 +11,7 @@ import {
 	zero3,
 	zero3,
 	one3,
 	one3,
 	two3
 	two3
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 

+ 31 - 4
test/unit/src/math/MathUtils.tests.js

@@ -69,6 +69,14 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.test( 'pingpong', ( assert ) => {
+
+			assert.strictEqual( MathUtils.pingpong( 2.5 ), 0.5, 'Value at 2.5 is 0.5' );
+			assert.strictEqual( MathUtils.pingpong( 2.5, 2 ), 1.5, 'Value at 2.5 with length of 2 is 1.5' );
+			assert.strictEqual( MathUtils.pingpong( - 1.5 ), 0.5, 'Value at -1.5 is 0.5' );
+
+		} );
+
 		QUnit.test( 'smoothstep', ( assert ) => {
 		QUnit.test( 'smoothstep', ( assert ) => {
 
 
 			assert.strictEqual( MathUtils.smoothstep( - 1, 0, 2 ), 0, 'Value lower than minimum' );
 			assert.strictEqual( MathUtils.smoothstep( - 1, 0, 2 ), 0, 'Value lower than minimum' );
@@ -122,6 +130,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'seededRandom', ( assert ) => {
+
+			// seededRandom( s ) // interval [ 0, 1 ]
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'degToRad', ( assert ) => {
 		QUnit.test( 'degToRad', ( assert ) => {
 
 
 			assert.strictEqual( MathUtils.degToRad( 0 ), 0, '0 degrees' );
 			assert.strictEqual( MathUtils.degToRad( 0 ), 0, '0 degrees' );
@@ -166,12 +181,24 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'setQuaternionFromProperEuler', ( assert ) => {
 
 
-		QUnit.test( 'pingpong', ( assert ) => {
+			// setQuaternionFromProperEuler( q, a, b, c, order )
+			assert.ok( false, 'everything\'s gonna be alright' );
 
 
-			assert.strictEqual( MathUtils.pingpong( 2.5 ), 0.5, 'Value at 2.5 is 0.5' );
-			assert.strictEqual( MathUtils.pingpong( 2.5, 2 ), 1.5, 'Value at 2.5 with length of 2 is 1.5' );
-			assert.strictEqual( MathUtils.pingpong( - 1.5 ), 0.5, 'Value at -1.5 is 0.5' );
+		} );
+
+		QUnit.todo( 'denormalize', ( assert ) => {
+
+			// denormalize( value, array )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'normalize', ( assert ) => {
+
+			// normalize( value, array )
+			assert.ok( false, 'everything\'s gonna be alright' );
 
 
 		} );
 		} );
 
 

+ 28 - 0
test/unit/src/math/Matrix3.tests.js

@@ -147,6 +147,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'extractBasis', ( assert ) => {
+
+			// extractBasis( xAxis, yAxis, zAxis )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'setFromMatrix4', ( assert ) => {
 		QUnit.test( 'setFromMatrix4', ( assert ) => {
 
 
 
 
@@ -428,6 +435,27 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'makeTranslation', ( assert ) => {
+
+			// makeTranslation( x, y )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'makeRotation', ( assert ) => {
+
+			// makeRotation( theta ) // counterclockwise
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'makeScale', ( assert ) => {
+
+			// makeScale( x, y )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'equals', ( assert ) => {
 		QUnit.test( 'equals', ( assert ) => {
 
 
 			var a = new Matrix3().set( 0, 1, 2, 3, 4, 5, 6, 7, 8 );
 			var a = new Matrix3().set( 0, 1, 2, 3, 4, 5, 6, 7, 8 );

+ 9 - 2
test/unit/src/math/Matrix4.tests.js

@@ -6,7 +6,7 @@ import { Vector3 } from '../../../../src/math/Vector3.js';
 import { Euler } from '../../../../src/math/Euler.js';
 import { Euler } from '../../../../src/math/Euler.js';
 import { Quaternion } from '../../../../src/math/Quaternion.js';
 import { Quaternion } from '../../../../src/math/Quaternion.js';
 import * as MathUtils from '../../../../src/math/MathUtils.js';
 import * as MathUtils from '../../../../src/math/MathUtils.js';
-import { eps } from './Constants.tests.js';
+import { eps } from '../../utils/math-constants.js';
 
 
 
 
 function matrixEquals4( a, b, tolerance ) {
 function matrixEquals4( a, b, tolerance ) {
@@ -164,7 +164,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		QUnit.test( 'setFromMatrix4', ( assert ) => {
+		QUnit.test( 'setFromMatrix3', ( assert ) => {
 
 
 			var a = new Matrix3().set(
 			var a = new Matrix3().set(
 				0, 1, 2,
 				0, 1, 2,
@@ -267,6 +267,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'makeRotationFromQuaternion', ( assert ) => {
+
+			// makeRotationFromQuaternion( q )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'lookAt', ( assert ) => {
 		QUnit.test( 'lookAt', ( assert ) => {
 
 
 			var a = new Matrix4();
 			var a = new Matrix4();

+ 9 - 2
test/unit/src/math/Plane.tests.js

@@ -13,7 +13,7 @@ import {
 	w,
 	w,
 	zero3,
 	zero3,
 	one3
 	one3
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 function comparePlane( a, b, threshold ) {
 function comparePlane( a, b, threshold ) {
 
 
@@ -220,7 +220,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		QUnit.test( 'isInterestionLine/intersectLine', ( assert ) => {
+		QUnit.test( 'intersectLine', ( assert ) => {
 
 
 			var a = new Plane( new Vector3( 1, 0, 0 ), 0 );
 			var a = new Plane( new Vector3( 1, 0, 0 ), 0 );
 			var point = new Vector3();
 			var point = new Vector3();
@@ -235,6 +235,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'intersectsLine', ( assert ) => {
+
+			// intersectsLine( line ) // - boolean variant of above
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'intersectsBox', ( assert ) => {
 		QUnit.test( 'intersectsBox', ( assert ) => {
 
 
 			var a = new Box3( zero3.clone(), one3.clone() );
 			var a = new Box3( zero3.clone(), one3.clone() );

+ 8 - 1
test/unit/src/math/Quaternion.tests.js

@@ -12,7 +12,7 @@ import {
 	z,
 	z,
 	w,
 	w,
 	eps
 	eps
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 const orders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];
 const orders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];
 const eulerAngles = new Euler( 0.1, - 0.3, 0.25 );
 const eulerAngles = new Euler( 0.1, - 0.3, 0.25 );
@@ -338,6 +338,13 @@ export default QUnit.module( 'Maths', () => {
 		} );
 		} );
 
 
 		// PUBLIC STUFF
 		// PUBLIC STUFF
+		QUnit.test( 'isQuaternion', ( assert ) => {
+
+			const object = new Quaternion();
+			assert.ok( object.isQuaternion, 'Quaternion.isQuaternion should be true' );
+
+		} );
+
 		QUnit.test( 'set', ( assert ) => {
 		QUnit.test( 'set', ( assert ) => {
 
 
 			var a = new Quaternion();
 			var a = new Quaternion();

+ 2 - 8
test/unit/src/math/Ray.tests.js

@@ -12,7 +12,7 @@ import {
 	two3,
 	two3,
 	eps,
 	eps,
 	posInf3
 	posInf3
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -31,13 +31,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		// PUBLIC STUFF
-		QUnit.todo( 'isRay', ( assert ) => {
-
-			assert.ok( false, 'everything\'s gonna be alright' );
-
-		} );
-
+		// PUBLIC
 		QUnit.test( 'set', ( assert ) => {
 		QUnit.test( 'set', ( assert ) => {
 
 
 			var a = new Ray();
 			var a = new Ray();

+ 2 - 8
test/unit/src/math/Sphere.tests.js

@@ -10,7 +10,7 @@ import {
 	one3,
 	one3,
 	two3,
 	two3,
 	eps
 	eps
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -29,13 +29,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		// PUBLIC STUFF
-		QUnit.todo( 'isSphere', ( assert ) => {
-
-			assert.ok( false, 'everything\'s gonna be alright' );
-
-		} );
-
+		// PUBLIC
 		QUnit.test( 'set', ( assert ) => {
 		QUnit.test( 'set', ( assert ) => {
 
 
 			var a = new Sphere();
 			var a = new Sphere();

+ 18 - 7
test/unit/src/math/Spherical.tests.js

@@ -4,7 +4,7 @@ import { Spherical } from '../../../../src/math/Spherical.js';
 import { Vector3 } from '../../../../src/math/Vector3.js';
 import { Vector3 } from '../../../../src/math/Vector3.js';
 import {
 import {
 	eps
 	eps
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -30,12 +30,6 @@ export default QUnit.module( 'Maths', () => {
 		} );
 		} );
 
 
 		// PUBLIC STUFF
 		// PUBLIC STUFF
-		QUnit.todo( 'isSpherical', ( assert ) => {
-
-			assert.ok( false, 'everything\'s gonna be alright' );
-
-		} );
-
 		QUnit.test( 'set', ( assert ) => {
 		QUnit.test( 'set', ( assert ) => {
 
 
 			var a = new Spherical();
 			var a = new Spherical();
@@ -120,6 +114,23 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.test( 'setFromCartesianCoords', ( assert ) => {
+
+			var a = new Spherical( 1, 1, 1 );
+			var expected = new Spherical( 4.554032147688322, 1.3494066171539107, 2.356194490192345 );
+
+			a.setFromCartesianCoords( 0, 0, 0 );
+			assert.strictEqual( a.radius, 0, 'Zero-length vector: check radius' );
+			assert.strictEqual( a.phi, 0, 'Zero-length vector: check phi' );
+			assert.strictEqual( a.theta, 0, 'Zero-length vector: check theta' );
+
+			a.setFromCartesianCoords( Math.PI, 1, - Math.PI );
+			assert.ok( Math.abs( a.radius - expected.radius ) <= eps, 'Normal vector: check radius' );
+			assert.ok( Math.abs( a.phi - expected.phi ) <= eps, 'Normal vector: check phi' );
+			assert.ok( Math.abs( a.theta - expected.theta ) <= eps, 'Normal vector: check theta' );
+
+		} );
+
 	} );
 	} );
 
 
 } );
 } );

+ 121 - 0
test/unit/src/math/SphericalHarmonics3.tests.js

@@ -0,0 +1,121 @@
+/* global QUnit */
+
+import { SphericalHarmonics3 } from '../../../../src/math/SphericalHarmonics3.js';
+
+export default QUnit.module( 'Maths', () => {
+
+	QUnit.module( 'SphericalHarmonics3', () => {
+
+		// INSTANCING
+		QUnit.todo( 'Instancing', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		// PROPERTIES
+		QUnit.todo( 'coefficients', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		// PUBLIC
+		QUnit.test( 'isSphericalHarmonics3', ( assert ) => {
+
+			const object = new SphericalHarmonics3();
+			assert.ok(
+				object.isSphericalHarmonics3,
+				'SphericalHarmonics3.isSphericalHarmonics3 should be true'
+			);
+
+		} );
+
+		QUnit.todo( 'set', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'zero', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'getAt', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'getIrradianceAt', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'add', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'addScaledSH', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'scale', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'lerp', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'equals', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'copy', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'clone', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'fromArray', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'toArray', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		// PUBLIC - STATIC
+		QUnit.todo( 'getBasisAt', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+	} );
+
+} );

+ 27 - 3
test/unit/src/math/Triangle.tests.js

@@ -9,7 +9,7 @@ import {
 	zero3,
 	zero3,
 	one3,
 	one3,
 	two3
 	two3
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -30,7 +30,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		// STATIC STUFF
+		// STATIC
 		QUnit.todo( 'getNormal', ( assert ) => {
 		QUnit.todo( 'getNormal', ( assert ) => {
 
 
 			assert.ok( false, 'everything\'s gonna be alright' );
 			assert.ok( false, 'everything\'s gonna be alright' );
@@ -49,7 +49,23 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		// PUBLIC STUFF
+		QUnit.todo( 'getUV', ( assert ) => {
+
+			// static version of class member below
+			// getUV( point, p1, p2, p3, uv1, uv2, uv3, target )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'isFrontFacing', ( assert ) => {
+
+			// static version of class member below
+			// isFrontFacing( a, b, c, direction )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		// PUBLIC
 		QUnit.test( 'set', ( assert ) => {
 		QUnit.test( 'set', ( assert ) => {
 
 
 			var a = new Triangle();
 			var a = new Triangle();
@@ -232,6 +248,14 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'getUV', ( assert ) => {
+
+			// class member version
+			// getUV( point, uv1, uv2, uv3, target )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'containsPoint', ( assert ) => {
 		QUnit.test( 'containsPoint', ( assert ) => {
 
 
 			var a = new Triangle();
 			var a = new Triangle();

+ 15 - 3
test/unit/src/math/Vector2.tests.js

@@ -7,7 +7,7 @@ import {
 	x,
 	x,
 	y,
 	y,
 	eps
 	eps
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -55,9 +55,10 @@ export default QUnit.module( 'Maths', () => {
 		} );
 		} );
 
 
 		// PUBLIC STUFF
 		// PUBLIC STUFF
-		QUnit.todo( 'isVector2', ( assert ) => {
+		QUnit.test( 'isVector2', ( assert ) => {
 
 
-			assert.ok( false, 'everything\'s gonna be alright' );
+			const object = new Vector2();
+			assert.ok( object.isVector2, 'Vector2.isVector2 should be true' );
 
 
 		} );
 		} );
 
 
@@ -500,6 +501,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.y == y, 'Passed!' );
 			assert.ok( a.y == y, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'setComponent,getComponent', ( assert ) => {
 		QUnit.test( 'setComponent,getComponent', ( assert ) => {
 
 
 			var a = new Vector2();
 			var a = new Vector2();
@@ -512,6 +514,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.getComponent( 1 ) == 2, 'Passed!' );
 			assert.ok( a.getComponent( 1 ) == 2, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'multiply/divide', ( assert ) => {
 		QUnit.test( 'multiply/divide', ( assert ) => {
 
 
 			var a = new Vector2( x, y );
 			var a = new Vector2( x, y );
@@ -534,6 +537,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( b.y == - y, 'Passed!' );
 			assert.ok( b.y == - y, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'min/max/clamp', ( assert ) => {
 		QUnit.test( 'min/max/clamp', ( assert ) => {
 
 
 			var a = new Vector2( x, y );
 			var a = new Vector2( x, y );
@@ -559,6 +563,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.equal( c.y, x, 'scalar clamp y' );
 			assert.equal( c.y, x, 'scalar clamp y' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'rounding', ( assert ) => {
 		QUnit.test( 'rounding', ( assert ) => {
 
 
 			assert.deepEqual( new Vector2( - 0.1, 0.1 ).floor(), new Vector2( - 1, 0 ), 'floor .1' );
 			assert.deepEqual( new Vector2( - 0.1, 0.1 ).floor(), new Vector2( - 1, 0 ), 'floor .1' );
@@ -581,6 +586,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.deepEqual( new Vector2( - 1.9, 1.9 ).roundToZero(), new Vector2( - 1, 1 ), 'roundToZero 1.9' );
 			assert.deepEqual( new Vector2( - 1.9, 1.9 ).roundToZero(), new Vector2( - 1, 1 ), 'roundToZero 1.9' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'length/lengthSq', ( assert ) => {
 		QUnit.test( 'length/lengthSq', ( assert ) => {
 
 
 			var a = new Vector2( x, 0 );
 			var a = new Vector2( x, 0 );
@@ -599,6 +605,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.lengthSq() == ( x * x + y * y ), 'Passed!' );
 			assert.ok( a.lengthSq() == ( x * x + y * y ), 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'distanceTo/distanceToSquared', ( assert ) => {
 		QUnit.test( 'distanceTo/distanceToSquared', ( assert ) => {
 
 
 			var a = new Vector2( x, 0 );
 			var a = new Vector2( x, 0 );
@@ -612,6 +619,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( b.distanceToSquared( c ) == y * y, 'Passed!' );
 			assert.ok( b.distanceToSquared( c ) == y * y, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'lerp/clone', ( assert ) => {
 		QUnit.test( 'lerp/clone', ( assert ) => {
 
 
 			var a = new Vector2( x, 0 );
 			var a = new Vector2( x, 0 );
@@ -628,6 +636,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.clone().lerp( b, 1 ).equals( b ), 'Passed!' );
 			assert.ok( a.clone().lerp( b, 1 ).equals( b ), 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'setComponent/getComponent exceptions', ( assert ) => {
 		QUnit.test( 'setComponent/getComponent exceptions', ( assert ) => {
 
 
 			var a = new Vector2( 0, 0 );
 			var a = new Vector2( 0, 0 );
@@ -652,6 +661,7 @@ export default QUnit.module( 'Maths', () => {
 			);
 			);
 
 
 		} );
 		} );
+
 		QUnit.test( 'setScalar/addScalar/subScalar', ( assert ) => {
 		QUnit.test( 'setScalar/addScalar/subScalar', ( assert ) => {
 
 
 			var a = new Vector2( 1, 1 );
 			var a = new Vector2( 1, 1 );
@@ -670,6 +680,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.strictEqual( a.y, 0, 'subScalar: check y' );
 			assert.strictEqual( a.y, 0, 'subScalar: check y' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'multiply/divide', ( assert ) => {
 		QUnit.test( 'multiply/divide', ( assert ) => {
 
 
 			var a = new Vector2( x, y );
 			var a = new Vector2( x, y );
@@ -686,6 +697,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		// OTHERS
 		QUnit.test( 'iterable', ( assert ) => {
 		QUnit.test( 'iterable', ( assert ) => {
 
 
 			var v = new Vector2( 0, 1 );
 			var v = new Vector2( 0, 1 );

+ 74 - 20
test/unit/src/math/Vector3.tests.js

@@ -16,7 +16,7 @@ import {
 	z,
 	z,
 	w,
 	w,
 	eps
 	eps
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -38,9 +38,10 @@ export default QUnit.module( 'Maths', () => {
 		} );
 		} );
 
 
 		// PUBLIC STUFF
 		// PUBLIC STUFF
-		QUnit.todo( 'isVector3', ( assert ) => {
+		QUnit.test( 'isVector3', ( assert ) => {
 
 
-			assert.ok( false, 'everything\'s gonna be alright' );
+			const object = new Vector3();
+			assert.ok( object.isVector3, 'Vector3.isVector3 should be true' );
 
 
 		} );
 		} );
 
 
@@ -252,6 +253,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'applyNormalMatrix', ( assert ) => {
+
+			// applyNormalMatrix( m )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'applyMatrix4', ( assert ) => {
 		QUnit.test( 'applyMatrix4', ( assert ) => {
 
 
 
 
@@ -638,6 +646,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'setFromSphericalCoords', ( assert ) => {
+
+			// setFromSphericalCoords( radius, phi, theta )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'setFromCylindrical', ( assert ) => {
 		QUnit.test( 'setFromCylindrical', ( assert ) => {
 
 
 			var a = new Vector3();
 			var a = new Vector3();
@@ -651,6 +666,13 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'setFromCylindricalCoords', ( assert ) => {
+
+			// setFromCylindricalCoords( radius, theta, y )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'setFromMatrixPosition', ( assert ) => {
 		QUnit.test( 'setFromMatrixPosition', ( assert ) => {
 
 
 			var a = new Vector3();
 			var a = new Vector3();
@@ -693,6 +715,20 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'setFromMatrix3Column', ( assert ) => {
+
+			// setFromMatrix3Column( mat3, index )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'setFromEuler', ( assert ) => {
+
+			// setFromEuler( e )
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
 		QUnit.test( 'equals', ( assert ) => {
 		QUnit.test( 'equals', ( assert ) => {
 
 
 			var a = new Vector3( x, 0, z );
 			var a = new Vector3( x, 0, z );
@@ -773,6 +809,30 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		QUnit.todo( 'random', ( assert ) => {
+
+			// random()
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.test( 'randomDirection', ( assert ) => {
+
+			var vec = new Vector3();
+
+			vec.randomDirection();
+
+			var zero = new Vector3();
+			assert.notDeepEqual(
+				vec,
+				zero,
+				'randomizes at least one component of the vector'
+			);
+
+			assert.ok( ( 1 - vec.length() ) <= Number.EPSILON, 'produces a unit vector' );
+
+		} );
+
 		// TODO (Itee) refactor/split
 		// TODO (Itee) refactor/split
 		QUnit.test( 'setX,setY,setZ', ( assert ) => {
 		QUnit.test( 'setX,setY,setZ', ( assert ) => {
 
 
@@ -790,6 +850,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.z == z, 'Passed!' );
 			assert.ok( a.z == z, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'setComponent,getComponent', ( assert ) => {
 		QUnit.test( 'setComponent,getComponent', ( assert ) => {
 
 
 			var a = new Vector3();
 			var a = new Vector3();
@@ -805,6 +866,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.getComponent( 2 ) == 3, 'Passed!' );
 			assert.ok( a.getComponent( 2 ) == 3, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'setComponent/getComponent exceptions', ( assert ) => {
 		QUnit.test( 'setComponent/getComponent exceptions', ( assert ) => {
 
 
 			var a = new Vector3();
 			var a = new Vector3();
@@ -829,6 +891,7 @@ export default QUnit.module( 'Maths', () => {
 			);
 			);
 
 
 		} );
 		} );
+
 		QUnit.test( 'min/max/clamp', ( assert ) => {
 		QUnit.test( 'min/max/clamp', ( assert ) => {
 
 
 			var a = new Vector3( x, y, z );
 			var a = new Vector3( x, y, z );
@@ -852,6 +915,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( c.z == - z, 'Passed!' );
 			assert.ok( c.z == - z, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'distanceTo/distanceToSquared', ( assert ) => {
 		QUnit.test( 'distanceTo/distanceToSquared', ( assert ) => {
 
 
 			var a = new Vector3( x, 0, 0 );
 			var a = new Vector3( x, 0, 0 );
@@ -869,6 +933,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( c.distanceToSquared( d ) == z * z, 'Passed!' );
 			assert.ok( c.distanceToSquared( d ) == z * z, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'setScalar/addScalar/subScalar', ( assert ) => {
 		QUnit.test( 'setScalar/addScalar/subScalar', ( assert ) => {
 
 
 			var a = new Vector3();
 			var a = new Vector3();
@@ -890,6 +955,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.strictEqual( a.z, 0, 'subScalar: check z' );
 			assert.strictEqual( a.z, 0, 'subScalar: check z' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'multiply/divide', ( assert ) => {
 		QUnit.test( 'multiply/divide', ( assert ) => {
 
 
 			var a = new Vector3( x, y, z );
 			var a = new Vector3( x, y, z );
@@ -907,6 +973,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( Math.abs( b.z - 0.5 ) <= eps, 'divide: check z' );
 			assert.ok( Math.abs( b.z - 0.5 ) <= eps, 'divide: check z' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'multiply/divide', ( assert ) => {
 		QUnit.test( 'multiply/divide', ( assert ) => {
 
 
 			var a = new Vector3( x, y, z );
 			var a = new Vector3( x, y, z );
@@ -933,6 +1000,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( b.z == - z, 'Passed!' );
 			assert.ok( b.z == - z, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'project/unproject', ( assert ) => {
 		QUnit.test( 'project/unproject', ( assert ) => {
 
 
 			var a = new Vector3( x, y, z );
 			var a = new Vector3( x, y, z );
@@ -950,6 +1018,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( Math.abs( a.z - z ) <= eps, 'unproject: check z' );
 			assert.ok( Math.abs( a.z - z ) <= eps, 'unproject: check z' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'length/lengthSq', ( assert ) => {
 		QUnit.test( 'length/lengthSq', ( assert ) => {
 
 
 			var a = new Vector3( x, 0, 0 );
 			var a = new Vector3( x, 0, 0 );
@@ -971,6 +1040,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.lengthSq() == ( x * x + y * y + z * z ), 'Passed!' );
 			assert.ok( a.lengthSq() == ( x * x + y * y + z * z ), 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'lerp/clone', ( assert ) => {
 		QUnit.test( 'lerp/clone', ( assert ) => {
 
 
 			var a = new Vector3( x, 0, z );
 			var a = new Vector3( x, 0, z );
@@ -989,23 +1059,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		QUnit.test( 'randomDirection', ( assert ) => {
-
-			var vec = new Vector3();
-
-			vec.randomDirection();
-
-			var zero = new Vector3();
-			assert.notDeepEqual(
-				vec,
-				zero,
-				'randomizes at least one component of the vector'
-			);
-
-			assert.ok( ( 1 - vec.length() ) <= Number.EPSILON, 'produces a unit vector' );
-
-		} );
-
+		// OTHERS
 		QUnit.test( 'iterable', ( assert ) => {
 		QUnit.test( 'iterable', ( assert ) => {
 
 
 			var v = new Vector3( 0, 0.5, 1 );
 			var v = new Vector3( 0, 0.5, 1 );

+ 61 - 31
test/unit/src/math/Vector4.tests.js

@@ -9,7 +9,7 @@ import {
 	z,
 	z,
 	w,
 	w,
 	eps
 	eps
-} from './Constants.tests.js';
+} from '../../utils/math-constants.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -33,9 +33,10 @@ export default QUnit.module( 'Maths', () => {
 		} );
 		} );
 
 
 		// PUBLIC STUFF
 		// PUBLIC STUFF
-		QUnit.todo( 'isVector4', ( assert ) => {
+		QUnit.test( 'isVector4', ( assert ) => {
 
 
-			assert.ok( false, 'everything\'s gonna be alright' );
+			const object = new Vector4();
+			assert.ok( object.isVector4, 'Vector4.isVector4 should be true' );
 
 
 		} );
 		} );
 
 
@@ -61,27 +62,43 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		QUnit.todo( 'setX', ( assert ) => {
+		QUnit.test( 'setX', ( assert ) => {
 
 
-			assert.ok( false, 'everything\'s gonna be alright' );
+			var a = new Vector4();
+			assert.ok( a.x == 0, 'Passed!' );
+
+			a.setX( x );
+			assert.ok( a.x == x, 'Passed!' );
 
 
 		} );
 		} );
 
 
-		QUnit.todo( 'setY', ( assert ) => {
+		QUnit.test( 'setY', ( assert ) => {
 
 
-			assert.ok( false, 'everything\'s gonna be alright' );
+			var a = new Vector4();
+			assert.ok( a.y == 0, 'Passed!' );
+
+			a.setY( y );
+			assert.ok( a.y == y, 'Passed!' );
 
 
 		} );
 		} );
 
 
-		QUnit.todo( 'setZ', ( assert ) => {
+		QUnit.test( 'setZ', ( assert ) => {
 
 
-			assert.ok( false, 'everything\'s gonna be alright' );
+			var a = new Vector4();
+			assert.ok( a.z == 0, 'Passed!' );
+
+			a.setZ( z );
+			assert.ok( a.z == z, 'Passed!' );
 
 
 		} );
 		} );
 
 
-		QUnit.todo( 'setW', ( assert ) => {
+		QUnit.test( 'setW', ( assert ) => {
 
 
-			assert.ok( false, 'everything\'s gonna be alright' );
+			var a = new Vector4();
+			assert.ok( a.w == 1, 'Passed!' );
+
+			a.setW( w );
+			assert.ok( a.w == w, 'Passed!' );
 
 
 		} );
 		} );
 
 
@@ -126,8 +143,8 @@ export default QUnit.module( 'Maths', () => {
 
 
 		QUnit.test( 'add', ( assert ) => {
 		QUnit.test( 'add', ( assert ) => {
 
 
-			var a = new Vector4( x, y, z, w );
-			var b = new Vector4( - x, - y, - z, - w );
+			const a = new Vector4( x, y, z, w );
+			const b = new Vector4( - x, - y, - z, - w );
 
 
 			a.add( b );
 			a.add( b );
 			assert.ok( a.x == 0, 'Passed!' );
 			assert.ok( a.x == 0, 'Passed!' );
@@ -135,12 +152,6 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.z == 0, 'Passed!' );
 			assert.ok( a.z == 0, 'Passed!' );
 			assert.ok( a.w == 0, 'Passed!' );
 			assert.ok( a.w == 0, 'Passed!' );
 
 
-			var c = new Vector4().addVectors( b, b );
-			assert.ok( c.x == - 2 * x, 'Passed!' );
-			assert.ok( c.y == - 2 * y, 'Passed!' );
-			assert.ok( c.z == - 2 * z, 'Passed!' );
-			assert.ok( c.w == - 2 * w, 'Passed!' );
-
 		} );
 		} );
 
 
 		QUnit.todo( 'addScalar', ( assert ) => {
 		QUnit.todo( 'addScalar', ( assert ) => {
@@ -149,9 +160,15 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		QUnit.todo( 'addVectors', ( assert ) => {
+		QUnit.test( 'addVectors', ( assert ) => {
 
 
-			assert.ok( false, 'everything\'s gonna be alright' );
+			const b = new Vector4( - x, - y, - z, - w );
+			const c = new Vector4().addVectors( b, b );
+
+			assert.ok( c.x == - 2 * x, 'Passed!' );
+			assert.ok( c.y == - 2 * y, 'Passed!' );
+			assert.ok( c.z == - 2 * z, 'Passed!' );
+			assert.ok( c.w == - 2 * w, 'Passed!' );
 
 
 		} );
 		} );
 
 
@@ -171,8 +188,8 @@ export default QUnit.module( 'Maths', () => {
 
 
 		QUnit.test( 'sub', ( assert ) => {
 		QUnit.test( 'sub', ( assert ) => {
 
 
-			var a = new Vector4( x, y, z, w );
-			var b = new Vector4( - x, - y, - z, - w );
+			const a = new Vector4( x, y, z, w );
+			const b = new Vector4( - x, - y, - z, - w );
 
 
 			a.sub( b );
 			a.sub( b );
 			assert.ok( a.x == 2 * x, 'Passed!' );
 			assert.ok( a.x == 2 * x, 'Passed!' );
@@ -180,12 +197,6 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.z == 2 * z, 'Passed!' );
 			assert.ok( a.z == 2 * z, 'Passed!' );
 			assert.ok( a.w == 2 * w, 'Passed!' );
 			assert.ok( a.w == 2 * w, 'Passed!' );
 
 
-			var c = new Vector4().subVectors( a, a );
-			assert.ok( c.x == 0, 'Passed!' );
-			assert.ok( c.y == 0, 'Passed!' );
-			assert.ok( c.z == 0, 'Passed!' );
-			assert.ok( c.w == 0, 'Passed!' );
-
 		} );
 		} );
 
 
 		QUnit.todo( 'subScalar', ( assert ) => {
 		QUnit.todo( 'subScalar', ( assert ) => {
@@ -194,7 +205,18 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
-		QUnit.todo( 'subVectors', ( assert ) => {
+		QUnit.test( 'subVectors', ( assert ) => {
+
+			const a = new Vector4( x, y, z, w );
+			const c = new Vector4().subVectors( a, a );
+			assert.ok( c.x == 0, 'Passed!' );
+			assert.ok( c.y == 0, 'Passed!' );
+			assert.ok( c.z == 0, 'Passed!' );
+			assert.ok( c.w == 0, 'Passed!' );
+
+		} );
+
+		QUnit.todo( 'multiply', ( assert ) => {
 
 
 			assert.ok( false, 'everything\'s gonna be alright' );
 			assert.ok( false, 'everything\'s gonna be alright' );
 
 
@@ -552,6 +574,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.w == w, 'Passed!' );
 			assert.ok( a.w == w, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'setComponent,getComponent', ( assert ) => {
 		QUnit.test( 'setComponent,getComponent', ( assert ) => {
 
 
 			var a = new Vector4();
 			var a = new Vector4();
@@ -570,6 +593,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.getComponent( 3 ) == 4, 'Passed!' );
 			assert.ok( a.getComponent( 3 ) == 4, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'setComponent/getComponent exceptions', ( assert ) => {
 		QUnit.test( 'setComponent/getComponent exceptions', ( assert ) => {
 
 
 			var a = new Vector4();
 			var a = new Vector4();
@@ -594,6 +618,7 @@ export default QUnit.module( 'Maths', () => {
 			);
 			);
 
 
 		} );
 		} );
+
 		QUnit.test( 'setScalar/addScalar/subScalar', ( assert ) => {
 		QUnit.test( 'setScalar/addScalar/subScalar', ( assert ) => {
 
 
 			var a = new Vector4();
 			var a = new Vector4();
@@ -618,7 +643,8 @@ export default QUnit.module( 'Maths', () => {
 			assert.strictEqual( a.w, 0, 'subScalar: check w' );
 			assert.strictEqual( a.w, 0, 'subScalar: check w' );
 
 
 		} );
 		} );
-		QUnit.test( 'multiply/divide', ( assert ) => {
+
+		QUnit.test( 'multiplyScalar/divideScalar', ( assert ) => {
 
 
 			var a = new Vector4( x, y, z, w );
 			var a = new Vector4( x, y, z, w );
 			var b = new Vector4( - x, - y, - z, - w );
 			var b = new Vector4( - x, - y, - z, - w );
@@ -648,6 +674,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( b.w == - w, 'Passed!' );
 			assert.ok( b.w == - w, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'min/max/clamp', ( assert ) => {
 		QUnit.test( 'min/max/clamp', ( assert ) => {
 
 
 			var a = new Vector4( x, y, z, w );
 			var a = new Vector4( x, y, z, w );
@@ -674,6 +701,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( c.w == w, 'Passed!' );
 			assert.ok( c.w == w, 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'length/lengthSq', ( assert ) => {
 		QUnit.test( 'length/lengthSq', ( assert ) => {
 
 
 			var a = new Vector4( x, 0, 0, 0 );
 			var a = new Vector4( x, 0, 0, 0 );
@@ -698,6 +726,7 @@ export default QUnit.module( 'Maths', () => {
 			assert.ok( a.lengthSq() == ( x * x + y * y + z * z + w * w ), 'Passed!' );
 			assert.ok( a.lengthSq() == ( x * x + y * y + z * z + w * w ), 'Passed!' );
 
 
 		} );
 		} );
+
 		QUnit.test( 'lerp/clone', ( assert ) => {
 		QUnit.test( 'lerp/clone', ( assert ) => {
 
 
 			var a = new Vector4( x, 0, z, 0 );
 			var a = new Vector4( x, 0, z, 0 );
@@ -717,6 +746,7 @@ export default QUnit.module( 'Maths', () => {
 
 
 		} );
 		} );
 
 
+		// OTHERS
 		QUnit.test( 'iterable', ( assert ) => {
 		QUnit.test( 'iterable', ( assert ) => {
 
 
 			var v = new Vector4( 0, 0.3, 0.7, 1 );
 			var v = new Vector4( 0, 0.3, 0.7, 1 );

+ 26 - 3
test/unit/src/math/interpolants/CubicInterpolant.tests.js

@@ -1,6 +1,8 @@
 /* global QUnit */
 /* global QUnit */
 
 
-// import { CubicInterpolant } from '../../../../../src/math/interpolants/CubicInterpolant.js';
+import { CubicInterpolant } from '../../../../../src/math/interpolants/CubicInterpolant.js';
+
+import { Interpolant } from '../../../../../src/math/Interpolant.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -9,9 +11,14 @@ export default QUnit.module( 'Maths', () => {
 		QUnit.module( 'CubicInterpolant', () => {
 		QUnit.module( 'CubicInterpolant', () => {
 
 
 			// INHERITANCE
 			// INHERITANCE
-			QUnit.todo( 'Extending', ( assert ) => {
+			QUnit.test( 'Extending', ( assert ) => {
 
 
-				assert.ok( false, 'everything\'s gonna be alright' );
+				var object = new CubicInterpolant( null, [ 1, 11, 2, 22, 3, 33 ], 2, [] );
+
+				assert.strictEqual(
+					object instanceof Interpolant, true,
+					'CubicInterpolant extends from Interpolant'
+				);
 
 
 			} );
 			} );
 
 
@@ -22,6 +29,22 @@ export default QUnit.module( 'Maths', () => {
 
 
 			} );
 			} );
 
 
+			// PRIVATE - TEMPLATE METHODS
+			QUnit.todo( 'intervalChanged_', ( assert ) => {
+
+				// intervalChanged_( i1, t0, t1 )
+				assert.ok( false, 'everything\'s gonna be alright' );
+
+			} );
+
+			QUnit.todo( 'interpolate_', ( assert ) => {
+
+				// interpolate_( i1, t0, t, t1 )
+				// return equal to base class Interpolant.resultBuffer after call
+				assert.ok( false, 'everything\'s gonna be alright' );
+
+			} );
+
 		} );
 		} );
 
 
 	} );
 	} );

+ 19 - 3
test/unit/src/math/interpolants/DiscreteInterpolant.tests.js

@@ -1,6 +1,8 @@
 /* global QUnit */
 /* global QUnit */
 
 
-// import { DiscreteInterpolant } from '../../../../../src/math/interpolants/DiscreteInterpolant.js';
+import { DiscreteInterpolant } from '../../../../../src/math/interpolants/DiscreteInterpolant.js';
+
+import { Interpolant } from '../../../../../src/math/Interpolant.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -9,9 +11,14 @@ export default QUnit.module( 'Maths', () => {
 		QUnit.module( 'DiscreteInterpolant', () => {
 		QUnit.module( 'DiscreteInterpolant', () => {
 
 
 			// INHERITANCE
 			// INHERITANCE
-			QUnit.todo( 'Extending', ( assert ) => {
+			QUnit.test( 'Extending', ( assert ) => {
 
 
-				assert.ok( false, 'everything\'s gonna be alright' );
+				var object = new DiscreteInterpolant( null, [ 1, 11, 2, 22, 3, 33 ], 2, [] );
+
+				assert.strictEqual(
+					object instanceof Interpolant, true,
+					'DiscreteInterpolant extends from Interpolant'
+				);
 
 
 			} );
 			} );
 
 
@@ -22,6 +29,15 @@ export default QUnit.module( 'Maths', () => {
 
 
 			} );
 			} );
 
 
+			// PRIVATE - TEMPLATE METHODS
+			QUnit.todo( 'interpolate_', ( assert ) => {
+
+				// interpolate_( i1 /*, t0, t, t1 */ )
+				// return equal to base class Interpolant.resultBuffer after call
+				assert.ok( false, 'everything\'s gonna be alright' );
+
+			} );
+
 		} );
 		} );
 
 
 	} );
 	} );

+ 19 - 3
test/unit/src/math/interpolants/LinearInterpolant.tests.js

@@ -1,6 +1,8 @@
 /* global QUnit */
 /* global QUnit */
 
 
-// import { LinearInterpolant } from '../../../../../src/math/interpolants/LinearInterpolant.js';
+import { LinearInterpolant } from '../../../../../src/math/interpolants/LinearInterpolant.js';
+
+import { Interpolant } from '../../../../../src/math/Interpolant.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -9,9 +11,14 @@ export default QUnit.module( 'Maths', () => {
 		QUnit.module( 'LinearInterpolant', () => {
 		QUnit.module( 'LinearInterpolant', () => {
 
 
 			// INHERITANCE
 			// INHERITANCE
-			QUnit.todo( 'Extending', ( assert ) => {
+			QUnit.test( 'Extending', ( assert ) => {
 
 
-				assert.ok( false, 'everything\'s gonna be alright' );
+				var object = new LinearInterpolant( null, [ 1, 11, 2, 22, 3, 33 ], 2, [] );
+
+				assert.strictEqual(
+					object instanceof Interpolant, true,
+					'LinearInterpolant extends from Interpolant'
+				);
 
 
 			} );
 			} );
 
 
@@ -22,6 +29,15 @@ export default QUnit.module( 'Maths', () => {
 
 
 			} );
 			} );
 
 
+			// PRIVATE - TEMPLATE METHODS
+			QUnit.todo( 'interpolate_', ( assert ) => {
+
+				// interpolate_( i1, t0, t, t1 )
+				// return equal to base class Interpolant.resultBuffer after call
+				assert.ok( false, 'everything\'s gonna be alright' );
+
+			} );
+
 		} );
 		} );
 
 
 	} );
 	} );

+ 19 - 3
test/unit/src/math/interpolants/QuaternionLinearInterpolant.tests.js

@@ -1,6 +1,8 @@
 /* global QUnit */
 /* global QUnit */
 
 
-// import { QuaternionLinearInterpolant } from '../../../../../src/math/interpolants/QuaternionLinearInterpolant.js';
+import { QuaternionLinearInterpolant } from '../../../../../src/math/interpolants/QuaternionLinearInterpolant.js';
+
+import { Interpolant } from '../../../../../src/math/Interpolant.js';
 
 
 export default QUnit.module( 'Maths', () => {
 export default QUnit.module( 'Maths', () => {
 
 
@@ -9,9 +11,14 @@ export default QUnit.module( 'Maths', () => {
 		QUnit.module( 'QuaternionLinearInterpolant', () => {
 		QUnit.module( 'QuaternionLinearInterpolant', () => {
 
 
 			// INHERITANCE
 			// INHERITANCE
-			QUnit.todo( 'Extending', ( assert ) => {
+			QUnit.test( 'Extending', ( assert ) => {
 
 
-				assert.ok( false, 'everything\'s gonna be alright' );
+				var object = new QuaternionLinearInterpolant( null, [ 1, 11, 2, 22, 3, 33 ], 2, [] );
+
+				assert.strictEqual(
+					object instanceof Interpolant, true,
+					'QuaternionLinearInterpolant extends from Interpolant'
+				);
 
 
 			} );
 			} );
 
 
@@ -22,6 +29,15 @@ export default QUnit.module( 'Maths', () => {
 
 
 			} );
 			} );
 
 
+			// PRIVATE - TEMPLATE METHODS
+			QUnit.todo( 'interpolate_', ( assert ) => {
+
+				// interpolate_( i1, t0, t, t1 )
+				// return equal to base class Interpolant.resultBuffer after call
+				assert.ok( false, 'everything\'s gonna be alright' );
+
+			} );
+
 		} );
 		} );
 
 
 	} );
 	} );

+ 2 - 0
test/unit/three.source.unit.js

@@ -177,6 +177,7 @@ import './src/materials/SpriteMaterial.tests.js';
 import './src/math/Box2.tests.js';
 import './src/math/Box2.tests.js';
 import './src/math/Box3.tests.js';
 import './src/math/Box3.tests.js';
 import './src/math/Color.tests.js';
 import './src/math/Color.tests.js';
+import './src/math/ColorManagement.tests.js';
 import './src/math/Cylindrical.tests.js';
 import './src/math/Cylindrical.tests.js';
 import './src/math/Euler.tests.js';
 import './src/math/Euler.tests.js';
 import './src/math/Frustum.tests.js';
 import './src/math/Frustum.tests.js';
@@ -190,6 +191,7 @@ import './src/math/Quaternion.tests.js';
 import './src/math/Ray.tests.js';
 import './src/math/Ray.tests.js';
 import './src/math/Sphere.tests.js';
 import './src/math/Sphere.tests.js';
 import './src/math/Spherical.tests.js';
 import './src/math/Spherical.tests.js';
+import './src/math/SphericalHarmonics3.tests.js';
 import './src/math/Triangle.tests.js';
 import './src/math/Triangle.tests.js';
 import './src/math/Vector2.tests.js';
 import './src/math/Vector2.tests.js';
 import './src/math/Vector3.tests.js';
 import './src/math/Vector3.tests.js';

+ 2 - 2
test/unit/src/math/Constants.tests.js → test/unit/utils/math-constants.js

@@ -1,5 +1,5 @@
-import { Vector2 } from '../../../../src/math/Vector2.js';
-import { Vector3 } from '../../../../src/math/Vector3.js';
+import { Vector2 } from '../../../src/math/Vector2.js';
+import { Vector3 } from '../../../src/math/Vector3.js';
 
 
 export const x = 2;
 export const x = 2;
 export const y = 3;
 export const y = 3;