BC_d2l02.java revision 12651:6ef01bd40ce2
11592Srgrimes/* 21592Srgrimes * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. 31592Srgrimes * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 41592Srgrimes * 51592Srgrimes * This code is free software; you can redistribute it and/or modify it 61592Srgrimes * under the terms of the GNU General Public License version 2 only, as 71592Srgrimes * published by the Free Software Foundation. 81592Srgrimes * 91592Srgrimes * This code is distributed in the hope that it will be useful, but WITHOUT 101592Srgrimes * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 111592Srgrimes * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 121592Srgrimes * version 2 for more details (a copy is included in the LICENSE file that 131592Srgrimes * accompanied this code). 141592Srgrimes * 151592Srgrimes * You should have received a copy of the GNU General Public License version 161592Srgrimes * 2 along with this work; if not, write to the Free Software Foundation, 171592Srgrimes * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 181592Srgrimes * 191592Srgrimes * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 201592Srgrimes * or visit www.oracle.com if you need additional information or have any 211592Srgrimes * questions. 221592Srgrimes */ 231592Srgrimes 241592Srgrimespackage org.graalvm.compiler.jtt.bytecode; 251592Srgrimes 261592Srgrimesimport org.junit.Test; 271592Srgrimes 281592Srgrimesimport org.graalvm.compiler.jtt.JTTTest; 291592Srgrimes 301592Srgrimes/* 311592Srgrimes */ 321592Srgrimespublic class BC_d2l02 extends JTTTest { 331592Srgrimes 341592Srgrimes private static double[] inputs = {-1.3e44d, Double.NEGATIVE_INFINITY, Double.NaN, Double.POSITIVE_INFINITY, 1.3e44d}; 3531308Scharnier 361592Srgrimes public static long test(int i) { 371592Srgrimes return (long) inputs[i]; 381592Srgrimes } 391592Srgrimes 401592Srgrimes @Test 4131308Scharnier public void run0() throws Throwable { 421592Srgrimes runTest("test", 0); 4331308Scharnier } 4412908Swollman 4531308Scharnier @Test 461592Srgrimes public void run1() throws Throwable { 471592Srgrimes runTest("test", 1); 481592Srgrimes } 491592Srgrimes 501592Srgrimes @Test 5112908Swollman public void run2() throws Throwable { 521592Srgrimes runTest("test", 2); 531592Srgrimes } 541592Srgrimes 551592Srgrimes @Test 561592Srgrimes public void run3() throws Throwable { 571592Srgrimes runTest("test", 3); 581592Srgrimes } 591592Srgrimes 601592Srgrimes @Test 611592Srgrimes public void run4() throws Throwable { 621592Srgrimes runTest("test", 4); 6312908Swollman } 641592Srgrimes 651592Srgrimes} 661592Srgrimes