< prev index next >

test/compiler/codegen/Test7100757.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 /**
  26  * @test
  27  * @bug 7100757
  28  * @summary The BitSet.nextSetBit() produces incorrect result in 32bit VM on Sparc
  29  * @library /testlibrary
  30  * @modules java.base/jdk.internal.misc
  31  *          java.management
  32  * @run main/timeout=300 Test7100757

  33  */
  34 


  35 import jdk.test.lib.Utils;

  36 import java.util.BitSet;
  37 import java.util.Random;
  38 
  39 public class Test7100757 {
  40 
  41   public static final int NBITS = 256;
  42 
  43   public static void main(String[] args) {
  44 
  45     BitSet bs = new BitSet(NBITS);
  46     Random rnd = Utils.getRandomInstance();
  47     long[] ra = new long[(NBITS+63)/64];
  48 
  49     for(int l=0; l < 5000000; l++) {
  50 
  51       for(int r = 0; r < ra.length; r++) {
  52         ra[r] = rnd.nextLong();
  53       }
  54       test(ra, bs);
  55     }




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 /**
  26  * @test
  27  * @bug 7100757
  28  * @summary The BitSet.nextSetBit() produces incorrect result in 32bit VM on Sparc
  29  * @library /testlibrary
  30  * @modules java.base/jdk.internal.misc
  31  *          java.management
  32  *
  33  * @run main/timeout=300 compiler.codegen.Test7100757
  34  */
  35 
  36 package compiler.codegen;
  37 
  38 import jdk.test.lib.Utils;
  39 
  40 import java.util.BitSet;
  41 import java.util.Random;
  42 
  43 public class Test7100757 {
  44 
  45   public static final int NBITS = 256;
  46 
  47   public static void main(String[] args) {
  48 
  49     BitSet bs = new BitSet(NBITS);
  50     Random rnd = Utils.getRandomInstance();
  51     long[] ra = new long[(NBITS+63)/64];
  52 
  53     for(int l=0; l < 5000000; l++) {
  54 
  55       for(int r = 0; r < ra.length; r++) {
  56         ra[r] = rnd.nextLong();
  57       }
  58       test(ra, bs);
  59     }


< prev index next >