Преглед изворни кода

Merge pull request #16881 from Mugen87/dev34

Tests: Clean up
Michael Herzog пре 6 година
родитељ
комит
215bb4aa6a

+ 3 - 2
test/unit/src/core/InstancedBufferAttribute.tests.js

@@ -22,7 +22,7 @@ export default QUnit.module( 'Core', () => {
 			var instance = new InstancedBufferAttribute( new Float32Array( 10 ), 2 );
 			assert.ok( instance.meshPerAttribute === 1, "ok" );
 
-			var instance = new InstancedBufferAttribute( new Float32Array( 10 ), 2, 123 );
+			var instance = new InstancedBufferAttribute( new Float32Array( 10 ), 2, false, 123 );
 			assert.ok( instance.meshPerAttribute === 123, "ok" );
 
 		} );
@@ -31,11 +31,12 @@ export default QUnit.module( 'Core', () => {
 		QUnit.test( "copy", ( assert ) => {
 
 			var array = new Float32Array( [ 1, 2, 3, 7, 8, 9 ] );
-			var instance = new InstancedBufferAttribute( array, 2, 123 );
+			var instance = new InstancedBufferAttribute( array, 2, true, 123 );
 			var copiedInstance = instance.copy( instance );
 
 			assert.ok( copiedInstance instanceof InstancedBufferAttribute, "the clone has the correct type" );
 			assert.ok( copiedInstance.itemSize === 2, "itemSize was copied" );
+			assert.ok( copiedInstance.normalized === true, "normalized was copied" );
 			assert.ok( copiedInstance.meshPerAttribute === 123, "meshPerAttribute was copied" );
 
 			for ( var i = 0; i < array.length; i ++ ) {

+ 1 - 10
test/unit/src/geometries/TextGeometry.tests.js

@@ -9,16 +9,7 @@ import {
 
 export default QUnit.module( 'Geometries', () => {
 
-	QUnit.module( 'TextBufferGeometry', ( hooks ) => {
-
-		var geometries = undefined;
-		hooks.beforeEach( function () {
-
-			geometries = [
-				new TextBufferGeometry()
-			];
-
-		} );
+	QUnit.module( 'TextBufferGeometry', () => {
 
 		// INHERITANCE
 		QUnit.todo( "Extending", ( assert ) => {

+ 4 - 12
test/unit/src/math/Line3.tests.js

@@ -81,27 +81,19 @@ export default QUnit.module( 'Maths', () => {
 
 		QUnit.test( "getCenter", ( assert ) => {
 
+			var center = new Vector3();
 
 			var a = new Line3( zero3.clone(), two3.clone() );
-			assert.ok( a.getCenter().equals( one3.clone() ), "Passed" );
-
-
-			var a = new Line3( zero3.clone(), two3.clone() );
-			var b = new Vector3();
-			assert.ok( a.getCenter( b ).equals( one3.clone() ), "Passed" );
-
+			assert.ok( a.getCenter( center ).equals( one3.clone() ), "Passed" );
 
 		} );
 
 		QUnit.test( "delta", ( assert ) => {
 
+			var delta = new Vector3();
 
 			var a = new Line3( zero3.clone(), two3.clone() );
-			assert.ok( a.delta().equals( two3.clone() ), "Passed" );
-			var a = new Line3( one3.clone(), two3.clone() );
-			var b = new Vector3();
-			assert.ok( a.delta( b ).equals( one3.clone() ), "Passed" );
-
+			assert.ok( a.delta( delta ).equals( two3.clone() ), "Passed" );
 
 		} );