< prev index next >

test/compiler/codegen/TestCharVect2.java

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


  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  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 8001183
  28  * @summary incorrect results of char vectors right shift operaiton
  29  *
  30  * @run main/othervm/timeout=400 -Xbatch -Xmx64m TestCharVect
  31  */
  32 
  33 public class TestCharVect {


  34   private static final int ARRLEN = 997;
  35   private static final int ITERS  = 11000;
  36   private static final int ADD_INIT = Character.MAX_VALUE-500;
  37   private static final int BIT_MASK = 0xB731;
  38   private static final int VALUE = 7;
  39   private static final int SHIFT = 16;
  40 
  41   public static void main(String args[]) {
  42     System.out.println("Testing Char vectors");
  43     int errn = test();
  44     if (errn > 0) {
  45       System.err.println("FAILED: " + errn + " errors");
  46       System.exit(97);
  47     }
  48     System.out.println("PASSED");
  49   }
  50 
  51   static int test() {
  52     char[] a0 = new char[ARRLEN];
  53     char[] a1 = new char[ARRLEN];




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  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 8001183
  28  * @summary incorrect results of char vectors right shift operaiton
  29  *
  30  * @run main/othervm/timeout=400 -Xbatch -Xmx64m compiler.codegen.TestCharVect2
  31  */
  32 
  33 package compiler.codegen;
  34 
  35 public class TestCharVect2 {
  36   private static final int ARRLEN = 997;
  37   private static final int ITERS  = 11000;
  38   private static final int ADD_INIT = Character.MAX_VALUE-500;
  39   private static final int BIT_MASK = 0xB731;
  40   private static final int VALUE = 7;
  41   private static final int SHIFT = 16;
  42 
  43   public static void main(String args[]) {
  44     System.out.println("Testing Char vectors");
  45     int errn = test();
  46     if (errn > 0) {
  47       System.err.println("FAILED: " + errn + " errors");
  48       System.exit(97);
  49     }
  50     System.out.println("PASSED");
  51   }
  52 
  53   static int test() {
  54     char[] a0 = new char[ARRLEN];
  55     char[] a1 = new char[ARRLEN];


< prev index next >