-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LDEV-5198 test case for bitOr regression
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}); | ||
} ); | ||
} | ||
|
||
} |