浏览代码

Fixed tests.

Mr.doob 9 年之前
父节点
当前提交
741724fb63
共有 3 个文件被更改,包括 8 次插入14 次删除
  1. 0 6
      test/unit/core/BufferGeometry.js
  2. 4 4
      test/unit/math/Box2.js
  3. 4 4
      test/unit/math/Box3.js

+ 0 - 6
test/unit/core/BufferGeometry.js

@@ -174,12 +174,6 @@ test( "computeBoundingBox", function() {
 	ok( bb.max.x === 13 && bb.max.y === 5 && bb.max.z === 6, "max values are set correctly" );
 	ok( bb.max.x === 13 && bb.max.y === 5 && bb.max.z === 6, "max values are set correctly" );
 
 
 
 
-	bb = getBBForVertices( [] );
-
-	ok( bb.min.x === 0 && bb.min.y === 0 && bb.min.z === 0, "since there are no values given, the bb has size = 0" );
-	ok( bb.max.x === 0 && bb.max.y === 0 && bb.max.z === 0, "since there are no values given, the bb has size = 0" );
-
-
 	bb = getBBForVertices( [-1, -1, -1] );
 	bb = getBBForVertices( [-1, -1, -1] );
 
 
 	ok( bb.min.x === bb.max.x && bb.min.y === bb.max.y && bb.min.z === bb.max.z, "since there is only one vertex, max and min are equal" );
 	ok( bb.min.x === bb.max.x && bb.min.y === bb.max.y && bb.min.z === bb.max.z, "since there is only one vertex, max and min are equal" );

+ 4 - 4
test/unit/math/Box2.js

@@ -51,19 +51,19 @@ test( "setFromPoints", function() {
 	ok( a.max.equals( one2 ), "Passed!" );
 	ok( a.max.equals( one2 ), "Passed!" );
 
 
 	a.setFromPoints( [] );
 	a.setFromPoints( [] );
-	ok( a.empty(), "Passed!" );
+	ok( a.isEmpty(), "Passed!" );
 });
 });
 
 
 test( "empty/makeEmpty", function() {
 test( "empty/makeEmpty", function() {
 	var a = new THREE.Box2();
 	var a = new THREE.Box2();
 
 
-	ok( a.empty(), "Passed!" );
+	ok( a.isEmpty(), "Passed!" );
 
 
 	var a = new THREE.Box2( zero2.clone(), one2.clone() );
 	var a = new THREE.Box2( zero2.clone(), one2.clone() );
-	ok( ! a.empty(), "Passed!" );
+	ok( ! a.isEmpty(), "Passed!" );
 
 
 	a.makeEmpty();
 	a.makeEmpty();
-	ok( a.empty(), "Passed!" );
+	ok( a.isEmpty(), "Passed!" );
 });
 });
 
 
 test( "center", function() {
 test( "center", function() {

+ 4 - 4
test/unit/math/Box3.js

@@ -51,19 +51,19 @@ test( "setFromPoints", function() {
 	ok( a.max.equals( one3 ), "Passed!" );
 	ok( a.max.equals( one3 ), "Passed!" );
 
 
 	a.setFromPoints( [] );
 	a.setFromPoints( [] );
-	ok( a.empty(), "Passed!" );
+	ok( a.isEmpty(), "Passed!" );
 });
 });
 
 
 test( "empty/makeEmpty", function() {
 test( "empty/makeEmpty", function() {
 	var a = new THREE.Box3();
 	var a = new THREE.Box3();
 
 
-	ok( a.empty(), "Passed!" );
+	ok( a.isEmpty(), "Passed!" );
 
 
 	var a = new THREE.Box3( zero3.clone(), one3.clone() );
 	var a = new THREE.Box3( zero3.clone(), one3.clone() );
-	ok( ! a.empty(), "Passed!" );
+	ok( ! a.isEmpty(), "Passed!" );
 
 
 	a.makeEmpty();
 	a.makeEmpty();
-	ok( a.empty(), "Passed!" );
+	ok( a.isEmpty(), "Passed!" );
 });
 });
 
 
 test( "center", function() {
 test( "center", function() {