Class_getName02.java revision 12657:6ef01bd40ce2
155682Smarkm/* 255682Smarkm * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 355682Smarkm * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 455682Smarkm * 555682Smarkm * This code is free software; you can redistribute it and/or modify it 655682Smarkm * under the terms of the GNU General Public License version 2 only, as 755682Smarkm * published by the Free Software Foundation. 855682Smarkm * 955682Smarkm * This code is distributed in the hope that it will be useful, but WITHOUT 1055682Smarkm * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1155682Smarkm * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1255682Smarkm * version 2 for more details (a copy is included in the LICENSE file that 1355682Smarkm * accompanied this code). 1455682Smarkm * 1555682Smarkm * You should have received a copy of the GNU General Public License version 1655682Smarkm * 2 along with this work; if not, write to the Free Software Foundation, 1755682Smarkm * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1855682Smarkm * 1955682Smarkm * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2055682Smarkm * or visit www.oracle.com if you need additional information or have any 2155682Smarkm * questions. 2255682Smarkm */ 2355682Smarkm/* 2455682Smarkm */ 2555682Smarkmpackage org.graalvm.compiler.jtt.lang; 2655682Smarkm 2755682Smarkmimport org.junit.Test; 2855682Smarkm 2955682Smarkmimport org.graalvm.compiler.jtt.JTTTest; 3055682Smarkm 3155682Smarkmpublic final class Class_getName02 extends JTTTest { 3255682Smarkm 3355682Smarkm public static String test(int i) { 3455682Smarkm if (i == 0) { 3555682Smarkm return int.class.getName(); 3655682Smarkm } 3755682Smarkm if (i == 1) { 3855682Smarkm return int[].class.getName(); 3955682Smarkm } 4055682Smarkm if (i == 2) { 4155682Smarkm return Object[][].class.getName(); 4255682Smarkm } 4355682Smarkm return null; 4455682Smarkm } 45 46 @Test 47 public void run0() throws Throwable { 48 runTest("test", 0); 49 } 50 51 @Test 52 public void run1() throws Throwable { 53 runTest("test", 1); 54 } 55 56 @Test 57 public void run2() throws Throwable { 58 runTest("test", 2); 59 } 60 61 @Test 62 public void run3() throws Throwable { 63 runTest("test", 3); 64 } 65 66} 67