comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/loop/LoopParseLong.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 2f31efbd60ac
children c38d2870439e
comparison
equal deleted inserted replaced
7281:e960cda050d7 7282:390448a6b535
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 */ 22 */
23 package com.oracle.graal.jtt.loop; 23 package com.oracle.graal.jtt.loop;
24 24
25 import com.oracle.graal.jtt.*;
25 import org.junit.*; 26 import org.junit.*;
26 27
27 public class LoopParseLong { 28 public class LoopParseLong extends JTTTest {
28 29
29 public static long test(String s, int radix) throws NumberFormatException { 30 public static long test(String s, int radix) throws NumberFormatException {
30 if (s == null) { 31 if (s == null) {
31 throw new NumberFormatException("null"); 32 throw new NumberFormatException("null");
32 } 33 }
78 return negative ? result : -result; 79 return negative ? result : -result;
79 } 80 }
80 81
81 @Test 82 @Test
82 public void run0() throws Throwable { 83 public void run0() throws Throwable {
83 Assert.assertEquals(Character.digit('7', 10), test("7", 10)); 84 runTest("test", "7", 10);
84 Assert.assertEquals(-100, test("-100", 10)); 85 runTest("test", "-100", 10);
85 } 86 }
86 } 87 }