From 2e89cf6d3b62b1c8e742aa1772f2e33b6faab388 Mon Sep 17 00:00:00 2001 From: Ben Houston Date: Sun, 2 Dec 2012 19:39:08 -0500 Subject: [PATCH] pull out test suite constants into their own script. --- test/core/Box2.js | 11 ----------- test/core/Box3.js | 11 ----------- test/core/Constants.js | 15 +++++++++++++++ test/core/Plane.js | 9 --------- test/core/Sphere.js | 10 +--------- test/core/Vector2.js | 5 ----- test/core/Vector3.js | 5 ----- test/core/Vector4.js | 5 ----- test/testsuite.html | 1 + 9 files changed, 17 insertions(+), 55 deletions(-) create mode 100644 test/core/Constants.js diff --git a/test/core/Box2.js b/test/core/Box2.js index bb04e63594..019c32c9a0 100644 --- a/test/core/Box2.js +++ b/test/core/Box2.js @@ -2,17 +2,6 @@ * @author bhouston / http://exocortex.com */ -var x = 2; -var y = 3; -var z = 4; -var w = 5; - -var negInf = new THREE.Vector3( -Infinity, -Infinity ); -var posInf = new THREE.Vector3( Infinity, Infinity ); - -var zero = new THREE.Vector3(); -var one = new THREE.Vector3( 1, 1, 1 ); - module( "Box2" ); test( "constructor", function() { diff --git a/test/core/Box3.js b/test/core/Box3.js index bfe342e604..d0fa0ebeab 100644 --- a/test/core/Box3.js +++ b/test/core/Box3.js @@ -2,17 +2,6 @@ * @author bhouston / http://exocortex.com */ -var x = 2; -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 ); - module( "Box3" ); test( "constructor", function() { diff --git a/test/core/Constants.js b/test/core/Constants.js new file mode 100644 index 0000000000..273c535e6d --- /dev/null +++ b/test/core/Constants.js @@ -0,0 +1,15 @@ +/** + * @author bhouston / http://exocortex.com + */ + +var x = 2; +var y = 3; +var z = 4; +var w = 5; + +var negInf = new THREE.Vector3( -Infinity, -Infinity ); +var posInf = new THREE.Vector3( Infinity, Infinity ); + +var zero = new THREE.Vector3(); +var one = new THREE.Vector3( 1, 1, 1 ); +var two = new THREE.Vector3( 1, 1, 1 ); diff --git a/test/core/Plane.js b/test/core/Plane.js index e3d951a3b7..53efb7cb43 100644 --- a/test/core/Plane.js +++ b/test/core/Plane.js @@ -2,15 +2,6 @@ * @author bhouston / http://exocortex.com */ -x = 2; -y = 3; -z = 4; -w = 5; - -zero = new THREE.Vector3(); -one = new THREE.Vector3( 1, 1, 1 ); -two = new THREE.Vector3( 1, 1, 1 ); - module( "Plane" ); test( "constructor", function() { diff --git a/test/core/Sphere.js b/test/core/Sphere.js index 728204cb6a..374e95f6f2 100644 --- a/test/core/Sphere.js +++ b/test/core/Sphere.js @@ -2,14 +2,6 @@ * @author bhouston / http://exocortex.com */ -var x = 2; -var y = 3; -var z = 4; -var w = 5; - -var zero = new THREE.Vector3(); -var one = new THREE.Vector3( 1, 1, 1 ); - module( "Sphere" ); test( "constructor", function() { @@ -37,7 +29,7 @@ test( "copy", function() { }); test( "set", function() { - var a = new THREE.Vector3(); + var a = new THREE.Sphere(); ok( a.center.equals( zero ), "Passed!" ); ok( a.radius == 0, "Passed!" ); diff --git a/test/core/Vector2.js b/test/core/Vector2.js index 576360cacf..52fc66a425 100644 --- a/test/core/Vector2.js +++ b/test/core/Vector2.js @@ -2,11 +2,6 @@ * @author bhouston / http://exocortex.com */ -var x = 2; -var y = 3; -var z = 4; -var w = 5; - module( "Vector2" ); test( "constructor", function() { diff --git a/test/core/Vector3.js b/test/core/Vector3.js index 5c43398466..29fecf7a04 100644 --- a/test/core/Vector3.js +++ b/test/core/Vector3.js @@ -2,11 +2,6 @@ * @author bhouston / http://exocortex.com */ -var x = 2; -var y = 3; -var z = 4; -var w = 5; - module( "Vector3" ); test( "constructor", function() { diff --git a/test/core/Vector4.js b/test/core/Vector4.js index a89b16ec83..2c0a6668d4 100644 --- a/test/core/Vector4.js +++ b/test/core/Vector4.js @@ -2,11 +2,6 @@ * @author bhouston / http://exocortex.com */ -var x = 2; -var y = 3; -var z = 4; -var w = 5; - module( "Vector4" ); test( "constructor", function() { diff --git a/test/testsuite.html b/test/testsuite.html index d818da5d22..fe11b6c1df 100644 --- a/test/testsuite.html +++ b/test/testsuite.html @@ -9,6 +9,7 @@
+ -- GitLab