Skip to content

Commit

Permalink
LDEV-5198 test case for bitOr regression
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Dec 13, 2024
1 parent 0e5bf37 commit 5e398a9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/tickets/LDEV5198.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
component extends = "org.lucee.cfml.test.LuceeTestCase" skip=true {

function beforeAll(){
variables.preciseMath = getApplicationSettings().preciseMath;
};

function afterAll(){
application action="update" preciseMath=variables.preciseMath;
};

function run( testResults, testBox ){
describe( "LDEV-5198 regression", function(){

it( "bit preciseMath=false", function(){
application action="update" preciseMath=false;
var t= 138;
var num = 9103313;
expect ( bitSHLN( t, 24) ).toBe( 3305111552 );
expect ( bitOr( num, 3305111552) ).toBe( 3314214865 ); // returns 3314214912
});

it( "bit preciseMath=true", function(){
application action="update" preciseMath=true;
var t= 138;
var num = 9103313;
expect ( bitSHLN( t, 24) ).toBe( 3305111552 );
expect ( bitOr( num, 3305111552) ).toBe( 3314214865 ); // returns 3314214912
});
} );
}

}

0 comments on commit 5e398a9

Please sign in to comment.