BoxingTest.java revision 12651:6ef01bd40ce2
1163953Srrs/* 2185694Srrs * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved. 3235828Stuexen * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4235828Stuexen * 5163953Srrs * This code is free software; you can redistribute it and/or modify it 6163953Srrs * under the terms of the GNU General Public License version 2 only, as 7163953Srrs * published by the Free Software Foundation. 8163953Srrs * 9163953Srrs * This code is distributed in the hope that it will be useful, but WITHOUT 10228653Stuexen * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11163953Srrs * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12163953Srrs * version 2 for more details (a copy is included in the LICENSE file that 13163953Srrs * accompanied this code). 14228653Stuexen * 15163953Srrs * You should have received a copy of the GNU General Public License version 16163953Srrs * 2 along with this work; if not, write to the Free Software Foundation, 17163953Srrs * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18163953Srrs * 19163953Srrs * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20163953Srrs * or visit www.oracle.com if you need additional information or have any 21163953Srrs * questions. 22163953Srrs */ 23163953Srrspackage org.graalvm.compiler.core.test; 24163953Srrs 25163953Srrsimport org.junit.Test; 26163953Srrs 27163953Srrspublic class BoxingTest extends GraalCompilerTest { 28163953Srrs 29163953Srrs public static Object boxSnippet(int arg) { 30163953Srrs return arg; 31163953Srrs } 32163953Srrs 33163953Srrs @Test 34163953Srrs public void test0() { 35163953Srrs test("boxSnippet", 0); 36235828Stuexen } 37235828Stuexen 38163953Srrs @Test 39255160Stuexen public void test5() { 40163953Srrs test("boxSnippet", 5); 41163953Srrs } 42163953Srrs 43163953Srrs @Test 44255160Stuexen public void testMinus5() { 45163953Srrs test("boxSnippet", -5); 46163953Srrs } 47163953Srrs 48163953Srrs @Test 49163953Srrs public void test300() { 50163953Srrs test("boxSnippet", 300); 51163953Srrs } 52255160Stuexen 53255160Stuexen @Test 54163953Srrs public void testMinus300() { 55163953Srrs test("boxSnippet", -300); 56163953Srrs } 57163953Srrs} 58202782Stuexen