< prev index next >

test/compiler/c2/Test6959129.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 6959129
  28  * @summary COMPARISON WITH INTEGER.MAX_INT DOES NOT WORK CORRECTLY IN THE CLIENT VM.
  29  *
  30  * @run main/othervm -ea Test6959129
  31  */
  32 


  33 public class Test6959129 {
  34 
  35   public static void main(String[] args) {
  36     long start  = System.currentTimeMillis();
  37     int min = Integer.MAX_VALUE-30000;
  38     int max = Integer.MAX_VALUE;
  39     long maxmoves = 0;
  40     try {
  41       maxmoves = maxMoves(min, max);
  42     } catch (AssertionError e) {
  43       System.out.println("Passed");
  44       System.exit(95);
  45     }
  46     System.out.println("maxMove:" + maxmoves);
  47     System.out.println("FAILED");
  48     System.exit(97);
  49   }
  50   /**
  51    * Imperative implementation that returns the length hailstone moves
  52    * for a given number.



  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 6959129
  28  * @summary COMPARISON WITH INTEGER.MAX_INT DOES NOT WORK CORRECTLY IN THE CLIENT VM.
  29  *
  30  * @run main/othervm -ea compiler.c2.Test6959129
  31  */
  32 
  33 package compiler.c2;
  34 
  35 public class Test6959129 {
  36 
  37   public static void main(String[] args) {
  38     long start  = System.currentTimeMillis();
  39     int min = Integer.MAX_VALUE-30000;
  40     int max = Integer.MAX_VALUE;
  41     long maxmoves = 0;
  42     try {
  43       maxmoves = maxMoves(min, max);
  44     } catch (AssertionError e) {
  45       System.out.println("Passed");
  46       System.exit(95);
  47     }
  48     System.out.println("maxMove:" + maxmoves);
  49     System.out.println("FAILED");
  50     System.exit(97);
  51   }
  52   /**
  53    * Imperative implementation that returns the length hailstone moves
  54    * for a given number.


< prev index next >