annotate graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/Narrow_char03.java @ 7282:390448a6b535

converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed the HP_series and FloatingReads tests have been disabled temporarily
author Doug Simon <doug.simon@oracle.com>
date Thu, 20 Dec 2012 14:59:57 +0100
parents e808627bd16f
children 64dcb92ee75a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4587
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
1 /*
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
2 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
4 *
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
7 * published by the Free Software Foundation.
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
8 *
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
13 * accompanied this code).
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
14 *
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
18 *
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
21 * questions.
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
22 */
5060
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
23 package com.oracle.graal.jtt.optimize;
4587
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
24
7282
390448a6b535 converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
25 import com.oracle.graal.jtt.*;
4587
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
26 import org.junit.*;
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
27
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
28 /*
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
29 */
7282
390448a6b535 converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
30 public class Narrow_char03 extends JTTTest {
4587
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
31
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
32 static char[] val = new char[4];
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
33
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
34 public static char test(char b) {
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
35 val[0] = b;
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
36 return val[0];
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
37 }
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
38
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
39 @Test
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
40 public void run0() throws Throwable {
7282
390448a6b535 converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
41 runTest("test", ((char) 0));
4587
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
42 }
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
43
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
44 @Test
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
45 public void run1() throws Throwable {
7282
390448a6b535 converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
46 runTest("test", ((char) 1));
4587
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
47 }
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
48
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
49 @Test
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
50 public void run2() throws Throwable {
7282
390448a6b535 converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
51 runTest("test", ((char) 255));
4587
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
52 }
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
53
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
54 @Test
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
55 public void run3() throws Throwable {
7282
390448a6b535 converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
56 runTest("test", ((char) 65000));
4587
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
57 }
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
58
5b04b33dac74 add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff changeset
59 }