OSDN Git Service

three.jsをThirdPartyに追加
[webglgame/webgl_framework.git] / webglFramework / Thirdparty / three.js-master / test / unit / src / utils.js
1 /**
2  * @author alemures / https://github.com/alemures
3  */
4
5 QUnit.module( 'utils' );
6
7 QUnit.test( 'arrayMax' , function( assert ) {
8
9         assert.equal( THREE.arrayMax( [] ), - Infinity );
10         assert.equal( THREE.arrayMax( [ 5 ] ), 5 );
11         assert.equal( THREE.arrayMax( [ 1, 5, 10 ] ), 10 );
12         assert.equal( THREE.arrayMax( [ 1, 10, 5 ] ), 10 );
13         assert.equal( THREE.arrayMax( [ 10, 5, 1 ] ), 10 );
14
15 });
16
17 QUnit.test( 'arrayMin' , function( assert ) {
18
19         assert.equal( THREE.arrayMin( [] ), Infinity );
20         assert.equal( THREE.arrayMin( [ 5 ] ), 5 );
21         assert.equal( THREE.arrayMin( [ 1, 5, 10 ] ), 1 );
22         assert.equal( THREE.arrayMin( [ 5, 1, 10 ] ), 1 );
23         assert.equal( THREE.arrayMin( [ 10, 5, 1 ] ), 1 );
24
25 });