BC_iadd2.java revision 12651:6ef01bd40ce2
1156230Smux/* 2156230Smux * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 3156230Smux * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4156230Smux * 5156230Smux * This code is free software; you can redistribute it and/or modify it 6156230Smux * under the terms of the GNU General Public License version 2 only, as 7156230Smux * published by the Free Software Foundation. 8156230Smux * 9156230Smux * This code is distributed in the hope that it will be useful, but WITHOUT 10156230Smux * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11156230Smux * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12156230Smux * version 2 for more details (a copy is included in the LICENSE file that 13156230Smux * accompanied this code). 14156230Smux * 15156230Smux * You should have received a copy of the GNU General Public License version 16156230Smux * 2 along with this work; if not, write to the Free Software Foundation, 17156230Smux * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18156230Smux * 19156230Smux * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20156230Smux * or visit www.oracle.com if you need additional information or have any 21156230Smux * questions. 22156230Smux */ 23156230Smux/* 24156230Smux * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 25156230Smux */ 26156230Smuxpackage org.graalvm.compiler.jtt.bytecode; 27156230Smux 28156230Smuximport org.junit.Test; 29156230Smux 30156230Smuximport org.graalvm.compiler.jtt.JTTTest; 31156230Smux 32156230Smux/* 33156230Smux */ 34156230Smuxpublic class BC_iadd2 extends JTTTest { 35156230Smux 36156230Smux public static int test(byte a, byte b) { 37156230Smux return a + b; 38156230Smux } 39156230Smux 40156230Smux @Test 41156230Smux public void run0() throws Throwable { 42156230Smux runTest("test", ((byte) 1), ((byte) 2)); 43156230Smux } 44156230Smux 45156230Smux @Test 46156230Smux public void run1() throws Throwable { 47156230Smux runTest("test", ((byte) 0), ((byte) -1)); 48156230Smux } 49156230Smux 50156230Smux @Test 51156230Smux public void run2() throws Throwable { 52156230Smux runTest("test", ((byte) 33), ((byte) 67)); 53156230Smux } 54156230Smux 55156230Smux @Test 56156230Smux public void run3() throws Throwable { 57156230Smux runTest("test", ((byte) 1), ((byte) -1)); 58156230Smux } 59156230Smux 60156230Smux @Test 61156230Smux public void run4() throws Throwable { 62156230Smux runTest("test", ((byte) -128), ((byte) 1)); 63156230Smux } 64156230Smux 65156230Smux @Test 66156230Smux public void run5() throws Throwable { 67156230Smux runTest("test", ((byte) 127), ((byte) 1)); 68156230Smux } 69156230Smux 70156230Smux} 71156230Smux