Browse Source

focus tests.

Ben Houston 12 years ago
parent
commit
de1a1de6b7
1 changed files with 7 additions and 6 deletions
  1. 7 6
      test/core/Box3.js

+ 7 - 6
test/core/Box3.js

@@ -7,6 +7,9 @@ var y = 3;
 var z = 4;
 var w = 5;
 
+var negInf = new THREE.Vector3( -Infinity, -Infinity, -Infinity );
+var posInf = new THREE.Vector3( Infinity, Infinity, Infinity );
+
 var zero = new THREE.Vector3();
 var one = new THREE.Vector3( 1, 1, 1 );
 
@@ -14,10 +17,8 @@ module( "Box3" );
 
 test( "constructor", function() {
 	var a = new THREE.Box3();
-	console.log( a );
-	console.log( a.empty() );
-	ok( a.empty(), "Passed!" );
-	ok( a.volume() < 0, "Passed!" );
+	ok( a.min.equals( posInf ), "Passed!" );
+	ok( a.max.equals( negInf ), "Passed!" );
 
 	a = new THREE.Box3( zero );
 	ok( a.min.equals( zero ), "Passed!" );
@@ -35,14 +36,14 @@ test( "copy", function() {
 	ok( b.max.equals( one ), "Passed!" );
 
 	// ensure that it is a true copy
-	a.makeEmpty();
+	a.min = zero;
+	a.max = one;
 	ok( b.min.equals( zero ), "Passed!" );
 	ok( b.max.equals( one ), "Passed!" );
 });
 
 test( "set", function() {
 	var a = new THREE.Box3();
-	ok( a.empty(), "Passed!" );
 
 	a.set( zero, one )
 	ok( a.min.equals( zero ), "Passed!" );