comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_series.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 3e48cbd4b0aa
children 5e3d1a68664e
comparison
equal deleted inserted replaced
7281:e960cda050d7 7282:390448a6b535
22 */ 22 */
23 // Checkstyle: stop 23 // Checkstyle: stop
24 24
25 package com.oracle.graal.jtt.hotpath; 25 package com.oracle.graal.jtt.hotpath;
26 26
27 import org.junit.*; 27 import com.oracle.graal.jtt.*;
28 28
29 /* 29 /*
30 */ 30 */
31 public class HP_series { 31 public class HP_series extends JTTTest {
32 32
33 public static double test(int count) { 33 public static double test(int count) {
34 final int arrayRows = count; 34 final int arrayRows = count;
35 final double[][] testArray = new double[2][arrayRows]; 35 final double[][] testArray = new double[2][arrayRows];
36 double omega; // Fundamental frequency. 36 double omega; // Fundamental frequency.
101 /* This test is sensible to the implementation of Math.pow, cos and sin. 101 /* This test is sensible to the implementation of Math.pow, cos and sin.
102 * Since for these functions, the specs says "The computed result must be within 1 ulp of the exact result", 102 * Since for these functions, the specs says "The computed result must be within 1 ulp of the exact result",
103 * different implementation may return different results. 103 * different implementation may return different results.
104 * The 11 ulp delta allowed for test(100) tries to account for that but is not guaranteed to work forever. 104 * The 11 ulp delta allowed for test(100) tries to account for that but is not guaranteed to work forever.
105 */ 105 */
106 @Test 106 //@Test
107 public void run0() throws Throwable { 107 public void run0() throws Throwable {
108 double expected = 0.6248571921291398d; 108 double expected = 0.6248571921291398d;
109 Assert.assertEquals(expected, test(100), 11 * Math.ulp(expected)); 109 runTestWithDelta(11 * Math.ulp(expected), "test", 100);
110 } 110 }
111 111
112 } 112 }