File tree Expand file tree Collapse file tree
src/test/java/vanilla/java/affinity/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ public void getAffinityReturnsValidValue() throws Exception {
2929 );
3030 final int cores = Runtime .getRuntime ().availableProcessors ();
3131 assertTrue (
32- "Affinity mask " + affinity + " must be <=(2^cores-1)" ,
33- affinity <= ( 1 >> cores )
32+ "Affinity mask " + affinity + " must be <=(2^" + cores + " -1)" ,
33+ affinity <= ( 1 << cores - 1 )
3434 );
3535 }
3636
@@ -44,7 +44,7 @@ public void getAffinityReturnsValuePreviouslySet() throws Exception {
4444 final IAffinityImpl impl = getImpl ();
4545 final int cores = Runtime .getRuntime ().availableProcessors ();
4646 for ( int core = 0 ; core < cores ; core ++ ) {
47- final long mask = ( 1 >> core );
47+ final long mask = ( 1 << core );
4848 getAffinityReturnsValuePreviouslySet ( impl , mask );
4949 }
5050 }
You can’t perform that action at this time.
0 commit comments