Skip to content

Commit

Permalink
Tests: Verify all variations of Layer.set(). (#22895)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 authored Nov 28, 2021
1 parent 244c8f1 commit c5f4613
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/unit/src/core/Layers.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ export default QUnit.module( 'Core', () => {

var a = new Layers();

a.set( 0 );
assert.strictEqual( a.mask, 1, 'Set channel 0' );
for ( var i = 0; i < 31; i ++ ) {

a.set( 1 );
assert.strictEqual( a.mask, 2, 'Set channel 1' );
a.set( i );
assert.strictEqual( a.mask, Math.pow( 2, i ), 'Mask has the expected value for channel: ' + i );

a.set( 2 );
assert.strictEqual( a.mask, 4, 'Set channel 2' );
}

} );

Expand Down

0 comments on commit c5f4613

Please sign in to comment.